Minimum connection required for Warzone?

Warzone 2.1.x series. (Unsupported--read only!)
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Minimum connection required for Warzone?

Post by Buginator »

I took another look at the network code for 2.1, and found a fix for the sync issues--at least it works locally, will need more testers though.
However, the fix can be a bit harsh on the bandwidth of people who have dial up modems.

Here is the crux of the matter.  (Too bad we don't have a code talk forum Kamaze... :-\)
The game has a cap of around 300 units.
The HOST is in charge of himself, and all the AI players.
This means 300 * # of AI players.
For 1 player we could use up 1200 bytes (max 300 units) + some packet overhead.  (this is JUST for unit orders)
If HOST is hosting a 8p map, with 2 humans, then that would mean 1200 bytes  * 7 or 8400 bytes.
I know that the odds of each player having built 300 units is a bit far fetched, but you get the picture.
Then we have structure building/damage/destruction.  We also have power & score & hearbeat, and something else I forgot.
Now all that happens every frame.  We currently have it set the fps to 60 as a limit.
That means if you increase it, then there will be more data sent the faster you increase your fps.  (yes, I know there are ways to avoid this, but that is beyond the scope of the info I am looking for, right now.

Doing some tests, I am running around 10Kps upload (client) and ~24Kps download (HOST) on a 4p game. (2H + 2 AI)

The question is, is this a issue for anyone?
Is that too high?
Do people still play this game on dial-up modems?
Doesn't seem we can create polls anymore, so respond in this thread.

Thanks! :)
and it ends here.
User avatar
Terminator
Regular
Regular
Posts: 1077
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Re: Minimum connection required for Warzone?

Post by Terminator »

as for me I have 1024\512 ADSL conection so it will suit fro me as well. =)
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Minimum connection required for Warzone?

Post by DevUrandom »

10Kb/s upload is just doable with a usual 1mbit DSL connection (eg.). I cannot upload 24Kb/s on my 2mbit DSL connection (~20Kb/s cap).
I think that's a bit much...
Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: Minimum connection required for Warzone?

Post by Troman »

Let's be more realistic.

The unit limit is simply too high. We have troubles with pathfinding with 40 * 8 units on the map. Even if someone can handle 300 * 8 units, the game will become unfair for those who can't, and that will be the vast majority.

So I propose we lower the unit limit to about 100-150, although right now 100 would make more sense for multiplayer mode. For skirmish the limit can be higher, because AIs usually don't build more than 100-120 units (Aivolution is limited to about 120 units afaik).

This will prevent unfair games and lower the requirement for the upload bandwidth drastically.
Sign Up for Beta-Testing:
?topic=1617.0
User avatar
Terminator
Regular
Regular
Posts: 1077
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Re: Minimum connection required for Warzone?

Post by Terminator »

I can accept 150 units limit.  even 100 will be find, if it help with MP netcode improving. & in future extend units limit to current 200 units.
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100
User avatar
The Commander
Trained
Trained
Posts: 66
Joined: 17 Jan 2008, 05:23
Location: New Zealand
Contact:

Re: Minimum connection required for Warzone?

Post by The Commander »

I still use Wireless broadband but only have a small 2 gig data cap then Im slowed down to dial up speed.
Stargate Mod
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Minimum connection required for Warzone?

Post by Buginator »

Troman wrote: Let's be more realistic.

The unit limit is simply too high. We have troubles with pathfinding with 40 * 8 units on the map. Even if someone can handle 300 * 8 units, the game will become unfair for those who can't, and that will be the vast majority.

So I propose we lower the unit limit to about 100-150, although right now 100 would make more sense for multiplayer mode. For skirmish the limit can be higher, because AIs usually don't build more than 100-120 units (Aivolution is limited to about 120 units afaik).

This will prevent unfair games and lower the requirement for the upload bandwidth drastically.
This looks like the best option, setting a cap on units, and a cap on framerate for MP games.

It would have been better if we had a different network model.  Maybe for version 2.5 :D

Or maybe we should disable the AI movement routines on clients?
By that, I mean the main issue we are having now is that without the permission of the Host machine, the units will go on their own, and follow their logic. (this is before the patch)
Example, on Host machine, you got 5 units sitting someplace, on client machine, units are in the same location.
Enemy comes along, and on the Host & client, the AI takes over and starts moving them toward the enemy.  When enemy goes out of range,
on host machine they go back to their position. (assuming you have them set at the default AI commands)  On the client machine, they take off after the enemy, since they really have no orders that were given to them except the last orders they had.

