M3 Eliminations, spectating and results #26

Closed
opened 2026-11-09 05:27:06 +00:00 by claude · 1 comment
Owner

Depends on: M1, B6

Elimination events, a kill feed, spectating living players, final placement and a match summary.

Acceptance

  • Tests cover simultaneous deaths and placement ties.
  • Spectating follows to a new target when the current one dies.
  • Summary data includes placement, eliminations, damage and survival time.
**Depends on:** M1, B6 Elimination events, a kill feed, spectating living players, final placement and a match summary. **Acceptance** - Tests cover simultaneous deaths and placement ties. - Spectating follows to a new target when the current one dies. - Summary data includes placement, eliminations, damage and survival time.
claude added this to the v0.4 Match Loop and Bots milestone 2026-11-09 05:27:06 +00:00
claude added the priority/hightype/feature labels 2026-11-09 05:27:06 +00:00
claude added this to the Tidewall v1.0 project 2026-11-09 15:00:07 +00:00
eric closed this issue 2026-11-12 04:13:18 +00:00
Author
Owner

Done in 6e1c87f.

What changed

  • Simulation elimination events now carry a cause (weapon, fall, drown, tide), taken from SimEntity.last_cause, which every damage path sets. It's in the state hash. player_hit events carry the weapon's item code.
  • Match: kill_feed, per-handle stats (eliminations, damage dealt and taken, counted only between opponents), and summary() with place, tied, eliminations, damage, survival ticks and seconds, eliminator, cause and whether they left.
  • Players who fall on the same tick share the better place and are marked tied. When the last players fall together, the existing tie-break picks the winner and the rest share the next place.
  • Spectating: spectate_target(), cycle_spectate(). A new spectator watches their eliminator, then a living teammate, then the next living player. When a target falls or leaves, the view moves on during the same step: to whoever eliminated the target, otherwise a teammate, otherwise the next living player. In results, everyone watches the winner.
  • The headless server logs each placement and the match summary as JSON lines.

Tests: new test/sim/test_results.gd (13 tests): shared places for mid-match and final simultaneous deaths, trades crediting both players, no credit for eliminating a teammate, a real revolver hit that's counted in the damage stats and named in the kill feed, fall and drown causes from the real simulation, spectator follow-on through a chain of eliminations, retargeting after a leave, cycling, team spectating, summary fields and survival time, and a clean reset. make check passes: 298 tests, self-check and smoke (p95 0.76 ms with 24 bots).

Follow-ups: nothing draws the kill feed, spectator camera or results screen yet. That's the UI work in v0.6. Snapshots (N2) need to carry spectate targets.

— tidewall-build

Done in 6e1c87f. **What changed** - `Simulation` elimination events now carry a `cause` (`weapon`, `fall`, `drown`, `tide`), taken from `SimEntity.last_cause`, which every damage path sets. It's in the state hash. `player_hit` events carry the weapon's item code. - `Match`: `kill_feed`, per-handle `stats` (eliminations, damage dealt and taken, counted only between opponents), and `summary()` with place, tied, eliminations, damage, survival ticks and seconds, eliminator, cause and whether they left. - Players who fall on the same tick share the better place and are marked `tied`. When the last players fall together, the existing tie-break picks the winner and the rest share the next place. - Spectating: `spectate_target()`, `cycle_spectate()`. A new spectator watches their eliminator, then a living teammate, then the next living player. When a target falls or leaves, the view moves on during the same step: to whoever eliminated the target, otherwise a teammate, otherwise the next living player. In results, everyone watches the winner. - The headless server logs each placement and the match summary as JSON lines. **Tests:** new `test/sim/test_results.gd` (13 tests): shared places for mid-match and final simultaneous deaths, trades crediting both players, no credit for eliminating a teammate, a real revolver hit that's counted in the damage stats and named in the kill feed, fall and drown causes from the real simulation, spectator follow-on through a chain of eliminations, retargeting after a leave, cycling, team spectating, summary fields and survival time, and a clean reset. `make check` passes: 298 tests, self-check and smoke (p95 0.76 ms with 24 bots). **Follow-ups:** nothing draws the kill feed, spectator camera or results screen yet. That's the UI work in v0.6. Snapshots (N2) need to carry spectate targets. — tidewall-build
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claude/tidewall#26