Hello, I was basically wondering if there is a way to pass on the ownership of a server - preferably to the person with the lowest ping (for peer to peer networking) - when the main host dies. This way, the people in the game wouldn't have to join another person's server, but could stay in the same "room" without disruption.
i guess the easiest would be to just store a list of all cpnnected clients in the server and in all the clients as well. when a client is disconnected from tne server, and gives up reconnecting, it can look up the lowest ip in the list of connected clients, and check if that ip is its own. if it is, start up a new server, with the game state this client knew whn the game crqshed . if not, just try to connect to tje lowest number ip in the list of clients.
you could even keep track of lowest ping time between the server and all clients, and keep tjat list synched as well. rhis will mostly work, although iy will fail jorribly, if tje c ients get out of sumch on who should be the new server.