Game Development Community

Too much data for one packUpdate

by Ian Omroth Hardingham · in Torque Game Engine · 05/15/2004 (4:35 am) · 5 replies

Hey everyone.

Another packUpdate issue! I need to send around 600 extra bits in packUpdate, but the stream gets full about half way through. Does anyone have any advice (apart from "send less data" :P) on how to tackle this problem?

Thanks,
Ian

#2
05/18/2004 (2:57 am)
Thanks Beffy. In the end I solved this by changing the max packet rate in NetConnection.cc, but that resource will be helpful in other things.

Ian
#3
05/18/2004 (10:40 am)
You can also break the data up in most cases.
#4
05/18/2004 (10:45 am)
Hey Ben.

Do you mean the following?:

Split data to be sent up into part A and part B. In packupdate:

if (mask & partAMask)
{
   //transmit part A
}
else if (mask & partBMask)
{
   //transmit part B
}

and then somewhere like processTick:

[code]
if (sendAThisTick)
setMaskBits(partAMask);
else
setMaskBits(partBMask);

sendAThisTick = 1 - sendAThisTick;
[code]

Or do you mean somewhere lower down?

Ian
#5
05/18/2004 (8:32 pm)
That's one way to do it. Another is to take a cue from the file transfer code and break the data up into n byte chunks that you can send piecemeal across the network, then reassemble them on the other side.