Skip to content

LockTimer 24/7 ghost-mode server + plugin split#1

Open
raimannma wants to merge 6 commits intomainfrom
locktimer-24-7-ghost-mode
Open

LockTimer 24/7 ghost-mode server + plugin split#1
raimannma wants to merge 6 commits intomainfrom
locktimer-24-7-ghost-mode

Conversation

@raimannma
Copy link
Copy Markdown
Member

@raimannma raimannma commented Apr 14, 2026

Summary

  • GhostMode plugin (new) — reusable solo-practice server layer: OnCheckTransmit player isolation, OnTakeDamage PvP block, convar lockdown (no NPCs/bots/troopers), team + default-hero auto-assign on connect. Env-configurable DEFAULT_HERO (Haze) and DEFAULT_TEAM (2).
  • SpeedHud plugin (new) — standalone billboarded speed HUD with its own 100 ms ticker and /speed toggle. Lifts cleanly out of LockTimer for reuse by any movement-oriented gamemode.
  • LockTimer plugin (slim) — keeps only the gamemode-specific pieces: YAML zones, timer FSM, timer HUD, metrics POSTs, teleport-to-start-zone on spawn/respawn, /reset /pos /zones commands. Finish message is per-slot (silent to others).
  • gamemodes.json loads StatusPoker + GhostMode + SpeedHud + LockTimer for the lock-timer gamemode; normal is untouched.

Internal cleanups along the way:

  • Dropped dead RunState.Finished.
  • Fixed SpeedHud toggle: /speed off was re-enabled one tick later because Tick unconditionally re-added the slot. Flipped to an opt-out _disabledSlots set.
  • .gitignore now excludes bin/ and obj/.

Test plan

  • dotnet build all three plugins — 0 warnings.
  • dotnet test LockTimer/LockTimer.Tests — 22/22 passing.
  • docker compose up lock-timer -d; verify all four [<Name>] Loaded lines in logs and all four DLLs in /managed/plugins/.
  • 2-client smoke test: players can't see / damage / hear each other; both spawn at start-zone center on default hero; /speed toggle persists; finish message goes only to the finisher; metrics POST fires.
  • docker compose up normal -d — only StatusPoker loads in the normal image.

🤖 Generated with Claude Code

@raimannma raimannma self-assigned this Apr 14, 2026
@raimannma raimannma requested a review from Oskar-Sterner April 14, 2026 20:16
@raimannma raimannma changed the title LockTimer: 24/7 solo-run ghost-mode server LockTimer 24/7 ghost-mode server + plugin split Apr 14, 2026
@raimannma raimannma force-pushed the locktimer-24-7-ghost-mode branch from 8cda315 to 39e4aa3 Compare April 14, 2026 21:03
Manuel Raimann and others added 5 commits April 14, 2026 23:15
Turn lock-timer into a dedicated server where arbitrary players can join,
speedrun the course, and leave without ever seeing, damaging, or affecting
each other.

- PlayerIsolation: OnCheckTransmit hides every foreign controller + pawn
  from each viewer (ghost mode).
- AutoSpawn: on full connect, assign team + default hero and teleport to
  the start-zone centre; re-teleport on respawn via pawn-index change
  detection in the existing ticker.
- DamageBlocker: OnTakeDamage returns Stop for player-vs-player damage;
  self/environmental damage passes through.
- ServerConfig: applies convars in OnStartupServer to disable troopers,
  NPCs, bots, and shorten respawn timing.
- Finish chat now goes only to the finisher instead of broadcasting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tick re-added the slot to _enabledSlots every frame, so /speed off
lasted one tick before the HUD respawned. Flip to an opt-out
_disabledSlots set so the toggle persists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GhostMode packages the solo-practice concerns (player isolation via
OnCheckTransmit, PvP damage block, convar lockdown, team/hero
auto-assign) so any future gamemode can opt in. Default hero/team are
env-configurable (DEFAULT_HERO, DEFAULT_TEAM).

SpeedHud is now a standalone plugin with its own 100ms ticker and
/speed toggle. LockTimer keeps only its gamemode-specific pieces:
zones, timer FSM, timer HUD, metrics, teleport-to-start-zone.

gamemodes.json loads all three plus StatusPoker for lock-timer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Runners must touch each checkpoint in the listed order before the end
zone will register a finish. Each split is announced in chat and
emitted as a locktimer_checkpoint_time_ms metric.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Per-player minimap-only ping pointing at the current target (start, next
checkpoint, or end), re-sent every 1.5s so the client marker stays alive.
Uses a stable per-slot ping id so new pings replace the old marker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raimannma raimannma force-pushed the locktimer-24-7-ghost-mode branch from 39e4aa3 to c9e96ed Compare April 14, 2026 21:15
Co-Authored-By: Claude Opus 4.6 <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