feat(m4): cap map images at Full HD and shrink on import (#85)

The owner fixed the map cap at 1920 px on the long side and 1080 px on the
short side (either orientation). fff-vtt import now shrinks a larger source
with ImageMagick Lanczos before tiling (alpha kept, proportions preserved,
no upscaling), prints `scaled WxH -> WxH`, and records the shrunk w/h; a
source at or below the cap is untouched, so the pixel-identity tests still
hold. A scene row already above the cap is not rewritten: the server logs
`map_above_cap` at startup and serve prints the re-import advice.

Docs: ADR-0023, DESIGN 3.3/5.3/8/11.1/13/14, TESTING 5.3/13, README,
HANDOFF-M4, client README. The M4 phone gate and the fogbench measurement
now use the Full HD maximum; the 16384 px / 262144-cell bench and test rows
stay as labelled server stress references. import-scale now proves a 16384²
input is shrunk to 1080x1080 (289 tiles at 64 px) quickly and bounded.

Part of #63, #85. #77 is blocked by this issue.
This commit is contained in:
2026-11-21 22:37:34 +01:00
parent 52ab50d765
commit a79d809394
22 changed files with 515 additions and 193 deletions
+9 -7
View File
@@ -15,18 +15,20 @@ what exists, what is proven, what is deliberately still open.
both lists, drag with prediction/rollback, GM wall editor, roster/keys/tokens panel, characters/
reveals/who-sees-it. Gates: `devbox run client-test`, `devbox run e2e`.
- **M4 automatable accept gates:** `devbox run e2e` proves join, fog pixels, drag/rollback, reconnect
and the independent player-traffic audit; `results/m4-fog-bench.md` records 50 tokens on a
16384 px map (server move path 0.12-0.14 ms; headless SwiftShader cadence recorded as a floor,
not a phone number). Thickness/height controls are **not** in M4 (ADR-0012); walls round 2 is
#37/#45/#50/#41/#44.
and the independent player-traffic audit; `results/m4-fog-bench.md` records 50 tokens on a Full HD
map (1920x1080, the capped max scene; server move path recorded, headless SwiftShader cadence
recorded as a floor, not a phone number). Map images are capped at Full HD and the import shrinks
larger ones (#85, ADR-0023). Thickness/height controls are **not** in M4 (ADR-0012); walls round 2
is #37/#45/#50/#41/#44.
- **Archived:** the three `prototype-*` trees now live under `docs/archive/prototypes/` (frozen,
not built). One maintained client (`/client`), one server (`/server`).
## Still open
- **#77** - the human real-phone playtest: Note 10 + laptop, 16384 px map, 50 tokens, fog active,
LAN TLS/h2. Its comment is the checklist with commands, numbers to record and pass thresholds.
M4 is accepted only when it passes; `#63` and `#62` close only after #77.
- **#77** - the human real-phone playtest: Note 10 + laptop, Full HD (1920x1080, max scene) map,
50 tokens, fog active, LAN TLS/h2. Its comment is the checklist with commands, numbers to record
and pass thresholds; any image works because the import shrinks it to the cap (#85). M4 is
accepted only when it passes; `#63` and `#62` close only after #77.
- **Playtest tooling (#82, closed with this note):** `?perf=1` in-app fps/frame/JS/token/zoom
overlay (off by default), `fff-vtt import` on a fresh/empty state dir, `devbox run serve --
--image=<file>`, `devbox run seed -- --url=...` for the 50 tokens, and the GM token form's X/Y