network overflow

network overflow

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

network overflow

Post by greenail »

i've noticed a problem where the network bails out, check out the images in this thread http://taspring.clan-sy.com/phpbb/viewt ... highlight=

what's the problem, and why can't we have a bigger buffer, if this is bite, then that doesn't seem like much of a buffer, it seems kinda arbitrary. Anyway should the code throttle itself down instead of just puking? couldn't you resize the buffer? I'm guessing that would require a message to the "peers" to tell them to resize their recieve buffer (no checking is done on the inbound datasize!!!!!!!!!), also it doesn't appear that game server even checks the return value of SendData()

Thoughts?????? or should i hack up an AI level solution like AF did....
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Re: network overflow

Post by Chocapic »

greenail wrote:i've noticed a problem where the network bails out, check out the images in this thread http://taspring.clan-sy.com/phpbb/viewt ... highlight=

what's the problem, and why can't we have a bigger buffer, if this is bite, then that doesn't seem like much of a buffer, it seems kinda arbitrary. Anyway should the code throttle itself down instead of just puking? couldn't you resize the buffer? I'm guessing that would require a message to the "peers" to tell them to resize their recieve buffer (no checking is done on the inbound datasize!!!!!!!!!), also it doesn't appear that game server even checks the return value of SendData()

Thoughts?????? or should i hack up an AI level solution like AF did....
i think the game was not developed towards this situation where you have 2000 units send network commands.
Normally in very big games when you have 2000 units more than 50% of them barely dont send commands (like solars and mexes and so..).
Note:you might also somewhere have some misscalculations and be sending more than one command to each unit ? that could have a chain reaction like that i guess
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

If you must move 200 units from A to B, you should not send 200 order, but only one. But I understand that it add a level of complexity to the AI.
IMSabbel
Posts: 747
Joined: 30 Jul 2005, 13:29

Post by IMSabbel »

But still there should be _some_ more failsave way for the engine to handle this, short of breaking the game.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

You have to restrict the AI from sending so much. It would be nice if the AI is playable in co-op, and that probably isn't possible when you flood the network buffer.
A good AI doesn't have to flood.
If you see the replays getting several MBs for even a small game then you are really doing something wrong....
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Another solution I have yet to test out is to assign units to a group, not a groupAI, then use the givegrouporder command instead of giveorder. I've not tried this before though so I cant comment anymore on it.
greenail
Spring Developer
Posts: 80
Joined: 13 Dec 2005, 20:16

Post by greenail »

I'm not sure my questoin was addressed.

1. why is the network buffer static at 40000?

I gave the command to move all those units, it should have nothing to do with AI realy, my AI checks to make sure that it isn't giving commands to units that already have a command in the queue and since i told them ot move the queue was not empty(). There shouldn't be a reason that we can setup variable buffer sizes, LAN game is a prime example of where you shouldn't ever see this limit.
Post Reply

Return to “Engine”