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
+20 -1
View File
@@ -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.
+40 -16
View File
@@ -304,6 +304,12 @@ Notes:
- A second consequence: map art itself may depict walls/doors. Art is "what players see once there",
walls data is "what physics/vision uses". Authoring must keep them consistent; mismatch is GM
error, not a leak.
- **Map size is capped at Full HD [FIXED (owner decision), 2026-11-21, #85].** An imported map image
is at most 1920 px on the long side and 1080 px on the short side, either orientation. The importer
shrinks a larger source before tiling (Lanczos, alpha kept, proportions preserved) and the scene
`w,h` become the shrunk size; smaller images are imported as-is. The largest scene is therefore
60x34 explored cells at cell 32, which bounds the tile tree, the fog texture and the explored
bitmaps (ADR-0023, §8, §11.1, §13).
- Tile URLs include the scene's `art_version` so that re-imported art does not hit stale caches
[FIXED, owner decision 2026-11-14, #7]: from M3 on, always `1` in M3. The gate reads
`<state>/tiles/<scene>/v<art_version>/` (layout fixed in M3; writing versions is the import CLI of
@@ -528,8 +534,9 @@ explored_chunk(player_id, scene_id, cx, cy, bits BLOB, PRIMARY KEY(player_id, sc
- Prototype stores one row per explored cell (`exp(role, c)`, one INSERT per new cell,
`HANDOFF.md`); the real build stores **chunked bitmaps** [FIXED (owner-delegated, 2026-11-15,
#21)]: a chunk is 64x64 cells = 512 B, upserted per mutation and only when the mutation dirtied
it. Sizes: 4096 px map / 32 px cell = 16 384 cells = 2 KB (2x2 chunks); 16384 px map = 262 144
cells = 32 KB (8x8 chunks). The measured write cost and the pinning tests: TESTING §4.4.
it. Sizes: the seeded 4096 px map / 32 px cell = 16 384 cells = 2 KB (2x2 chunks); the largest
scene, Full HD / 32 px cell = 60x34 = 2040 cells (one chunk, 512 B) [FIXED (owner decision),
2026-11-21, #85]. The measured write cost and the pinning tests: TESTING §4.4.
- Entity move = one UPSERT of x,y (prototype: `INSERT OR REPLACE INTO tok`).
- Migrations: `PRAGMA user_version` + forward-only migration list; startup refuses to run on a newer
DB [PROPOSED]. Detail [FIXED (owner-delegated, 2026-11-14, #16)]: `schema_migration(version
@@ -573,8 +580,8 @@ explored_chunk(player_id, scene_id, cx, cy, bits BLOB, PRIMARY KEY(player_id, sc
row-major inside the chunk, least-significant bit first (cell `(cx, cy)` is bit `(cy mod 64) * 64
+ (cx mod 64)`, byte `bit div 8`, mask `1 shl (bit mod 8)`). Cells outside the scene stay 0, so a
map whose cell count is not a multiple of 64 needs no special case; the v1 scene is 128x128 cells
= 2x2 chunks, a 16384 px map 8x8. Both FKs cascade, so `player.remove` and a scene delete take the
explored rows with them. The layout is pinned by tests (TESTING §4.4), so a refactor cannot
= 2x2 chunks, the largest Full HD scene is one chunk (#85). Both FKs cascade, so `player.remove`
and a scene delete take the explored rows with them. The layout is pinned by tests (TESTING §4.4), so a refactor cannot
silently swap axes or bit order.
- Step 6 (`token details`) [FIXED (owner-delegated, 2026-11-15, #22)]: adds `entity.props_public`,
`props_owner`, `props_gm` (`TEXT NOT NULL DEFAULT '{}'`: one JSON object per visibility bucket)
@@ -747,6 +754,10 @@ Targets and accepted decisions. The measured table and the bench scenes are in T
fan, never in per-viewer geometry.
- **Load/perf regression gate:** the bench and concurrency numbers are compared with committed
baselines; fail on > 2x regression [PROPOSED]. Numbers and method: TESTING §5.3.
- **Map size bound [FIXED (owner decision), 2026-11-21, #85]:** the product maximum is Full HD
(1920x1080), so the largest explored set is 2040 cells at cell 32. The 16384 px and 262144-cell
bench rows are kept only as labelled server stress references, never as the product target
(ADR-0023).
### 5.4 Known limitations (carry forward)
- Token exactly on a wall cannot move off it: `moveBlocked` counts any touch as a hit, so every move
@@ -2029,7 +2040,9 @@ exposure later leaks at most about the wall count (accepted). Rejected: dense id
broadcast (in-flight intents hit the wrong wall); game-wide wall counter (per-scene ids keep scene
copy/export stable).
- **Scene** (exactly one in v1, Q3): `id, name, w, h` (px), `tile_size` (32 default =
- **Scene** (exactly one in v1, Q3): `id, name, w, h` (px; at most 1920 on the long side and 1080 on
the short side [FIXED (owner decision), 2026-11-21, #85]: the importer shrinks larger images, and
`scene.set` cannot write `w`/`h` at all, 6.1), `tile_size` (32 default =
`explored_cell` [FIXED, Q4]; 64 is the per-scene fallback), `explored_cell` (32 default;
`tile_size % cell == 0` required, prototype assumes it silently), `grid_size`,
`vision_radius_default`, `token_radius_default` (px, > 0, no upper cap [FIXED, #4]),
@@ -2273,13 +2286,20 @@ See TESTING §10.4 (Node 26 black-box harnesses, built-ins only, `devbox run tes
the world origin and names are the gate's `<x>_<y>.png` (3.3). `art_version` grows on a re-import
for a scene that already has art, so browsers never serve a stale cached tile; older versions stay
on disk (cleanup remains M6). `--tile-size` defaults to the scene's current tile size and must be a
positive multiple of the explored cell, so 64 px is the designed fallback. The state-dir lock of
positive multiple of the explored cell (64 px is a common larger choice; with the Full HD cap 32 px
is only 2040 tiles). The state-dir lock of
3.2/11.1 is taken (a live server refuses the import, exit 3): the server reads the scene at startup
(4.1), so the operator stops it, imports and restarts. Invalid input, an unsupported/multi-frame
image, a scene other than the one v1 scene, a bad tile size, a missing/unreadable state dir or DB
and a held lock all exit non-zero with a message and write nothing. Decoding is ImageMagick from
and a held lock all exit non-zero with a message and write nothing. **Map images are capped at
Full HD [FIXED (owner decision), 2026-11-21, #85]:** a source larger than 1920 px on the long side
or 1080 px on the short side is shrunk with ImageMagick's Lanczos filter (alpha kept, proportions
preserved) before tiling, the shrink is printed (`scaled 4000x3000 -> 1440x1080`), and the scene
row gets the shrunk size; a smaller source is imported as-is and is never upscaled (ADR-0023). An
existing DB scene above the cap is not rewritten: the server logs a `map_above_cap` warning at
startup and `serve` prints the re-import advice. Decoding is ImageMagick from
the root devbox (`imagemagick`); it is run with `-limit memory 256MiB -limit map 512MiB` so its
pixel cache is disk-backed and a 16384 px source stays memory-sane. No Nim/npm image dependency is
pixel cache is disk-backed and a huge source stays memory-sane. No Nim/npm image dependency is
added, the FIXED stack (2) is unchanged, and the archived prototype's deterministic
`docs/archive/prototypes/server-vision/tools/genmap.mjs` fixture generator is not reused. Browser
upload is post-v1; CLI-only import in v1 (Q5 FIXED).
@@ -2356,18 +2376,19 @@ columns with today's defaults) lands complete now, so the later build needs no m
`docs/archive/prototypes/` (Q24). Thickness and height controls are not in M4 (build order above;
5.7, 5.10).
- **Map import CLI** [FIXED (owner-delegated), 2026-11-21, #79; moved here from M6]: the designed
offline importer of 11.1 is built in M4 because the gate needs a 16384 px tiled scene and
`scene.set` cannot set `w`, `h`, `tile_size`, `cell` or `art_version` (6.1).
offline importer of 11.1 is built in M4 because the gate needs a tiled scene and `scene.set`
cannot set `w`, `h`, `tile_size`, `cell` or `art_version` (6.1). Images are capped at Full HD
and larger ones are shrunk on import [FIXED (owner decision), 2026-11-21, #85].
- Accept: headless e2e (fog pixel checks, player traffic audit clean, reconnect restores) - met by
`devbox run e2e` including `client/e2e/audit.test.mjs`; the manual run on laptop and Note 10 at
60 fps with 50 tokens on a 16384 px tiled map (test target PROPOSED, Q2) with fog active is
#77, the one `ready-for-human` step, and M4 accept is met only when it passes.
60 fps (the 60 fps target is PROPOSED) with 50 tokens on a Full HD map (max scene, 1920x1080)
with fog active is #77, the one `ready-for-human` step, and M4 accept is met only when it passes.
- Tile-size gates [FIXED, Q4]: (a) automated headless-Chromium test (mobile emulation, real server
path): viewport fills in < 1 s at zoom 1 - met in `client/e2e/map.test.mjs`; (b) one manual run
on the owner's 5-year-old Android phone - #77. If either fails: `tile_size` 64 px (per-scene
config, no code change). Harness detail and the prototype-run caveat: TESTING §13.
- Build evidence (#76): `results/m4-fog-bench.md` (50 tokens / 16384 px: server move path
0.119 ms; headless SwiftShader cadence recorded, explicitly not a phone number),
- Build evidence (#76): `results/m4-fog-bench.md` (50 tokens / Full HD max scene: server move path
recorded; headless SwiftShader cadence recorded, explicitly not a phone number),
`results/bench.log`, `results/mutation.log`, `results/nimble-test.log`, and the
`devbox run test | client-test | e2e` logs (regenerated, not committed).
- **M5 - Robustness and observability.** SIGTERM handler, bounded metrics and SLOW lines, per-client
@@ -2403,8 +2424,10 @@ owner may overturn. The full Q1-Q24 decision log is in [`docs/DESIGN-history.md`
### Open questions
- **Q2, map size and wall count.** The owner does not know yet; a 16384 px map and 5k walls are
PROPOSED test targets (5.3, 13). Revisit with real maps.
- **Q2, map size and wall count.** Map size is settled: images are capped at Full HD (1920x1080)
[FIXED (owner decision), 2026-11-21, #85; ADR-0023], so the largest scene is 60x34 cells at cell
32. The wall count is still unknown; 5k walls remains a PROPOSED server stress target (5.3, 13),
not the product scene. Revisit with real maps.
- **Q8, table conveniences after v1.** Order decided at M7.
- **Q19, where FFF runs.** Hidden state is settled (no state beyond the three buckets and
`gm_only`); engine language, runtime and location are not. Options in 9.
@@ -2454,3 +2477,4 @@ the section here that it constrains.
| [0020](adr/0020-characters-separate-from-tokens.md) | Characters are records separate from tokens | 8 | #14, #23 |
| [0021](adr/0021-one-global-lock-v1.md) | One global lock in v1; persistence stays inside it | 4.2, 4.3 | #13 |
| [0022](adr/0022-synchronous-normal-full-authoring.md) | `synchronous=NORMAL`, `FULL` around GM authoring | 4.4 | Q12 |
| [0023](adr/0023-full-hd-map-cap.md) | Map images are capped at Full HD; the import shrinks larger ones | 3.3, 5.3, 8, 11.1, 13 | #85, #63, #77 |
+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
+20 -11
View File
@@ -159,8 +159,8 @@ built against glibc 2.44 while this host (NixOS) runs 2.42, so a 2.44-built `lib
- Chunked explored, measured cost of one mutation-scale write (BEGIN; 512 B upsert; COMMIT): avg
0.015 ms, p99 0.035 ms (DESIGN §4.3's accepted commit tail is ~20 ms), and a real move's ack stays at
avg 0.7 ms / p99 1-2 ms with explored writes on (`tests/texplored.nim`, `tools/persistence.test.mjs`).
Sizes: 4096 px map / 32 px cell = 16 384 cells = 2 KB (2x2 chunks); 16384 px map = 262 144 cells =
32 KB (8x8 chunks).
Sizes: the seeded 4096 px map / 32 px cell = 16 384 cells = 2 KB (2x2 chunks); the largest Full HD
scene (60x34 cells) is one 512 B chunk (#85).
- The chunk layout is pinned by `tests/texplored.nim` (exact byte/bit positions) and re-read
independently by `tools/persistence.test.mjs`, so a refactor cannot silently swap axes or bit order.
- Seeding the scene in migration step 3 keeps it identical on every start and lets the migration test
@@ -211,10 +211,14 @@ built against glibc 2.44 while this host (NixOS) runs 2.42, so a 2.44-built `lib
implementation [PROPOSED; built in M2].
- The prototype scene the table measures has 60 walls and 8 tokens, so its numbers say nothing about
big maps; the 5k bench scenes below are the answer.
- Bench scenes (`tools/scenegen.nim`): the 5k target is the sparse primary layout
`genScene(16384, 5000, 1)`: 0.082 ms avg [MEASURED, `results/bench.log`]. The dense layout
`genScene(4096, 5000, 1)` is a stress reference (1.28 ms avg, ~207 walls in the vision bbox)
[MEASURED]; the uniform spatial grid is revisited if real maps approach that density.
- **Product maximum [FIXED (owner decision), 2026-11-21, #85]:** map images are capped at Full HD,
so the largest scene is 1920x1080 (60x34 cells at cell 32). The fog measurement and the M4 phone
gate use that maximum; numbers below at 16384 px / 262144 cells are labelled **server stress**,
not the product target.
- Bench scenes (`tools/scenegen.nim`): the sparse **stress** layout `genScene(16384, 5000, 1)`:
0.058 ms avg [MEASURED, `results/bench.log`]. The dense layout `genScene(4096, 5000, 1)` is also a
stress reference (1.409 ms avg, ~207 walls in the vision bbox) [MEASURED]; the uniform spatial
grid is revisited if real maps approach that density.
- **Thickness cost** [#43, DESIGN §5.10]: a thick body is a quad, and the fan costs about 10x on a dense
scene (13.2 ms vs 1.25 ms baseline on the 5k dense layout; 0.26 ms per polygon, 3.15x, on the 5k
sparse one). The owner accepted that and re-baselined the per-move budget [FIXED (owner decision),
@@ -230,7 +234,8 @@ built against glibc 2.44 while this host (NixOS) runs 2.42, so a 2.44-built `lib
a per-pass mean; the #28 shape measured 0.79 ms GM / 0.32 ms player on the reference build, 0.5-1.7 ms
in the debug suite depending on CPU clocks). The gate allows a documented 2x around each budget
(20 us, 4 ms) for a saturated box. The load-insensitive explored-size invariant
`smallMs <= gmMs*3 + 0.5` (16384 vs 262144 cells) is kept on minima. Absolute averages are
`smallMs <= gmMs*3 + 0.5` (synthetic 16384 vs 262144 cells; the Full HD product maximum is 2040
cells, #85) is kept on minima. Absolute averages are
*recorded*, not asserted, by `devbox run bench` (`results/bench.log`: GM egress pass 0.24 ms,
player 0.08 ms, release build).
@@ -642,8 +647,9 @@ from the prototype, what was missing, what the M3 build added, and the tools it
keeps holding.
- `devbox run test` = Nim tests first, then Node harnesses. `devbox run client-test` = the client's
Vitest seam (pure reducer, protocol client, envelope); `devbox run e2e` = the built client through
the real server and vhost; `devbox run fogbench` = the 50-token 16384 px server measurement
(`results/m4-fog-bench.log`). The finish gate (#76) runs all of them plus `mutation` and `bench`.
the real server and vhost; `devbox run fogbench` = the 50-token Full HD (1920x1080, the max scene)
server measurement (`results/m4-fog-bench.log`). The finish gate (#76) runs all of them plus
`mutation` and `bench`.
Both suites fan out files at `FFF_TEST_JOBS` (see "How to run"); no file is serialised for
correctness, only the wall-clock gate files are run alone so their budgets stay meaningful.
- The nine M3 accept groups and their proving harness tests are mapped in `tools/groups.mjs`;
@@ -716,8 +722,11 @@ from the prototype, what was missing, what the M3 build added, and the tools it
control + 80 mutations each failing at least its expected test, `devbox run bench` PASS and
`devbox run fogbench` PASS. Evidence: `results/nimble-test.log`, `results/mutation.log`,
`results/bench.log`, `results/m4-fog-bench.md` (+ `.log`); the e2e/client logs are regenerated
per run and not committed. The manual Note 10 + laptop 60 fps run is **#77** and is the only
open M4 accept item: M4 is accepted after it passes, not before. Mutation housekeeping found
per run and not committed. The phone gate's scene is the Full HD maximum (1920x1080) [FIXED
(owner decision), 2026-11-21, #85]; the fog-update test's 4096 px / 128x128-cell scene is a
synthetic correctness/stress fixture above the cap, not the product target. The manual Note 10 +
laptop 60 fps run is **#77** and is the only open M4 accept item: M4 is accepted after it passes,
not before. Mutation housekeeping found
here: `c1`/`c2` still patched the pre-#65 tile-gate expression and had silently become `sed`
no-ops; both now patch `cy * sc.cols + cx in explored` and fail the tile gate group again.
- **M4 gate harness.** (a) automated headless-Chromium test with mobile emulation (viewport, dpr, CPU
+39
View File
@@ -0,0 +1,39 @@
# Map images are capped at Full HD; the import shrinks larger ones
A map image is at most 1920 px on its long side and 1080 px on its short side, either orientation.
`fff-vtt import` shrinks a larger source automatically with ImageMagick (Lanczos, alpha kept,
proportions preserved) before tiling, prints what it did (`scaled 4000×3000 → 1440×1080`), and writes
the shrunk size into the scene row. A source at or below the cap is imported as-is; nothing is ever
upscaled. Examples: `4000×3000 → 1440×1080`, `16384×16384 → 1080×1080`.
An existing database scene above the cap is left untouched: the server logs a `map_above_cap` warning
at startup and `devbox run serve` prints the same warning, so the operator re-imports rather than the
server rewriting authored data. `scene.set` cannot set `w`/`h` at all (DESIGN 6.1), so the importer is
the only writer and the cap is enforced exactly where dimensions enter the system.
## Status
accepted — FIXED owner decision, 2026-11-21
## Alternatives
- An LOD pyramid (a few downscaled zoom levels): rejected, much more importer, storage and client
work for a table that only ever views one map at a time.
- Cap only the tile count or refuse oversized images: rejected, the owner wants any image to work;
shrinking keeps the ordinary "drop in a battle map" flow.
- Shrink at serve time or in the client: rejected, the server would decode and resize per request or
per start, and clients would receive the full-size bytes first.
- Keep 16384 px as the target: rejected, ~30k tiles at 32 px, minutes per import and ~1 GB VRAM for a
zoomed-out GM.
## Consequences
The largest scene is 60×34 explored cells at cell 32 (2040 cells), so tiled art, the fog texture and
the explored bitmaps are bounded by construction. The old 16384 px and 262144-cell rows in
`tools/bench.nim` and `tests/tviews.nim` remain synthetic server stress references, labelled as such,
not the product target. The importer still streams the slice: a huge input is shrunk first, so the
65k-tile path cannot be reached from a bigger source. A 16384² input now costs one bounded resize plus
at most 2040 tiles at 32 px (or 289 at 64 px) instead of 30k-65k tiles.
## Tickets
#85; #63 (decision), #77 (phone gate re-runs on the Full HD map), #83 (streamed import).
## Spec
Current §3.3, §8, §11.1, §13.