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

Fix the bug with the interpolation start #11

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

cBournhonesque
Copy link
Owner

@cBournhonesque cBournhonesque commented Dec 5, 2023

Fixed

  • Fixed an issue with the start of interpolation. Anytime we started moving the player, the interpolation would start moving a bit slowly at the beginning. That's because the start tick is really old (last time we received an update for that component) and the end tick is very far. What we do is created a new fake 'confirmed history' tick at roughly end_tick - send_interval_in_ticks so that the interpolation is still done over roughly send_interval

TODO

However there are new issues uncovered with this PR:

  • interpolation_tick seems to be not correct at the beginning, and is even bigger than last_received_server_tick! I think there's an issue with how syncing is done at the beginning
  • client side prediction has a huge delay at the beginning, probably a similar issue where the prediction_time seems to be set too far in advance? Problem in sync
    ---> all this seems to happen when i spawn both clients at the same time! If i spawn client 1 first, and then client 2 later, everything works fine.
    ---> as time passes, the objective time/prediction time are correcting themselves via speedup/speeddown, but it's weird how the initial time can be very bad.

@codecov-commenter
Copy link

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (f31eb65) 75.51% compared to head (6db2aa8) 75.28%.

Files Patch % Lines
lightyear/src/client/interpolation/interpolate.rs 19.04% 17 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   75.51%   75.28%   -0.23%     
==========================================
  Files          89       89              
  Lines        4994     5014      +20     
==========================================
+ Hits         3771     3775       +4     
- Misses       1223     1239      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cBournhonesque cBournhonesque merged commit 57efbfb into main Dec 6, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants