views:

158

answers:

2

How can the shooting game servers handle the timing, for example when a player shoots another, how do they make sure that both players get the message at the exact same time.

or on most of them u see every detail that a player makes in every second, and both players see the exact same moves on their client? how do the game servers manage to send these moves to all clients (players) at the exact same time?

+3  A: 

They don't see them at the exact same time.

The server will determine whether or not the shot hit, and send updates to the clients. The clients will then draw the bullets, blood etc.

There is a timing loop there, but not every event has to be in sync. This is why you see player jumping around under high latency.

From their perspective they are running smoothly, but due to the latency , your client isn't getting updated fast enough.

Byron Whitlock
+1  A: 

Most of the packets are sent at a big enough delay that it will make everything look choppy. Everything the client shows will have lag compensation (predicting where projectiles, players, etc. will be in between frames) to make it look like the packets are coming at the same time.

Matt