Search for room to join while playing offline?

Is it possible to achieve a matchmaking architecture similar to Rocket League using PUN 2? That is we wan't to make it possible for our players to play our single player mode while searching for players in our game. We have a number of ideas on how to accomplish this, but all of them come with some pitfalls.

Curious of your thoughts on how this can be achieved and or what the best way possible to achieve it might be.

Thanks in advance!

Comments

  • Hi @meatloaf,

    By default, creating and / or joining a room is a very fast operation and you don't have to wait so long that it makes sense to play the singleplayer mode in the meantime. However there is another situation, where this makes sense: this is when the client has joined a room and has to wait until enough players are in the room.

    In this case you can simply join the room and wait for the OnJoinedRoom callback. In this callback you can load the scene (you can also do this before) and instantiate a player object locally. Then the client can just play the game until a certain condition is triggered, for example that the room is full or that every player is ready. Then each player removes his locally created object(s) and network instantiates his new player object.