Lobby - LSFN/Design GitHub Wiki
Before a game can begin, the ship servers that will be in the game must connect to the lobby. New connections from unseen ship servers are only permitted in this state. The connecting ship server provides its version and the name of the ship represented by this ship server. If the ship server has connected to this environment server before, it can provide a ShipServerID and GameID indicating that it is reconnecting rather than joining anew; this is used to reconnect ship servers in-game.
The environment server responds to this join request by sending a response message. The response contains the environment server's version and indicates if the attempt to join the lobby was successful, giving an error code if it wasn't. The join is unsuccessful if:
- There is a mismatch in the versions of the environment server and ship server.
- The game is already in progress and the ship server wasn't in the lobby when the game started.
- There is a ship server already connected bearing the same ship name as the one provided by the connecting ship server. If the join is successful, the response will also contain a ShipServerID and GameID. The ShipServerID identifies the ship server to the environment server and the GameID is the reference for the current game to be played / being played. These are both UUID v4 strings.