Harden multiplayer networking and adapt frame timing - #83
Conversation
|
Development builds of 4230f5a: The links work without a GitHub account. Artifacts expire after 90 days, and this comment follows the latest successful build. |
|
Gonna split this up |
|
Nice. Stacked PRs might help? https://github.github.com/gh-stack/ I tested it earlier and it was a worse experience. Added some logging and fed them to Codex:
Also there were issues getting mpdebug working. I haven't checked or verified, but Codex said:
|
|
MPDEBUG is finnicky in TS yeah. In Vinifera I implemented an ImGui window that included it. Maybe now is a good time for that. |
Reworks thbe networking:
Hardens network packet handling
Defended against too small, too large packets, malformed packets, unknown packets.
Also covers the entire abuse set of sending packets as another player's house, so now the only way to cheat here is to fake stuff on the actual network transport layer.
Improve connection-level timing
Partly based on Add fast retransmit of lost packets and packet redundancy CnCNet/yrpp-spawner#75
Improves actual connection timing to better reflect connection quality on a per-connection basis to not stall everyone unnecessarily.
Improve lockstep timing
An evolution of "protocol zero", improving the selection of FrameSendRate and MaxAhead based on the connection quality.
Includes downgrading for bad connections and limited upgrading (to prevent ping-pong when connection quality varies).
Closes #21, closes #22, closes #23, closes #24, closes #25, closes #26, closes #35