Assigning new host if host DCs

Assigning new host if host DCs

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Assigning new host if host DCs

Post by KDR_11k »

Since all computers know the full gamestate anyway isn't it possible to elect a new player host if the host disconnects and the game is still running?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Assigning new host if host DCs

Post by Auswaschbar »

There are some issues with this:
1. Only the host knows the IP's of the players
2. Only the host has a connection to every player. The others would need to connect to the new host, which can be problematic because of NAT, ports not forwarded, firewalls etc.
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Re: Assigning new host if host DCs

Post by malric »

I would say that still, may times players would be able to continue with another host. I'm saying this because I can host but usually I just play in other people games. This can be true for more people.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Assigning new host if host DCs

Post by Pxtl »

Auswaschbar wrote:There are some issues with this:
1. Only the host knows the IP's of the players
2. Only the host has a connection to every player. The others would need to connect to the new host, which can be problematic because of NAT, ports not forwarded, firewalls etc.
Hosting settings (port, hole-punching, etc) could be moved out of the server panel and added to a player's personal settings in the UI. Then, when they join the game, the primary host receives the information from all players and distributes the list to every player. Each player attempts to connect to every other, and returns their success. The primary host then takes the subset that every player can connect to, builds an ordered list, and synchronizes that list to all players. That list is used as the fall-back order of hosts. When first host fails, fall back to second. When second host fails, fall back to third, and so-on.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Assigning new host if host DCs

Post by imbaczek »

the host could choose a backup host and tell others about it, the NAT hole could be then kept open by sending keepalive packets from all clients. when the original host dies, backup assumes hosting role and chooses another host. sounds simple. as usual, the real problem is making this work, figuring out all details and refactoring spring's internals to support such magic.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Assigning new host if host DCs

Post by Tobi »

Yeah, the host to which most people can connect can be determined in the background when the game starts. Then that host would become backup host. (in case of everyone being able to connect to multiple players, some average ping could be used to break the tie)

But imbaczek's right either way, it will require quite some modifications/refactors to spring's internals.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Assigning new host if host DCs

Post by LordMatt »

The OP is capable, is he not? :P
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Assigning new host if host DCs

Post by aegis »

In Warcraft III, it's fun to watch the original host ragequit and the game continue smoothly.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Assigning new host if host DCs

Post by bibim »

By the way, did you know that you can still host even if you crashed ? Just don't close the error message box (don't click on "OK" or anything). Then spring executable still runs in background and acts as a dedicated server (it only uses 5-10% of proc and only forwards packets). At least it works on my computer ;)
Post Reply

Return to “Feature Requests”