Best way to setup Lobby system with a game that has persistent characters?

edit: Rephrased this post to hopefully make it more useful.

Hi All,

We are look to establish a setup as below for our game, and are looking for suggestions in how to set this up (such as which parts should use a master server, client-server connection and WWW messages).

  • Players login to a central server (The Lobby) where they can see other players, chat to other players. Login needs to be authenticated with a password, and this probably gives them some sort of session token.

  • In the Lobby a player can also host a new game (this starts a Game Room for that game) that other players can join.

  • Players can view a list of current game rooms that they can join.

  • In the Lobby, players select which character of theirs they will use in the game (persistent character data is stored on the central server).

  • When a game room host presses START GAME, the host becomes a listen server, and the other players connect to him in the new scene/map of the game.

  • At key points during a game, such as if a player levels up, the central server needs to be updated to store the new persistent data from the character.

  • When the game ends, or if a player quits, they should return to the lobby connected to the master server.

Any suggestions on the best way to do this? Is it all possibly using Unity?

Updated the OP to be more clear.

One thing I was thinking, should we maybe have the central server/lobby done entirely with WWW messages? Then we would somehow need a way to tell all players in a room which server to connect to when a game is started.

How would a game normally do this? Is Unitys limitation of only one Client-Server connection at a time an issue here?

The masterserver doesn’t store any data, it just shows connected users what players are connected and what games are available.
If you want to store data, you will need to use your own client side logic or use a backend like photon or smartfox or others.
Als if you want to authenticate your users through mysql i would suggest to do this on the server end and not the client.

Thanks, I know the masterserver doesn’t store data by itself, however is it possible to communicate with the master server while you are also connected to a game host?

I think my understanding of what the master server actually does is unclear. Like whether or not you can remain connected to the master server when you start a game, how many people can connect to the master server, can it pass chat data around etc.

I know my way around php, mysql, postgresql and that sort of thing, so I know I could come up with a system that involves all of that essentially to replace the need for a master server, but I’m not sure if it’s the right approach.

Nevermind, I found this link while wandering around which explains a good setup: