NetDeck M2: sub-net graph, link routing, ICE crack, red trace + feedback spike

Implements MVP.md §1-§3 (network half of the vertical slice) on the shared
coordinate space:
- 3-room floorplan (airlock/corridor/server room) with blast door + terminal
- 4 nodes: AIRLK root - JUNC - DOOR_CTRL (on the door tile) / HIVE (3s ICE)
- animated link builds (dotted->solid, 1.5s plain / 3.0s ICE), reachability
  tree from AIRLK; links offline until the build completes
- DOOR_CTRL toggles the blast door; X severs the hovered link (ICE progress
  resets, trace cut short resets safely)
- cracking HIVE spawns a 4s red trace to AIRLK; arrival = feedback spike:
  links drop + 3s OVERHEAT lockout (TEMP bar)
- FRENZY/BLIND daemon slots gated on HIVE link (effects land in M4)
- R instant reset via resetScenario() (also fixes root-online init bug)
- boot straight into the paused encounter
- emulator: --tap "x,y@frame" and repeatable --type "text@frame" for
  headless scenario testing

Verified headlessly: full trace->feedback run, safe sever, all gating
messages, reset; visual dumps inspected. Spec: src/netdeck/MVP.md.
This commit is contained in:
Dejvino
2026-11-14 11:23:37 +01:00
parent 3dcafa25e7
commit 6d2f593bc5
4 changed files with 670 additions and 230 deletions
+33 -1
View File
@@ -8,7 +8,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 | Node graph in Network view (door nodes on bulkhead tiles), link routing, ICE crack, red trace + `X` sever | planned |
| 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 | 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 |
@@ -56,3 +56,35 @@ milestone lands.
4. `Space` freezes (CRT scanlines, sim/packets halt); cursor stays live.
5. Trackball: smooth momentum cursor, tile snap in Cameras, node targeting
in Network; Enter = beacon drop / node select; screen tap works too.
## M2 (done — emulator-verified)
Implements the sub-net half of the MVP vertical slice (`MVP.md` §1–§3,
validation spec added in this commit) on the shared 320x192 coordinate space:
- **3-room floorplan** (airlock / main corridor / server room) with the
Room2/Room3 blast door (`+`) and the objective terminal `T`.
- **4-node sub-net** pinned to map tiles: AIRLK root (always online) —
JUNC — DOOR_CTRL (on the blast door tile) / HIVE (3 s ICE). Click an
adjacent offline node to route a link: animated dotted line turning
solid over 1.5 s (3.0 s through ICE); offline until the build completes.
- **DOOR_CTRL** (once online) toggles the blast door open/closed — open
doors also un-block LOS/movement for the combat milestone.
- **`X` severs the hovered link** (distance cursor→segment): everything
beyond it drops, ICE progress resets; severing during a trace resets
the trace safely.
- **Red trace**: cracking HIVE spawns a 4 s red pulse back to AIRLK;
arrival = feedback spike → all links drop + 3 s OVERHEAT lockout
(`TEMP` bar). FRENZY/BLIND daemons are gated until a HIVE link is up
(effects land in M4).
- **`R` resets** the scenario instantly to the paused, re-armed state
(`resetScenario()`), which also fixes the AIRLK-root-online bug.
- Boot goes straight into the paused encounter; HUD shows daemon slots,
TEMP bar, and `R: RESET`.
- Emulator host (`emulator/src/main.cpp`): headless testing support —
repeatable `--tap "x,y@frame"` screen-tap injection and repeatable
`--type "text@frame"` scheduled keyboard input.
- Verified headlessly: full route→door→ICE→trace→feedback→cooldown run,
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.