games like Counter Strike

Started by
14 comments, last by Yau 21 years, 7 months ago
Another optimization that FPS games tend to make is to only send deltas for player positions. No sense sending 3 32-bit values representing someones position when they can only change each frame by a small amount.
Advertisement
Someone''s position can easily be 3x16 bits. That''s 65536. That''s more than enough for a 1x1 mile area with 1 inch precision. Height can even be 8 bits.
But if you just send deltas, then you could get into a situation where all the computers in the netwrok might register different positions for the same player?? What happens if a computer on the network missed out on recieving a delta position??

Anyways, I think the amount of data sent to represent delta position is just as much as data sent for absolute positions.
:)
thats where prediction comes in.
if the computer misses a delta, it just predicts it.

every few packets, send the absolute position to re-calibrate the positions..

i think half-life engine sends absolute positions only.

Does someone know how it works the other way around? I.e, how does the client send update information to the server?
On regular intervals, or event based?
Any optimizations?
its usually on a regular interval. That way the server can predict if a packet is lost and use a prediction algorithm for the missing packet.

clients dont normally re-transmit lost packets during a game. They just skip the packet.

This topic is closed to new replies.

Advertisement