Server-side Input

Posted by Thomas on Game Development See other posts from Game Development or by Thomas
Published on 2012-10-01T01:26:53Z Indexed on 2012/10/01 3:52 UTC
Read the original article Hit count: 271

Filed under:
|
|
|
|

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!

© Game Development or respective owner

Related posts about XNA

Related posts about c#