Game Development Community

Maximum packet size - roads too big?

by Keith Johnston · in Torque Game Engine · 01/14/2010 (1:24 am) · 5 replies

I am seeing a crash when a shape is loaded only on a client when playing a client / server game. I have had a suspicion for a while that the mesh roads we are using in our level are getting pretty big. When I change nothing else in the game but just delete some points from our MeshRoad, the crash goes away. Strangely, the crash is not happening when the MeshRoad is loaded though - it is happening when a static shape is loaded.

It looks like the MeshRoad packet is 1338 bytes - I saw somewhere that if you go over 1300 bytes in a single packet you can start to have problems.

Here is the info from the net stats on the MeshRoad:

class MeshRoad net info
   packUpdate: avg (10068.500000), min (9429), max (10708), num (2)
   unpackUpdate: avg (10068.500000), min (9429), max (10708), num (2)
   Mask bits:
       0 -    2 (10068.50)      8 -    2 (10068.50)     16 -    2 (10068.50)     24 -    2, (10068.50)
       1 -    2 (10068.50)      9 -    2 (10068.50)     17 -    2 (10068.50)     25 -    2, (10068.50)
       2 -    2 (10068.50)     10 -    2 (10068.50)     18 -    2 (10068.50)     26 -    2, (10068.50)
       3 -    2 (10068.50)     11 -    2 (10068.50)     19 -    2 (10068.50)     27 -    2, (10068.50)
       4 -    2 (10068.50)     12 -    2 (10068.50)     20 -    2 (10068.50)     28 -    2, (10068.50)
       5 -    2 (10068.50)     13 -    2 (10068.50)     21 -    2 (10068.50)     29 -    2, (10068.50)
       6 -    2 (10068.50)     14 -    2 (10068.50)     22 -    2 (10068.50)     30 -    2, (10068.50)
       7 -    2 (10068.50)     15 -    2 (10068.50)     23 -    2 (10068.50)     31 -    2, (10068.50)

Even if this particular crash is not being cause by the road being too large - are packet sizes over 1300 bytes a cause for concern? It looks like this could limit the maximum sizes of roads.

Keith

#1
01/14/2010 (2:39 pm)
I would actually like to expand upon what Keith said above but from a World Editor POV.

It seems as if the meshroad is only stable if you use small road lengths and/or a small amount of points for the road. I noticed that whenever I attempted to build a meshroad that was pushing 30-40 points, the World Editor itself would start to corrupt the default mesh texture. Whenever I deleted a point at its threshold (never did figure it out) the corruption would go away.

Here is an example of the corruption in the World Editor:

i50.tinypic.com/15n915w.jpg

PAR
#2
01/17/2010 (10:28 pm)
So it looks like the crash was completely unrelated to the road size. The problem was we had a duplicate field being added in a subclass. But I still am concerned about hitting the maximum packet size with a road.
#3
01/18/2010 (1:48 am)
I was under the impression the server would split the packets if they exceeded the set limit.. this is a fairly standard feature in game engines. I've also run into issues with actual corruption of the roads themselves, but have never run into any problems with the initial update packet failing to arrive.
#4
01/18/2010 (2:22 am)
@Keith - You'll have better luck if you move this discussion to the Torque 3D forums and not the Torque Game Engine forums.
#5
01/18/2010 (4:23 am)
Whoops - wrong forum! Sorry about that.