The patch makes it update their orders & position, so they go back to what the HOST is doing after every frame, which is 60 times per sec.
Maybe we can play with every other frame, and see how it works.  That would save some bandwidth issues also.  Lets just hope that the ping is faster than 60ms in most cases, or we will have yet other issues.

If we disable the AI movement via myResponsibility(player) calls, it may be a better way to handle this, but this will also have issues.

I don't see a clean fix with the current code base.


sidenote, most people will NOT notice this, unless you have 2 machines side by side, and comparing what is going on, on each screen.
What people DO notice is that their units/buildings seem to start exploding for no reason that they can tell, after all, the units are just sitting there.  That is the case where the AI took over on another machine, and got into a fight, and when they kill unit/building, it sends the destroy command, and then you will see your units/buildings seemingly go boom for what looks like no reason.  Well, now you know the reason. :)
Last edited by Buginator on 10 Mar 2008, 06:35, edited 1 time in total.
and it ends here.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Minimum connection required for Warzone?

Post by DevUrandom »

Disabling the AI doesn't seem like the solution to me. In fact other games (eg. some FPS) even enable an AI for every (human) player between syncs.
That is, because for very small time intervals the decisions of the AI are very similar to the decisions of a human (at least in FPS: Shoot, or don't, turn around or not, ...). So having an AI in charge when you do not know exactly what the real player is doing helps to smooth the experience for your client, preventing a laggy feeling.

Wouldn't it just be enough to regularly sync all the droids? Or at least sync them after the AI on the host has given new commands...
User avatar
commondragon
Trained
Trained
Posts: 35
Joined: 16 Dec 2006, 01:03

Re: Minimum connection required for Warzone?

Post by commondragon »

Buginator wrote: Or maybe we should disable the AI movement routines on clients?
By that, I mean the main issue we are having now is that without the permission of the Host machine, the units will go on their own, and follow their logic. (this is before the patch)
Example, on Host machine, you got 5 units sitting someplace, on client machine, units are in the same location.
Enemy comes along, and on the Host & client, the AI takes over and starts moving them toward the enemy.  When enemy goes out of range,
on host machine they go back to their position. (assuming you have them set at the default AI commands)  On the client machine, they take off after the enemy, since they really have no orders that were given to them except the last orders they had.


The patch makes it update their orders & position, so they go back to what the HOST is doing after every frame, which is 60 times per sec.
Maybe we can play with every other frame, and see how it works.  That would save some bandwidth issues also.  Lets just hope that the ping is faster than 60ms in most cases, or we will have yet other issues.

If we disable the AI movement via myResponsibility(player) calls, it may be a better way to handle this, but this will also have issues.

I don't see a clean fix with the current code base.


sidenote, most people will NOT notice this, unless you have 2 machines side by side, and comparing what is going on, on each screen.
What people DO notice is that their units/buildings seem to start exploding for no reason that they can tell, after all, the units are just sitting there.  That is the case where the AI took over on another machine, and got into a fight, and when they kill unit/building, it sends the destroy command, and then you will see your units/buildings seemingly go boom for what looks like no reason.  Well, now you know the reason. :)
From reading the top portion I put up in bold, it seems your are talking to people on the client side only on the bottom one.  I host 100% of the time and I notice that too.  Usually when I have to resort to cheapie units after a power crash, they blow up at random.  One time it got so bad one of my heavy tanks blew up :p
WE ARE IDEA! WE ARE UR FUEL! DONT.....FORGET US! (bad song I know ^^)
Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: Minimum connection required for Warzone?

Post by Troman »

Buginator wrote: Example, on Host machine, you got 5 units sitting someplace, on client machine, units are in the same location.
Enemy comes along, and on the Host & client, the AI takes over and starts moving them toward the enemy.  When enemy goes out of range,
on host machine they go back to their position. (assuming you have them set at the default AI commands)  On the client machine, they take off after the enemy, since they really have no orders that were given to them except the last orders they had.
I didn't really understand what you mean with the text in italics. Why would units have different commands on host and client?
All units have so called 'Secondary Orders', Hold/Guard/Persue for example; is that what you meant with 'default AI commands' btw? Those (as well as 'normal' orders) are synced between all machines, so I see no reason why units on client machine would continue pursuing enemy units if they don't do so on the host machine. Since for simplicity you assume that everything else, ie locations of all droids etc, is perfectly synced on all machines.
Of course in reality droid locations can be not perfectly synced, but still it shouldn't be as problematic as you described if the update interval is not too big.
Sign Up for Beta-Testing:
?topic=1617.0
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Minimum connection required for Warzone?

Post by Buginator »

