Lobby state flow that takes a full redirect server into account.
Currently the lobby will continue to direct users to the server with the most players even if that server is full. I found this an interesting problem and made the following flow chart. It allows the lobby server to continue to function if there is a full server in the server-list while still grouping as many players together as possible.
The idea is that the lobby server has two main "modes": lobby
and redirect
.
In lobby
mode it will collect players until a vote can be started after which it will go into redirect
mode.
It will stay in redirect mode until the preferred server is no longer active
(has too few players) or is full
at which point it will jump back to lobby
mode. In lobby
mode it can start a new vote if there is enough players and select a different "redirect" server. If the old server has room (in the meantime), the lobby players can simple vote for the almost full server again.
The main difference between this idea and the current system is that the lobby server has to remember its "redirect" server and check its state ("active"/"full") before forwarding players.
Where "full" means targetServer.numberOfPlayers + lobbyServer.numberOfPlayers > targetServer.maxPlayers
.
Gr. Jonathan