M4: cap map images at Full HD (auto-shrink on import) #85
Notifications
Due Date
No due date set.
Blocks
#77 M4: real-phone playtest gate (Note 10, 60 fps)
SirStone/FFF_vtt_frozen
Reference: SirStone/FFF_vtt_frozen#85
Reference in New Issue
Block a user
Part of #63
Owner decision (FIXED, 2026-11-21)
Map images are capped at Full HD: at most 1920 px on the long side and 1080 px on the short side, either orientation. The import shrinks a larger image automatically, keeping proportions, and prints what it did (
scaled 4000×3000 → 1440×1080). Smaller images are imported as-is (no upscaling).Examples:
4000×3000 → 1440×1080,16384×16384 → 1080×1080,1921×1080 → 1920×1079.Reason: a 16384 map meant ~30k tiles at 32 px / minutes / ~1 GB VRAM for a zoomed-out GM. The owner chose the simplest cure over an LOD pyramid.
Acceptance
fff-vtt importresizes with ImageMagick before tiling (Lanczos, alpha kept), sets scenew,hto the shrunk size, and prints the shrink on stdout;--helpdocuments the cap.scene.setcannot setw,h(already true); an existing DB scene above the cap is left alone, with a server-log warning at startup (and a serve console warning when the args lane's file allows it).import-scalenow proves a 16384² input is shrunk fast and memory-bounded.docs/HANDOFF-M4.mdand the #77 checklist updated: any image works, it is shrunk to Full HD; the 16384/64 recipe is gone.Size
S (~1 agent session).
Done on
m4/fullhd, commit43947d1.fff-vtt importshrinks a source above the cap with ImageMagick Lanczos before tiling (alpha kept, no upscaling), printsscaled WxH → WxH, and sets the scenew,hto the shrunk size;--helpdocuments the cap. Sources at/below the cap are untouched, so the pixel-identity tests still pass.tests/tworld.nimpinscappedMapSize/exceedsMapCap.map_above_capat startup andserve(including--dry-run) prints the re-import warning.scene.setstill cannot writew/h.devbox run import-scalenow proves a 16384² input shrinks to 1080×1080 (289 tiles at 64 px): ~12.6 s, peak RSS 303 MiB, 65 fds (results/import-scale.log).Gate:
devbox run testgreen (174 Node tests, 1 skip),client-test183,e2e29/29;import-scalegreen. No mutation run: no core server logic changed beyond the importer's size handling and a startup warning. Kernel watch clean.Landed on main as
a79d809(was pushed to m4/fullhd by mistake). m4/fullhd deleted.