Can player swap rooms?

seonr
edited November 2010 in DotNet
Hi everyone :-)

I am new here, but a long time Unity user including making several Unity networked (P2P) games, but I am looking for a Client/Server solution for our current project and there seems more choice now that ever, so I am trying to identify which 3rd party solution is best.

My only real issue I can see with using Photon right now is the in-ability for a player to exist in more than one room... for instance, to live in a general chat lobby, but be playing a game in another room just with a few other people.

I did see a kind-of-work around via using the MMO setup with the world player dictionary and regions, but this is way over kill for what I am needing.

In its simplest form, I want all players to join a main chat lobby where they choose their game, or match up who they will play against, then move into the game, but still have the ability to chat in the main lobby during game play.

If this is really not possible at the moment, can they at least start in the main chat lobby and then leave there and move to a game room with chat with other players in the room?

Comments

  • Well, it's a default implementation of which you get the code. Means: you are free to change this!

    You could make the chat/lobby room a special one which players don't leave. You would receive events of two rooms then, so make sure they are different ones to handle them correctly.
    There is the LiteLobby project in the SDK, which already lists games and has a special logic for these listing rooms. This would be a good startpoint for your chat lobby. You would add a custom operation SendChatMessage in the Lobby room and modify the existing operation Join to remove you only from game rooms (not the lobby).
    For the client usage: Please check out the DotNet Client SDK "Lite Lobby" demo. There is no Unity Lobby Demo yet.

    The other, even simpler way is: Create a second peer on the client side. You would just use two independent connections to the server. For prototyping, this is dead simple as you don't have to change the server logic. The drawback: Photon will count each connection as a concurrent user and there is additional overhead.