NetDeck M3: squad vs. droids — BFS marines, droid/turret AI, cover, win/loss flow

Combat half of the MVP vertical slice on the shared coordinate space:
- 2 marines (BFS to the player beacon, stop-and-fire hitscan), cover
  crates halve incoming hit chance, overhead + HUD HP meters
- patrol/stationary security droids, heavy droid + ceiling turret on the
  objective terminal; feedback spike now spawns a reinforcement droid
- win: marine reaches the terminal (BREACH SUCCESS); loss: SQUAD KIA;
  R resets either way; tracers dim in Network view
- firmware build fix: Arduino auto-prototypes break Unit& params
  (planPath/unitMove/inCover/acquireTarget now take unit indices)
- HUD fix: R:RESET no longer overlaps RESUME/PAUSE; daemon slots and
  SQUAD row spaced out
- STATUS.md: M3 section incl. scope note — BREACH SUCCESS is gated on
  the M4 FRENZY/BLIND daemons; loss path + reset verified headlessly
This commit is contained in:
Dejvino
2026-11-14 12:13:33 +01:00
parent 6d2f593bc5
commit 5571ec8399
2 changed files with 489 additions and 29 deletions
+45
View File
@@ -9,6 +9,7 @@ milestone lands.
| **M0 — Emulator** | SDL2 emulator support + M1 surface tested locally | **done** |
| **M1 — Hardware Sandbox** | Full-frame sprite rendering to ST7789, shared tactical view + HUD, cursor, `Space` freeze, `P` view switch | **compiled + emulator-verified; on-device check pending** |
| M2 — Network Graph & Traces | 4-node sub-net in shared space (AIRLK→JUNC→DOOR/HIVE), animated link routing (1.5 s / 3.0 s ICE), door control, red trace → feedback spike + OVERHEAT, `X` sever, `R` reset | **done (emulator-verified)** |
| M3 — Squad vs. Droids | 2 marines (BFS to the player beacon, stop-and-fire), patrol/stationary droids, heavy droid + ceiling turret on the terminal, cover crates, tracers/HP bars, win/loss banners, reinforcement on feedback spike | **done (emulator-verified; firmware build fixed)** |
| M3 — Squad vs. Droids | Ship floorplan in Cameras view, 3 marines → beacon, 4 droids, gunfire | planned |
| M4 — Cyber-Physical Bridge | Hive link + `1` FRENZY.EXE turns droids on each other (shared coordinate space) | planned |
@@ -88,3 +89,47 @@ validation spec added in this commit) on the shared 320x192 coordinate space:
safe-sever run (trace reset, no spike), all gating messages
(NO HIVE LINK / NO UPLINK / OVERHEAT / LINK SEVERED / NO NODE),
and `r` reset; visual frame dumps inspected.
## M3 (done — emulator-verified)
Implements the combat half of the MVP vertical slice (`MVP.md` §1) on top of
the M2 sub-net, in the same 320x192 coordinate space:
- **Squad**: 2 identical marines spawning in the airlock; BFS pathfinding to
the player-placed beacon (re-planned while blocked or every 8 ticks),
stop-and-fire hitscan combat with inCover() cover rule (adjacent crate
halves incoming hit chance), overhead HP bars + live SQUAD meters in the HUD.
- **Enemies**: 1 patrolling + 1 stationary security droid in the corridor;
1 heavy droid (2 dmg) + 1 stationary ceiling turret (high ROF) guarding
the objective terminal at tile (34,7). Units may not share a tile; walls
and the closed blast door block both movement (BFS) and sight (Bresenham).
- **Feedback spike consequence**: the M2 spike now queues a reinforcement
droid spawning in the server room by the blast door.
- **Flow**: win = a marine reaches the terminal (`BREACH SUCCESS`), loss =
both marines down (`SQUAD KIA`); blinking 1-line banner, `R` resets either
way. Tracers (2-tick) render in Cameras view, dimmed in Network view.
- **Emulator verification** (headless, scripted taps/keys): marines clear
both corridor droids; ICE→trace→feedback→reinforcement→cooldown still
works on top of combat; loss path + `r` reset verified; frame dumps
inspected (units, HP bars, tracers, banners).
- **Firmware build fix (this commit)**: the first M3 draft did not compile
on-device — the Arduino preprocessor injects auto-prototypes above the
`Unit` struct, and functions taking `Unit&`/`const Unit&` parameters
(`planPath`, `unitMove`, `inCover`, `acquireTarget`) broke the generated
prototypes. The emulator (plain C++) never sees this. All four now take a
unit *index* instead of a reference; `pio run -d examples/NetDeck` is green
again.
- **HUD layout fix (this commit)**: `R: RESET` no longer overlaps
`RESUME`/`PAUSE` (right column re-spaced: SPACE/RESUME/R:RESET/VIEW),
daemon slots and the SQUAD row got real gaps (frame-dump verified).
### Known scope note: the win path is gated on M4
Scripted runs show the encounter plays out but `BREACH SUCCESS` is not
reachable yet: the marines reliably clear the corridor droids, then die at
the blast door to the heavy droid + turret. The intended counter — `1`
FRENZY / `2` BLIND — lands in M4 (keys already arm and show the gating
message). The litmus-test loop (crack HIVE, FRENZY the turret, dash the
squad through) completes in M4; until then the loss path + reset are the
verifiable branches. On-device check still pending (inherits the M1
checklist in §M1 above).