Troman wrote: I didn't really understand what you mean with the text in italics. Why would units have different commands on host and client?
All units have so called 'Secondary Orders', Hold/Guard/Persue for example; is that what you meant with 'default AI commands' btw? Those (as well as 'normal' orders) are synced between all machines, so I see no reason why units on client machine would continue pursuing enemy units if they don't do so on the host machine. Since for simplicity you assume that everything else, ie locations of all droids etc, is perfectly synced on all machines.
Of course in reality droid locations can be not perfectly synced, but still it shouldn't be as problematic as you described if the update interval is not too big.
It would be easier to show than say, but you know how when you just built units, the  pursue/guard position /hold position, the default is guard position?
Now, set a few units someplace on the Host machine, and just leave them there.
On the client machine, do a drive by, and they will both (Host & client) react to your unit coming into range of those units.
Once you move the unit out of that range, on the Host, they go bad to their original position.  On the client side, the AI has orders of pursue.  Where did that order come from?  No idea. The old update code did *not* pass the orders 95% of the time if not more.  All it usually passed was the  damage value.
Then it also only did 6 droids at a time, which doesn't make much sense, but anyway, now it is sending orders, position & damage every frame, for all droids the player is in control of.

That is what the patch fixes.

DevUrandom wrote: Disabling the AI doesn't seem like the solution to me. In fact other games (eg. some FPS) even enable an AI for every (human) player between syncs.
That is, because for very small time intervals the decisions of the AI are very similar to the decisions of a human (at least in FPS: Shoot, or don't, turn around or not, ...). So having an AI in charge when you do not know exactly what the real player is doing helps to smooth the experience for your client, preventing a laggy feeling.

Wouldn't it just be enough to regularly sync all the droids? Or at least sync them after the AI on the host has given new commands...
I don't mean all of the AI routines, just the movement.

And yes, now we do sync up all the droids that the player controls, instead of only a handful at a time.
and it ends here.
Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: Minimum connection required for Warzone?

Post by Troman »

Buginator wrote: The old update code did *not* pass the orders 95% of the time if not more.  All it usually passed was the  damage value.
Ouch. Fixing this will definitely take care of many sync problems.
Sign Up for Beta-Testing:
?topic=1617.0
User avatar
psychopompos
Trained
Trained
Posts: 470
Joined: 08 Nov 2007, 09:18
Location: UK

Re: Minimum connection required for Warzone?

Post by psychopompos »

if the unit limit against bandwidth is an issue, or, atleast a big part, why not game, rather then player unit limit what about a game limit like that in empire earth?
where more players = lower individual unit cap.
then, as soon as one is completely dead, the remaining teams get the cap increased.

8 x 40 = 320
7 x 46 = 350
6 x 64 = 384
5 x 80 = 400
4 x 125 = 500
3 x 200 = 600
2 x 400 = 800
or a player settable cap lower then stated as well.
Last edited by psychopompos on 17 Mar 2008, 20:32, edited 1 time in total.
MOTHERBOARD - MSI P7N PLATINUM¦-¦PROCESSOR - C2D E7300 @ 4.00GHZ
MEMORY - 4 Gig (2x2gig) ddr2 1066mhz¦-¦OPERATING SYSTEM - WINDOWS 7 (ULT)
GRAPHICS - BFG GTX 260 OCX (requires ForceWare drivers for good openGL)
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Minimum connection required for Warzone?

Post by DevUrandom »

psychopompos wrote: if the unit limit against bandwidth is an issue, or, atleast a big part, why not game, rather then player unit limit what about a game limit like that in empire earth?
where more players = lower individual unit cap.
then, as soon as one is completely dead, the remaining teams get the cap increased.

8 x 40 = 320
7 x 46 = 350
6 x 64 = 384
5 x 80 = 400
4 x 125 = 500
3 x 200 = 600
2 x 400 = 800
or a player settable cap lower then stated as well.
Nice idea. I would recommend making it configurable for each game (reset on creation, not stored in config) and just provide a recommendation. So when one day everyone has a 1G/s connection at home, they can play with 1 million units without having to hack the game. ;)
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Minimum connection required for Warzone?

Post by Buginator »

psychopompos wrote: if the unit limit against bandwidth is an issue, or, atleast a big part, why not game, rather then player unit limit what about a game limit like that in empire earth?
where more players = lower individual unit cap.
then, as soon as one is completely dead, the remaining teams get the cap increased.
It is part of the problem, but not the biggest. 
The patch I did will fix the issue I mention, at the expense of bandwidth, but it hasn't been tested against higher ping players, and it doesn't look like it will be for the beta.

The network code has to be rewritten to fix all the outstanding issues we have, and the network model changed. 
and it ends here.
Locked