Skip to content

Time limits for every point-scored mode, configurable, and match-time on the wire - #32

Merged
itxtoledo merged 3 commits into
mainfrom
feat/match-time-limit
Nov 27, 2026
Merged

itxtoledo merged 3 commits into
mainfrom
feat/match-time-limit

Conversation

@itxtoledo

Copy link
Copy Markdown
Contributor
  • CTF, ngCTF and Babel had no time limit and could run for ever. They now end by the score when match_seconds runs out (tie = draw); /extend works on them.
  • match_seconds (30..86400) lives in each mode's own section: [ctf], [ngctf], [babel], [tc], [tdm], [koth]. Defaults unchanged (1200 s; 900 s for TDM and KotH). --check-config rejects values out of range. No "off": arena, ptb and zombie keep their round_seconds, creative has no end.
  • GameModeState carries match-time (seconds left) for every timed mode, documented in docs/protocol-1.0.md, so a client can count down or play closing music.
  • SP_MATCH_SECONDS overrides every mode for tests.

Tested by running the server in ctf, ngctf, babel, tc, tdm and koth with a short limit: each ended by time, and match-time counted down.

…odeState for every timed mode

CTF and ngCTF ended only at the capture limit and could go on for ever. They (and
Babel) now end by the score when 1200 s run out, a tie is a draw, and /extend works
on them. Every timed mode (CTF, ngCTF, Babel, TC, TDM, Koth) says its seconds left
in GameModeState's match-time, so a client can count down. SP_MATCH_SECONDS
shortens the limit for tests.
One key per mode (ctf_seconds, ngctf_seconds, babel_seconds, tc_seconds,
tdm_seconds, koth_seconds), 30..86400, defaults as before (20 min, 15 for TDM and
Koth). config.toml's check refuses a value out of range and a mistyped key.
SP_MATCH_SECONDS still overrides every mode for tests. A match never runs for ever:
there is no 0 or off.
…[ngctf], [babel], [tc], [tdm], [koth]

Replaces the [match] table of the previous commit. Same range (30..86400), same
defaults, same check.
@itxtoledo
itxtoledo merged commit b09122d into main Nov 27, 2026
2 checks passed
@itxtoledo
itxtoledo deleted the feat/match-time-limit branch November 27, 2026 20:50
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