#1276 Smoother Movement


I think the movement should be smoother, because the way it is now (using the arrow keys OR the mouse) your character sometimes either keeps going for a while past where it should and teleports back, teleports forward due to being too slow, or it will go to where it should, then forward a few pixels, then teleport back to where it should be.


  • Kimmo Rundelin

    Kimmo Rundelin - 2013-07-17

    This is a rather hairy subject, and only some issues can be partly fixed. The movement is smooth when the latency between the server and client is not large, but the lag can be a problem if the network connection is bad or when the distance from the server is very large.

    These are best tackled by someone who can actually reproduce the problems, but I'll write up some thoughts on it for anyone who wants to try to solve these

    1. Movement continuing when the player should stop

      • When using the mouse, this may be fixable: The client can store the coordinates of the move action, and stop the player at that point when it reaches the destination. The stored location must be cleared when the player initiates any new movement by any means. Also it needs to be cleared at zone changes.
      • When using the keyboard, this is not fixable. The player stops when the server receives the stopping command, and the server is always right. If some network issue causes the stopping command arrive late, the server is still right, so the client can not reliably stop the player. Stopping at the wrong spot would result in jump when the server sends the new coordinates.
    2. Jumping between locations
      The client will modify an entity position forcefully if it is more than one tile wrong (less than one tile difference is handled with speed adjustments). This could be perhaps made more lenient for high lag connections. Allowing greater missplacement will make client side collision detection unreliable, but on the other hand it is not particularly reliable to begin with when the network is laggy enough for the positioning to be wrong by more than one tile.

      The current development client (and release client starting from 1.09) will keep track of command latency for the purposes of keyboard movement prediction. The stored data is available in WM properties predictor.speed and predictor.jitter, and could perhaps be used to determine the maximum offset from the server supplied coordinates.

  • Hendrik Brummermann

    • status: open --> closed-fixed
    • Group: -->


Cancel  Add attachments