1 min
For the game, one of the requirements is to allow a player to disconnect and reconnect. For this, I used a bool on the server that gets set to true when a player disconnects. This triggers the game core state to go to the disconnection state and sends a similar state to all the players. In this state not data is sent or receive by either the server or the players until the disconnected player rejoins or is timed out. When the payer first connects to the server, it collects their ip address and stores it so when they try and reconnect it checks the stored ip address against the reconnecting client. If they match then it allows them to join in the game again. If the player doesn’t reconnect in time then it sets a bool on the player to false and all other players ignore them when updating.
Subscribe to this blog via RSS.
Low level programming dev diary 28
Text based adventure dev diary 6
Level design developer diary 3
Game engine programming dev diary 14
Audio-visual production dev diary 7
Audio-Visual Production: Particle System Mesh Spawning Issues
Posted on 20 Feb 2020Low level programming dev diary (28) Text based adventure dev diary (6) Level design developer diary (3) Post mortem (4) Ex-machina dev diary (11) Game engine programming dev diary (14) Network game dev diary (11) Audio-visual production dev diary (7)