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

Fixed multiplayer visual glitch with detached parts "teleporting" around the vehicle #3055

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Jun 15, 2023

Fixes #2783

I replaced the Ulteq-invented short int compression format with a standard half-precision IEEE floats (using https://half.sourceforge.net/). Both are 2-byte formats so network traffic will remain the same.

ohlidalp added a commit to ohlidalp/rigs-of-rods that referenced this pull request Jun 16, 2023
This is a spinoff from RigsOfRods#3055
Requires updated rorserver.

New features:
- Added send timestamp to `RoRnet::Header` - all packets now track their time shift between remote client and local client. Note that the existing truck time shift tracking made by Ulteq is unchanged for now.
- Added queue timestamp to `RoRnet::Header` - all packets now track the delay between creating the packet and transmitting it to server.
- Added recv queue timestamp to `NetRecvPacket` - all packets now track local delay between receiving packet and processing it.
- Added 3 new graphs to the MPClientList UI: 1. timeshift (should be stable), 2. local recv lag, 3. remote send lag.

Motivation:
- to smoothen out character movement the same way truck movement is smoothed. That requires tracking the timeshift, and Ulteq's truck smoothing code is very much tied to `Actor` and `ActorManager`.
- To clean up network timers - there are 3 separate timers (`Character`, `Actor`, `ActorManager` - the pattern is not clear).
- To better understand and tweak network traffic.
- I like diagnostic views.

Time spent: 6.5hours, not counting rorserver.
@ohlidalp
Copy link
Member Author

ohlidalp commented Aug 3, 2024

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