arthurBricq / crafty

Multiplayer Minecraft clone in pure Rust with OpenGL
34 stars 2 forks source link

Handle smooth motion while jumping #26

Closed arthurBricq closed 1 month ago

arthurBricq commented 1 month ago

Describe the bug

In multiplayer, when you look at another player jumping there's a lag.

technical reason

The client only broadcast its position when it is moving.

To compute if the player is moving, at the moment we only use the fact that he is pressing on any key.

Therefore, when user presses jump, he stops to press any of the 4 motions keys, and as a consequence he stops broadcasting his position.

Solution proposition

The function is_moving must be edited so that it returns the OR condition between

arthurBricq commented 1 month ago

Also while rotating

arthurBricq commented 1 month ago

This is actually the same problem