Multiplayer games: player movement client side or server side?


I have question that I would like to investigate so I wanted to get the forums opinions.

I want to find out whether player movement code should be done via client side (so the client sends the info to the server etc) or be done via server side (where all validations are done completely by the server) and what are benefits of both?

The difference is in some games like counter strike when you are playing multiplayer and shut off your internet the player stops moving and jerks in the same spot while all other players run into walls. But in other games if you shut off your internet the player can keep moving as if normal but all other players just stop completely. This made me think of the the question: do some games make all validations completely on the server side with no client side validation in order to improve performance?

Also is there a difference between how HTML5 games and triple AAA games like counter strike handle movement code? Or are most handled similarly?



Logic that is processed by the clients’ opens up faster response times, as the logic is being processed locally.
As the client has access to most logic, it’s relatively easy to setup malicious code cheats for the game or software that is running the logic. Each client has to process it’s own logic on it’s own time, which can cause framerate dips in some scenarios on lower end devices.


Server side logic reduces the odds of cheating a lot more, as it’s more insulated. Additionally, if the server code is probably designed, it also checks client attributes to make sure nothing is amiss (And if something is, to deal accordingly with it). Another good factor for server side code is that the code is being calculated by the server, which allows less work for the clients to process on their own, thus boosting client performance (At the cost of the server performance).
Sometimes (But not always), the required code will be larger than if the client did it for several reasons.
Another con is the mentioned higher requirements for processing if the code is processed by the server.


Generally you do simulation on both client and server and the server validates. If there is a mismatch, the client is fixed to match the server.

There is a GDC talk about Overwatch’s netcode which is worth a watch. And another on Injustice

1 Like