Skip to content

Multiplayer fixes for 40.0 - #2081

Merged
Robosturm merged 4 commits into
Robosturm:masterfrom
TheMasterCreed:fix/multiplayer-network-40
Oct 21, 2026
Merged

Robosturm merged 4 commits into
Robosturm:masterfrom
TheMasterCreed:fix/multiplayer-network-40

Conversation

@TheMasterCreed

Copy link
Copy Markdown
Collaborator

Multiplayer fixes for 40.0

This gets LAN, gateway and server-hosted games working again.

Tested on Qt 6.10.3, each played to the
end with no desyncs: direct LAN, gateway (including a guest dropping
mid-game and rejoining), and a server-hosted game.

Fixes #2077
Fixes #2078

When you hosted or joined through the gateway, the game was hooked up to
quit the whole app if that connection ever dropped. That hook was only
meant for the server's own slave processes, so regular players were
getting their game closed on them. Once the next fix lets the host
actually hear about guests leaving, it would also have closed the host's
game every time someone left. Slaves still quit like before.

Also made the host tell the difference between a guest leaving and its
own connection dying, so it shows the right message instead of acting
like a guest left.
Typo-level bug: the code checked for "client connected" twice and never
checked for "client disconnected". So the host never found out a guest
left, the guest's slot stayed taken, and they couldn't rejoin.
…m#2077)

The gateway host didn't think anyone was connected yet, so it started
the game right away with one random seed. Then when the guest said it
was ready, the host sent out a different seed and the guest started on
that one instead. Both sides rolled different randoms from the very
first turn (the weather forecast showed it first), and the game
desynced a few days in.

Now the host waits for everyone in its player and observer slots before
starting. If a guest drops out before saying they're ready, the host
doesn't sit there waiting for the timeout anymore, and it can't send a
second start message halfway through the game.
@TheMasterCreed TheMasterCreed changed the title Fix/multiplayer network 40 Multiplayer fixes for 40.0 Oct 19, 2026
…#2078)

Qt 6.10 on Windows names the certificate's key after the certificate's
name. Ours didn't have one, so hosting failed with "credentials were
not recognized" and direct LAN games broke on Build 11. Gave it a fixed
name and it works again.
@TheMasterCreed
TheMasterCreed force-pushed the fix/multiplayer-network-40 branch from c7f8a2c to 21663de Compare October 20, 2026 01:43
@Robosturm
Robosturm merged commit 9a7000c into Robosturm:master Oct 21, 2026
2 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.

Connection issues Multiplayer games crash always after a couple of turns with Cannot Sync

2 participants