alvyxaz / barebones-masterserver

Master Server framework for Unity
475 stars 106 forks source link

Server Selection Implementation #122

Open Nazarael opened 7 years ago

Nazarael commented 7 years ago

I'm trying to get my head around how to implement a multi-master server setup in my current project and ultimately decided to ask for help. This is a small mmorpg with the ff workflow:

  1. Player creates/logs-in an account.
  2. Upon successful authentication, requests a list of (master) servers (Server Display Name, IP, Port).
  3. Player connects to the selected server and requests a list of characters.
  4. Player creates a character on that (master) server or selects an existing character and play.

My concern is focused primarily on 1 and 2, seeing how auth is a module of the master server. Is there a way for me to handle authentication outside the master server? By this i mean is there a way for me to tell the selected master server that the player has authenticated somehow?

VergilUa commented 7 years ago

I would go with login server (which still can be made with MSF). You can communicate between servers using messages. Although I bet you'll still would need to double check if the connected player is actually THE player.

You can also just pass user encrypted credentials, and re-login on the player selected master server.

Most of MMO's usually have multiple login servers that connect to the database of accounts just to filter the flow of users. Also characters are not shared across different servers, for various reasons. But nobody say that you can't make each master server connect to some global database and create/retrieve characters from there when player connects to it.