Advertisement

designing how packets are received

Started by June 18, 2004 06:18 PM
4 comments, last by Cipher3D 20 years, 8 months ago
i'm trying to well plan out the network aspect of my game, and i've been looking in the sample of the DemoBattleGame of the RakNet networking library (really cool, IMO), and i'm looking at how they did it. for some reason, the game receives only one packet per frame - this seems WAY too little - how do games like Counter Strike do it? Certainly they do not receive ONE packet per frame - assuming it runs at 30 fps, that means 30 packets per second, how can all the world entity updates be received in just 30 packets? and besides, they're all out of sync, because the server presumably sent all 30 packets out in one frame...
I eat heart attacks
Are you sure it's only one packet? One read on a socket will return all the data that's waiting, however many packets that is.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
well in RakNet, it is only one packet...hmm...anybody used RakNet yet? http://www.rakkarsoft.com
I eat heart attacks
...maybe i'll just create a seperate thread just to receive packets as they come in
I eat heart attacks
They could only be sending state updates, e.g. instead of sending a packet every frame with the current player's position you only send a packet every time the player's state changes, such as when he or she stops moving, turns, jumps, etc.
ah...i'm stupid...i looked at the source and they had a queue...
I eat heart attacks

This topic is closed to new replies.

Advertisement