Page 1 of 2
Suggestion for networking
Posted: 09 Jun 2006, 02:51
by SeLfkiLL
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
Posted: 09 Jun 2006, 04:23
by Pxtl
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.
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.
Posted: 09 Jun 2006, 06:59
by Forboding Angel
this would be a bad idea, because many noobs who are good hosts would leave and some poor bastard with a 1.3 ghx with 256 megs of sdram would be left with the bill == not pretty.
Posted: 09 Jun 2006, 09:10
by Das Bruce
Forboding Angel wrote:this would be a bad idea, because many noobs who are good hosts would leave and some poor bastard with a 1.3 ghx with 256 megs of sdram would be left with the bill == not pretty.
Well obviously it would find the fastest to host, and its better than nothing.
Posted: 09 Jun 2006, 10:43
by Zenka
If no system is available to take over the host. noboby would and the game would quit.
It's still better to have the option then to have no chooise at all.
I like the idea.
Posted: 09 Jun 2006, 15:20
by Min3mat
it should include the spectators as well as the players. lovely idea but just how practical is it to code?
Posted: 09 Jun 2006, 16:15
by Tobi
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.
Posted: 09 Jun 2006, 18:29
by caldera
i think its a good idea, but the cpu and ram are not the only components which should be powerful... its more the internet connection speed (having a 5GHZ Host with 3Gig RAm is nothing if he is behind a 56k modem)...
Posted: 09 Jun 2006, 18:45
by patmo98
Tobi wrote:Also it could be a problem that certain people can host and others can't.
Do you mean:
1. figuratively can't. ie the computer is too slow
2. or physically can't. ie there is a problem with NAT/Port Forwarding/Firewall
Posted: 09 Jun 2006, 20:06
by Tobi
I ment physically. You'd just pick the PC with lowest average CPU% on the first part of the game (before host change), so 'figuratively' is not really a problem.
E: Oh, and lowest average ping ms must be considered too of course...
Posted: 10 Jun 2006, 12:52
by SeLfkiLL
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.
Posted: 10 Jun 2006, 14:51
by SwiftSpear
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.
They probably had it planned that way from the start, for us it would probably mean a largescale rewrite of our network connection code.
Posted: 10 Jun 2006, 15:17
by Das Bruce
Could you haxxor it into effectively loading a saved game with a different host?
Can we even save games or did I imagine that?
Posted: 12 Jun 2006, 20:07
by PenguinMaster
I think you imagined that.
Posted: 12 Jun 2006, 20:37
by SinbadEV
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?
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.
Posted: 12 Jun 2006, 21:46
by esteroth12
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
Posted: 03 Jul 2006, 05:09
by Scikar
Does Generals use a P2P system or client/server?
Posted: 03 Jul 2006, 08:58
by Comp1337
NECROPOST!
Posted: 03 Jul 2006, 11:30
by ginekolog
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.
Posted: 03 Jul 2006, 19:15
by clericvash
It is how empire earth did it, if a host left, the game stopped for a bit and it put someone else as the host.
Was a dam good system too.