Suggestion for networking
Moderator: Moderators
Suggestion for networking
I used to think the networking in this game was like Command & Conquer: Generals, where if the host left the game, one of the other peers would become the new host. I found out this was incorrect however when I was the first to be killed and decided to leave the game as the host. I don't think it makes sense that the host should sit there and watch the rest of the game just like any of the other peers wouldn't necessarily want to either. So my suggestion is that a new host should be selected from one of the peers with the next highest CPU clock speed when the original host leaves. This should also repeat if the new host leaves until there are no more peers to become host.
Re: Suggestion for networking
Easier said than done. There was a time when retail games included this problem. Currently the best solution is to use a dedicated host machine stuck on spectator mode.SeLfkiLL wrote:I used to think the networking in this game was like Command & Conquer: Generals, where if the host left the game, one of the other peers would become the new host. I found out this was incorrect however when I was the first to be killed and decided to leave the game as the host. I don't think it makes sense that the host should sit there and watch the rest of the game just like any of the other peers wouldn't necessarily want to either. So my suggestion is that a new host should be selected from one of the peers with the next highest CPU clock speed when the original host leaves. This should also repeat if the new host leaves until there are no more peers to become host.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Pretty hard, but possible IMHO. It mostly depends on how much of spring assumes the server stays at the same host and IP addresses stay the same etc.
Basically you'd need to pause the game, send a message with a new host IP and only unpause the game after everyone has connected to that IP.
Also it could be a problem that certain people can host and others can't. Spring would need to know beforehand who can, because otherwise when changing hosts it can get stuck in waiting for timeouts for inconveniently long times.
Basically you'd need to pause the game, send a message with a new host IP and only unpause the game after everyone has connected to that IP.
Also it could be a problem that certain people can host and others can't. Spring would need to know beforehand who can, because otherwise when changing hosts it can get stuck in waiting for timeouts for inconveniently long times.
I know that considerations like these are much easier said than done (as I've done a lot of programming myself), however somehow EA Games pulled it off in their version of Command & Conquer: Generals. It was a really nice feature of the networking side of that game since many players (including the host) just gave up sometimes after being defeated or on the verge of being defeated and everyone could keep playing regardless.
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
They probably had it planned that way from the start, for us it would probably mean a largescale rewrite of our network connection code.SeLfkiLL wrote:I know that considerations like these are much easier said than done (as I've done a lot of programming myself), however somehow EA Games pulled it off in their version of Command & Conquer: Generals. It was a really nice feature of the networking side of that game since many players (including the host) just gave up sometimes after being defeated or on the verge of being defeated and everyone could keep playing regardless.
You can save them... but you can't load them... I belive they have a test loader somewhere (like using a saved game as a command line argument or something)... but I'm not sure how well it works.Das Bruce wrote:Could you haxxor it into effectively loading a saved game with a different host?
Can we even save games or did I imagine that?
-
- Posts: 501
- Joined: 18 May 2006, 21:19
it works (somewhat)
every unit is spawned, but they all default to normal... and it loads XTA
this means that you could only svae XTA, and all buildques/orders are terminated, repeat is off, half built units will sit there half-done, etc.
also, group AIs are deleted, so if you were running some MMs with the MMAI, you will run out of E quickly
every unit is spawned, but they all default to normal... and it loads XTA
this means that you could only svae XTA, and all buildques/orders are terminated, repeat is off, half built units will sit there half-done, etc.
also, group AIs are deleted, so if you were running some MMs with the MMAI, you will run out of E quickly
most modern games work this way (p2p way):
1. gameserver collects ips and ports when players join game.
2. At start of a game, gameserver checks it ports are reachable on ALL players (that is cns's problem, when 2 or more players are not reachalbe, game pops out "can not connect")
3. After taht i am not sure if it uses server/clients or p2p. I know however that if one leave others can still play.
Spring could have point 2. programmed the same way.
1. gameserver collects ips and ports when players join game.
2. At start of a game, gameserver checks it ports are reachable on ALL players (that is cns's problem, when 2 or more players are not reachalbe, game pops out "can not connect")
3. After taht i am not sure if it uses server/clients or p2p. I know however that if one leave others can still play.
Spring could have point 2. programmed the same way.
- clericvash
- Posts: 1394
- Joined: 05 Oct 2004, 01:05