Skip to content

Stagger scoreboard sends to prevent buffer overflows on full servers#313

Open
darkshade9 wants to merge 1 commit intoaqtion-alphafrom
full_scoreboard
Open

Stagger scoreboard sends to prevent buffer overflows on full servers#313
darkshade9 wants to merge 1 commit intoaqtion-alphafrom
full_scoreboard

Conversation

@darkshade9
Copy link

Scoreboard layout messages are now spread across multiple server frames instead of being sent to all clients simultaneously. This prevents packet buffer overflows that could crash the server or disconnect legacy clients with small reliable message limits (~1400 bytes).

  • Periodic scoreboard updates (every 3 seconds) are staggered per-client across the full cycle, so a 32-player server sends ~1 per frame instead of 32 at once. teams_changed still forces immediate update.
  • Intermission scoreboard sends are spread across 4 frames (~0.4s) instead of bursting all clients in a single frame.
  • On-demand score key (TAB) switched from reliable to unreliable send, since the periodic refresh catches any dropped packets within 3 seconds.
  • MAX_SCOREBOARD_SIZE raised from 1024 to 1300 bytes and MAX_PLAYERS_PER_TEAM raised from 8 to 10, using the headroom from reduced burst pressure while staying within legacy packet limits.
  • Document scoreboard delivery changes and the configurable scoreboard field codes (previously undocumented) in action.md.

Scoreboard layout messages are now spread across multiple server frames
instead of being sent to all clients simultaneously. This prevents
packet buffer overflows that could crash the server or disconnect
legacy clients with small reliable message limits (~1400 bytes).

- Periodic scoreboard updates (every 3 seconds) are staggered per-client
  across the full cycle, so a 32-player server sends ~1 per frame
  instead of 32 at once. teams_changed still forces immediate update.
- Intermission scoreboard sends are spread across 4 frames (~0.4s)
  instead of bursting all clients in a single frame.
- On-demand score key (TAB) switched from reliable to unreliable send,
  since the periodic refresh catches any dropped packets within 3 seconds.
- MAX_SCOREBOARD_SIZE raised from 1024 to 1300 bytes and
  MAX_PLAYERS_PER_TEAM raised from 8 to 10, using the headroom from
  reduced burst pressure while staying within legacy packet limits.
- Document scoreboard delivery changes and the configurable scoreboard
  field codes (previously undocumented) in action.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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