What to send to server in real time FPS game?
- by syloc
What is the right way to tell the position of our local player to the server? Some documents say that it is better to send the inputs whenever they are produced. And some documents say the client sends its position in a fixed interval.
With the sending the inputs approach: What should I do if the player is holding down the direction keys? It means I need to send a package to the server in every frame. Isn't it too much? And there is also the rotation of the player from the mouse input. Here is an example:
http://www.gabrielgambetta.com/fpm_live.html
What about sending the position in fixed interval approach. It sends too few messages to the server. But it also reduces responsiveness.
So which way is better?