- Home /
Faking Dedicated Servers in Unity
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.
Answer by kroll · Nov 16, 2010 at 07:58 PM
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220613082932im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
What, how? Dedicated Servers? 0 Answers
Simple dedicated server on the VDS 1 Answer
Server controlling Client- No errors in Console- LAN 0 Answers
Help with multiplayer connection 0 Answers