Server-side Input
- by Thomas
Currently in my game, the client is nothing but a renderer. When input state is changed, the client sends a packet to the server and moves the player as if it were processing the input, but the server has the final say on the position.
This generally works really well, except for one big problem: falling off edges.
Basically, if a player is walking towards an edge, say a cliff, and stops right before going off the edge, sometimes a second later, he'll be teleported off of the edge. This is because the "I stopped pressing W" packet is sent after the server processes the information.
Here's a lag diagram to help you understand what I mean:
http://i.imgur.com/Prr8K.png
I could just send a "W Pressed" packet each frame for the server to process, but that would seem to be a bandwidth-costly solution.
Any help is appreciated!