Archived

This topic is now archived and is closed to further replies.

games like Counter Strike

This topic is 5581 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was just wondering what type of data does counter strike send through out the network?? Does CT just the the current location and orientation of it''s player to all the other computer on the network?? I think if it did that there would be major synchronization issues! or Does it send player commands such as what keys or mouse events the player has pressed to a server. The server uses that information to update game information (such as make the player walk forward) and sends the updated information back to all the other computers. or Somethin'' else???

Share this post


Link to post
Share on other sites
as far as i know the server program does all that, it would keep the position of the player on the server updated and the terrorists too, if the terrorist got near by it would start sending his location data, i read this in a cs faq a while ago

Share this post


Link to post
Share on other sites
I''d post this in the mods forum you''ll get more luck in there. or go search Halflife programming sites or download the SDK and have a look at how the netcode for halflife works.

or check the articles part of this gamedev under multi-player

Share this post


Link to post
Share on other sites
Half-life updates every players position, orientation, and animation state multiple times per second (10 to 30). The positions are smoothed on the client using interpolation and dead reckoning.

Some of the the network data is optimized. If the the player isn''t moving, then the position is not sent. Etc.

Share this post


Link to post
Share on other sites
i think valve is trying to stop cheaters by devising a new method for sending the player positions.

players positions are only sent for players that your computer can see, other players are occuled out.

this stops wall hackers from knowing your position beyond a wall. but i am not sure if this is implemented yet ..

Its my duty, to please that booty ! - John Shaft

Share this post


Link to post
Share on other sites
quote:
Original post by zenoob
sof2 is just a modded q3 engine


It uses the Q3 arena engine, like MOHAA does. This allows for outdoor scenes, standard Q3 is always inside.

But it doesn''t matter much, the gameplay is great. Especially the capture the flag and inf game modes.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites