I want to implement the following Server stuff before finishing the ALPHA game:
Clients can not connect to a server midgame (so if a game is started, no further connections are allowed). This makes sure that everything works smoothly for everyone already playing.
Duplicate ports will not be allowed. You can't start a server on a port which is already used.
If the server (before starting the game) disconnects the server, everyone connected should be able to join another server without problems.
If a client (before starting the game) disconnects from the server, the lobby should still be working as well as the game.
(If time left:) When the server quits the game, everyone should be thrown out of the server.
You can't connect to a server which already started the game
When initializing a server, a portnumber between 0 and 30000 will be chosen. So a negligible chance of starting a server on an already occupied port
Server can disconnect the server (not in game); everyone gets kicked out of the lobby. They can start their own server without trouble after.
Client can disconnect from the server (while in lobby); lobby is still working after, and the client can just continue doing whatever he likes.
A client can discconect from the server (while ingame); the game continues on, without the left client (player gets destroyed). Moreover, the shown scores are still correct.
I want to implement the following Server stuff before finishing the ALPHA game: