Skip to content

Improve multiplayer reliability, diagnostics, and mod compatibility - #34

Open
bastrian wants to merge 27 commits into
Rollocraft:masterfrom
bastrian:master
Open

bastrian wants to merge 27 commits into
Rollocraft:masterfrom
bastrian:master

Conversation

@bastrian

@bastrian bastrian commented Sep 21, 2026

Copy link
Copy Markdown

This PR mainly improves multiplayer stability and should make synchronization problems easier to find and recover from.

The handshake now checks the game build and active mods, including mod versions and loaded assembly hashes. If the game version, DLCs or mod playset are different from the host, the player should now get a more useful error instead of just failing to join. The compatibility catalog also handles local-only mods like Achievement Fixer.

For networking, clients now report if they actually applied atomic net operations. If something fails, the host can retry the original transaction or recover only the affected client. It is no longer necessary to replace the world state for all clients because one client got out of sync.

There are also some protections against old/stale commands after a recovery. The command limit after a world sync was increased as well, because there is normally a larger burst of commands directly after syncing.

For hosts, I added optional restrictions for sensitive tools, password protection for public direct hosting, and some traffic/latency information for connected peers in the multiplayer UI.

Also included:

  • Diagnostic bundle with session and flight-recorder data, which can be shared for debugging
  • Host-side recovery backup before transferring the world
  • More detailed diagnostics for mods, peers and synchronization
  • A document/playset for repeatable regression testing
  • Build fixes for the current CS2 modding toolchain and Steam relay builds
  • Portable build identity metadata for locally built versions

What I tested

  • Rebased onto current upstream (f0e0ad5) without conflicts
  • Local .NET regression tests are passing
  • Full Windows build works with Cities: Skylines II 1.6.2f1
  • Mod loads correctly and I was able to host a session with protocol version 70

What I could not fully test yet is the complete multiplayer flow with a second client.

This still needs testing with two clients to verify joining, operation retries and the targeted recovery in an actual multiplayer session.

And yes, it did cost me an entire night, 4 Energy and 3 coffee so far.
Discolsure: AI was used to countercheck my code, and correct small issues. The respective files have the Author there set in the metadata.

@Rollocraft

Copy link
Copy Markdown
Owner

"bastrian
authored and
Codex
committed
4 hours ago"

This branch has not been deployed

No deployments
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.

2 participants