How to measure packet size?

I need a way to see how much data is sending/receiving per second. How would I go about this? I have an issue where my game has extreme latency even on LAN.

Sounds like you need some kind of network monitoring tool… if you don’t here back from other monkeys that are familiar with such tools then you may have to resort to google.

“Extreme latency” could have lots of causes… TCP over wifi, large data transfers, etc… To help with that we’d have to know more about your app/architecture/setup. Is this using SpiderMonkey or your own home-grown code? One TCP channel? UDP? Multiple channels? etc.

Well I don’t really want to run a separate tool just to see in/out but for now I guess that could work. I was thinking about overriding the serializers functions to store the size of the bytes that are sent. Lots of games let you put up networking info to see in/out rate in kb/s.

UDP mostly over LAN. It’s using normal jmonkey networking stuff like in the wiki. I’ve based it all on valve’s networking articles as far as only sending input. I also have a separate loop to run the game physics at a fixed 60 tick rate.

Like you said its very game specific so I don’t know much help you guys could give. My packets don’t seem that big though? The entity game state is 3 ints, 2 vectors, 2 strings, 2 floats, and 1 boolean. Plus any relevant events which can either be 1 enum or 1 enum and 2 vectors. This is per play. I’ve only tested with about 3 players. This is sent at 60 fps. Is that too much?

Probably.

Not sure why you need to send strings 60 FPS as part of state updates. And anyway, if you read the Valve articles then you know that 60 FPS for state updates is too often anyway.

If you want to check a different game you can check out the SimEthereal example:

Then you can see if it’s something specific to your network or your game.