Host Migration…
Godot hard codes remote ID 1 to be the server so whenever the signalling server detects that the host leaves it can just send a packet with a new lobby id to switch to
Now a good host migration system might find an optimal new host butttt, we can send this packet to everyone and they will all close their connection and re open to the new server the first player to restart their connection becomes the host! (which would also be the oldest peer connected unless there computer is extremely slow)
Okay cool everyone’s reconnected to the new server with a host and the old lobby is deleted since everyone closed their connection but now they all have different remote id’s…
But this is luckily a simple fix as long as we delete all other players but keep our own everyone will reconnect anyway and have their played re-added
Once the client gets back into the server we can find their old player and reassign it to them instead of adding a new player for local client and then the multiplayer synchronizer will do the heavy lifting and update everyone’s players to their old positions etc.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.