Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sync object shakes slightly at the end of the movement #16

Open
wyattzheng opened this issue Nov 16, 2021 · 2 comments
Open

The sync object shakes slightly at the end of the movement #16

wyattzheng opened this issue Nov 16, 2021 · 2 comments

Comments

@wyattzheng
Copy link

wyattzheng commented Nov 16, 2021

thanks for creating this project which guide me to learn about client-side prediction & server reconciliation & snapshot-interpolation.
I read the source code and know that it is a time-based sync system.

when I run the example the object player controlled shakes slightly at the end of the movement. it behave not that perfect.
is there any way to solve this problem?

@j4n7
Copy link

j4n7 commented Nov 25, 2021

Hi, as far as I now, that behaviour is expected and is not cosidered a "problem".
In the example, that happens during server reconciliation, the client moves slightly till it matches the server position.
Probably there is another way of handling server reconcilitation, but I don't know how. Depending on the game you are working on, this slight movement can be a problem.

I'm working on an Open Source Game with Phaser, trying to implmente Geckos and Snapshot Interpolation, but I'm struggling with this and collisions. You can check the code (a little bit messy) here:

Source code

@wyattzheng
Copy link
Author

Thanks for that! after I created the issue, I found the solution.

re-apply inputs and try to interpolate the movement to the final state the inputs re-applied. it behave very well.

I am also working on a multi-player HTML5 game, you can check my code of this part.
https://github.com/uni-js/universe.

Thanks for sharing your experience, hope my experience helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants