5.0 KiB
5.0 KiB
Frozen
Status: frozen 2026-11-22 at fda8362 (the M4 code tree, #64-#89). No further work is planned
in this repository; it is an archive. The freeze commit that adds this file is tagged
frozen-2026-11-22. A new project starts elsewhere with a fresh plan built around playability and
may borrow from this tree.
Why
The owner ran a real playtest and found the project not usable as a play tool. The build put fog/leak safety first and playability second: gated tiles, 403s, leakcheck, mutation testing and evidence over the experience of running a table. Examples of the gap:
- tokens are placed by typing X/Y coordinates, not by pointing at the map;
- new tokens are blind by default, so a GM must remember to switch vision on;
- GM UI gaps tracked in #81: token↔character link, prop editor, scene settings, player rename;
- the test flow is heavy for what the change was (mutation runs, evidence maps, e2e stacks).
State at freeze
- M4 built; #64-#89 closed. Server:
proto2, 29 intents, one scene, thin walls with the 5.8 switches, doors/secret/locked, windows, one-way, per-player vision + explored, lock-free tile gate. Client: Vite + TS + PixiJS v8. - #77 (real-phone playtest) open and not passed; its acceptance never happened.
- #63, #62 open.
- #81 (GM UI gaps)
needs-triage. - M5 (robustness) and M6 (NixOS deployment) were not built.
Worth borrowing
Paths are relative to the repo root; the modules below are self-contained and were read at freeze.
| What | Path | What it does |
|---|---|---|
| Wall/sight geometry + vision | server/geometry.nim |
Visibility polygon cast from a point against wall segments, one-way sightDir, radial-wall handling; pure Nim, stdlib only. |
| Vision and explored state | server/vision.nim |
Per-player union of token visibility polygons, radius from token or scene, open doors don't block; monotonic explored cells. |
| Explored persistence | server/explored.nim |
Chunked 64x64-cell bitmaps, one row per (player, scene, chunk), writes only dirty chunks. |
| Move rules + status | server/moverules.nim |
Swept-circle move check, token-on-wall escape rule, step cap, stuck/squeezed status from the walls source. |
| Record↔geometry adapters | server/worldmap.nim |
One place that turns stored wall/token records into the pure inputs of the two modules above. |
| Full HD import | server/importer.nim |
Offline slice of a source image into tiles, shrink to 1920x1080 cap, art_version bump. ADR-0023 (docs/adr/0023-full-hd-map-cap.md). |
| LAN TLS/h2 serve | tools/serve.sh, tools/serve.mjs, tools/lanserve.mjs |
One command: build client + server, mint a long-lived TLS cert for the LAN SAN, nginx on the LAN address in front of the loopback server, persistent state, print URL/GM key/trust steps. |
| Test nginx vhost | tools/nginx.mjs, tools/tlsdev.mjs |
Generated vhost for /, /join, /tiles/, internal /_tiles/, /ws, TLS + HTTP/2, healthz. |
| Parallel test harness | tools/test.sh, tools/jobs.sh |
Half-cores-capped job count, one process per test file, wall-clock-sensitive tests serialised; client/e2e/run.sh reuses the same jobs helper. |
| Group/evidence map | tools/groups.mjs, tools/evidence.mjs |
Named acceptance groups → the exact test body, checked statically and against the reporter output (no skips). |
| Mutation check | tools/mutation.sh |
One mutation at a time on a temp copy, every mutation must fail a named test. |
| Leak checker | tools/leakcheck.nim, tools/leak.mjs |
Replays a player transcript and recomputes the view from GM truth (independent oracles for polygons and explored). |
| Single egress | server/views.nim |
Typed GmView/PlayerView built before frames; raw records have no serializer. |
| Protocol shell | server/protocol.nim |
Frame catalogue, envelope rules, intent rate limiter, malformed-frame window. |
| Tile client loading | client/src/tiles.ts |
Concurrency cap, centre-out wanted list, no duplicate fetch, 403 = permanent denied, 404/5xx = bounded backoff, drop off-screen queued tiles. |
| Camera / tile window | client/src/viewport.ts |
Pure camera, pan, anchored zoom, tile-window maths; no Pixi or DOM. |
| Wall editor rules | client/src/wallEditor.ts |
Presets and derived kinds, validation, snapping, one-way arrow, undo; pure. |
| State slices + reducer | client/src/slices/, client/src/reducer.ts |
Per-feature reducers fed by wire frames, unit-tested without a browser. |
Lessons for the next project
- Start from one real evening of play. Build the smallest thing that runs a table, play it, then grow it. Play early, and repeatedly.
- Fog safety is a constraint, not the centre. Keep it provable, but budget most of the effort on what the GM and players do at the table.
- Keep tests light and sized to the change: one focused suite that fails for the right reason beats a gate stack nobody wants to run.
- Full HD maps are enough. The cap (ADR-0023) cost nothing and removed a whole class of problems.
- The phone UI must be simple: direct manipulation over forms and typed coordinates.