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:
+20
-1
@@ -138,7 +138,10 @@ Source: `docs/archive/prototypes/server-vision/HANDOFF.md` (and README/NOTES wor
|
||||
2. Q2 - Largest map you plan to use (px), and typical wall count per scene? Drives tile size,
|
||||
spatial grid priority and explored chunking. **DEFERRED [FIXED (owner decision), 2026-11-08]:**
|
||||
owner does not know yet. 16384 px map and 5k walls stay [PROPOSED] test targets; revisit with real
|
||||
maps.
|
||||
maps. **Map size RESOLVED 2026-11-21 [FIXED (owner decision), #85]:** images are capped at Full HD
|
||||
(at most 1920 px long side, 1080 px short side) and the import shrinks larger sources; the largest
|
||||
scene is 60x34 cells at cell 32. 5k walls remains a PROPOSED server stress target only. See current
|
||||
3.3, 5.3, 8, 11.1, 13 and ADR-0023.
|
||||
3. Q3 - Multiple scenes in v1 (GM switches the active scene, per-scene explored grids), or exactly
|
||||
one scene per table to start? **RESOLVED [FIXED (owner decision), 2026-11-08]:** exactly one scene
|
||||
in v1; schema may stay `scene_id`-keyed.
|
||||
@@ -885,6 +888,16 @@ supersedes #63's "map import CLI (M6)" Out-of-Scope line for the CLI only; NixOS
|
||||
production vhost and tile-version cleanup stay M6. See current 3.3, 6.1, 11.1, 13 and TESTING 3.3 /
|
||||
10.3.
|
||||
|
||||
Owner also decided 2026-11-21 [FIXED (owner decision), #85]: **map images are capped at Full HD.**
|
||||
The long side is at most 1920 px and the short side at most 1080 px, either orientation; the import
|
||||
shrinks a larger source before tiling (Lanczos, alpha kept, proportions preserved, no upscaling) and
|
||||
records the shrunk `w,h`; `scene.set` still cannot set them, so the importer is the only writer. An
|
||||
existing DB scene above the cap is not rewritten: the server logs `map_above_cap` at startup and
|
||||
`serve` prints the re-import advice. Rationale: a 16384 px map meant ~30k tiles at 32 px, minutes per
|
||||
import and ~1 GB VRAM for a zoomed-out GM; an LOD pyramid was rejected as the more complex cure. The
|
||||
16384 px / 262144-cell bench and test rows become labelled server stress references, not the product
|
||||
target; the phone gate re-runs on the Full HD scene. See current 3.3, 5.3, 8, 11.1, 13 and ADR-0023.
|
||||
|
||||
## D. Superseded statements removed from the current spec
|
||||
|
||||
Each entry quotes the superseded statement (excerpt) and names the surviving rule.
|
||||
@@ -956,3 +969,9 @@ Each entry quotes the superseded statement (excerpt) and names the surviving rul
|
||||
rides the wall row's `FULL` transaction (inserts stay `NORMAL`), because a crash between the
|
||||
two would restore the marker with the new geometry and reveal a position the player never saw.
|
||||
Surviving rules: current §5.8, §8.
|
||||
|
||||
18. **"A 16384 px map is the target" (v0.30 and earlier).** Old: the M4 gate and the bench/tests
|
||||
named a 16384 px map (512x512 cells, 262144 files at 32 px) as the product target. Superseded
|
||||
2026-11-21 (#85): map images are capped at Full HD, the import shrinks larger sources, and the
|
||||
product maximum is 2040 explored cells. The 16384 px rows survive only as labelled server stress
|
||||
references. Surviving rules: current §3.3, §5.3, §8, §11.1, §13 and ADR-0023.
|
||||
|
||||
Reference in New Issue
Block a user