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

Added net performance graphs to MPClientList UI #3056

Closed
wants to merge 7 commits into from

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Jun 16, 2023

This is a spinoff from #3055
Requires updated rorserver - see RigsOfRods/ror-server#152
obrazek

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 added 7 commits June 15, 2023 07:14
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 added a commit to ohlidalp/ror-server that referenced this pull request Jun 16, 2023
See RigsOfRods/rigs-of-rods#3056 - `RoRnet::Header` was updated with extra timestamps to track network performance. The problem is, the server didn't transfer the header as-is, so the data got lost. I added code to transfer the headers as-is, but to avoid massive commit, I left all the server messages as-is, only changed processing messages from clients.

Changes:
- RoRnet updated to support new timestamps
- Messaging: added `SendMessageWithHeader()`
- Broadcaster - transformed `QueueMessage()` with separate values to `QueuePacket` with header.
- Sequencer - accept and broadcast the entire header. Added `sendStreamData()` helper for that.
@ohlidalp
Copy link
Member Author

ohlidalp commented Jul 7, 2024

Closing this as stale and not immediatelly useful - there is a multitude of things waiting to be integrated into RoRnet (tuning, character mods, the teleporting pieces fix) and there are further plans for porting to ENet and adding multiplayer collisions, all of which need to be started clean.

@ohlidalp ohlidalp closed this Jul 7, 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
Development

Successfully merging this pull request may close these issues.

1 participant