1
\$\begingroup\$

I've a doubt about synchronization on multiplayer games. In the case of the architecture of a game is like this:

Client tells to the server is shooting at this position, then the server simulates the same movement then tells to client if the enemy was hit or not.

I think in this type of architecture when a client has too much lag the information on shoot arrive very late on server. Could happen that if the client hits an enemy the same thing may not be happen on server that gets information too late, so the hit that is registered on client is lost.

I've noticed that when i've too much lag, all my hits are always registered.

So what I think is that the architecture of game is different of my proposed.

How "Overwatch", "CS:GO", or "Rainbow six siege" are handling this syncronization? It's possible that allow clients to send hit's information to server?

\$\endgroup\$
  • 2
    \$\begingroup\$ Here is how it's done for CS:GO. You might also want to read something like this Gaffer on games set of articles. There is also Gabriel Gambetta's set of articles which is quite popular. \$\endgroup\$ – Vaillancourt Jan 25 '17 at 15:46
  • \$\begingroup\$ The client would also send the time that the event happened. The server would then know, even if there was a lag, when it happened and calculate accordingly. Typically both the client and the server make their own calculations etc.., but in case of a difference, the server's "decision" takes precedence and updates the client accordingly. \$\endgroup\$ – Steve Smith Jan 26 '17 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.