Feed: use and collect events, per-racer totals #35
Labels
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#36 Decoy drop and decoy hit events
mintopia/blur
#37 Bribe's starting powerup missing from the feed
mintopia/blur
#49 JSON Schema for the game-state feed
mintopia/blur
#33 Test-race scenarios and race bot in scripts/
mintopia/blur
Reference
mintopia/blur#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Events
use: one per use of a powerup by any racer: a bolt volley = 3, placing a mine = 1, Nitro/Repair/Shield included. Sources: channel-9 event 0 (fired, ADR 0017), event 4 self-applied (Nitro/Repair, ADR 0016), event 14 (Shield).data:racer,powerup,serial.collect: inferred from the 5 Hz held-queue diff (ADR 0017). Ause(or Bribe grant) of a kind never seen held backfills acollectwithinferred: true.hitunchanged (one per strike, mine hit separate from its placement).Totals
Per racer, live in
standingsand final inrace_result, every mode:totalswith per-kind mapsuses,collections,hits_dealt,hits_taken,hits_shielded,damage_dealt,damage_taken; pluswrecks_dealt,wrecks_suffered(powerup + collision),self_hits. Counted from feed events so they agree on every instance. Decoy counts come with #36.Acceptance
Rules
docs/decisions/0019-feed-message-contract.md). Repo data/tools: ADR 0020.BLUR_ENGINE=recomponly.docs/state-websocket.mdandexamples/live-timingfor any feed change.scripts/scenarios (windowed, low settings) once #33 exists.Implemented on branch harmonic/task-33 (commit 018dba7).
Events
use: channel-9 event 0 (fired; bolt volley = 3, mine placement = 1, Shield included, since it arrives as event 0 kind 7) plus event 4 self-applied (Nitro/Repair).data:racer,powerup,serial. Event 14 is not hooked; event 0 already covers Shield.collect: from the 5 Hz held-queue diff (multiset diff, so reorders are ignored; out-of-range kinds are skipped). Auseof a kind never seen held sendscollectwithinferred:truefirst, and the later queue gain is not counted twice.hitunchanged, except a strike the game repeats with the same serial and victim is now sent once. Without that, LAN instances disagreed on hit counts.Totals
totalsto everystandingsentry, so it is live and also inrace_result.standings. Fields: per-kind mapsuses,collections,hits_dealt,hits_taken,hits_shielded,damage_dealt,damage_taken, pluswrecks_dealt,wrecks_suffered,self_hits.self_hits.Docs and example
docs/state-websocket.mdupdated.Verification (recomp, bot scenarios; I regenerated the recompiled code first because the checked-in copy predated the event-send hook)
standingstotals.race_feed,hit_event,game_stateandstate_wsctests pass. I did not run the full test suite or/code-review, and I did not check the live-timing page in a browser.Completed and merged by Harmonic (task 33).