Skip to content

Fix multiplayer join visibility snapshots - #9

Merged
Atchbo2001 merged 8 commits into
mainfrom
agent/multiplayer-sync-repair
Aug 2, 2026
Merged

Atchbo2001 merged 8 commits into
mainfrom
agent/multiplayer-sync-repair

Conversation

@Atchbo2001

Copy link
Copy Markdown
Owner

What changed

This is a focused multiplayer-only repair. It intentionally drops the unrelated 20-map package scope from PR #8.

  • Sends InitClient / InitAI identity packets before Resume state in the welcome snapshot.
  • Sends an immediate visible SpawnState / spectator state with join announcements so existing clients do not learn about a CN without enough state to render it.
  • Applies the same visible join snapshot for bots, including bot CNs above 127.

Why

The invis/desync symptom matches a snapshot-order problem: late joiners could receive entity state for a client number before the client identity existed locally, and existing players could receive a join identity without an immediate visible state. That can leave players/bots present in server state but invisible or damage-inconsistent client-side until later traffic happens to repair state.

Scope kept unchanged

No auth changes, no map pack, no browser overlay, no asset replacement, no game-mode removal, no startup/runtime redesign.

Validation

Added focused Go regression tests for:

  • late join welcome ordering: identity before resume state
  • human join visibility: InitClient followed by SpawnState
  • bot join visibility: InitAI followed by SpawnState for CN 128

@Atchbo2001
Atchbo2001 merged commit 84151ec into main Aug 2, 2026
1 check 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.

1 participant