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:
+22
-22
@@ -1,25 +1,25 @@
|
||||
== prototype scene (60 walls, 8 tokens, radius 400, cell 32) ==
|
||||
1 poly (jittered start positions): n=2000 avg=0.013ms worst=0.075ms
|
||||
6 polys (one 6-token party): n=500 avg=0.074ms worst=0.123ms
|
||||
1 poly + cellsTouched (scanline): n=2000 avg=0.019ms worst=0.072ms
|
||||
6 polys + cellsTouched (scanline): n=300 avg=0.172ms worst=0.252ms
|
||||
1 poly + cellsTouchedOld (prototype reference): n=500 avg=0.685ms worst=2.616ms
|
||||
TARGET polygon+cells, prototype scene (prototype baseline 0.451): 0.019 ms vs <= 0.451 ms: PASS
|
||||
== 5k sparse: genScene(world=16384., n=5000, seed=1), avg walls in vision bbox 15.6 ==
|
||||
1 poly, 5k sparse: n=2000 avg=0.035ms worst=0.433ms
|
||||
1 poly + cellsTouched, 5k sparse: n=2000 avg=0.047ms worst=0.451ms
|
||||
1 move check (pathClear, cap-length step), 5k sparse: n=20000 avg=0.007ms worst=0.466ms
|
||||
TARGET polygon, 5k-wall scene: 0.035 ms vs <= 1.0 ms: PASS
|
||||
== 5k dense: genScene(world=4096., n=5000, seed=1), avg walls in vision bbox 206.9 ==
|
||||
1 poly, 5k dense: n=2000 avg=0.747ms worst=1.900ms
|
||||
1 poly + cellsTouched, 5k dense: n=2000 avg=0.811ms worst=1.614ms
|
||||
1 move check (pathClear, cap-length step), 5k dense: n=20000 avg=0.008ms worst=0.042ms
|
||||
== egress (#28: 6 players x 40 encountered entries, 262144 explored cells) ==
|
||||
GM egress pass (fresh diff base): n=200 avg=0.423ms worst=1.106ms
|
||||
player egress pass (fresh diff base): n=200 avg=0.109ms worst=0.214ms
|
||||
1 poly (jittered start positions): n=2000 avg=0.020ms worst=0.873ms
|
||||
6 polys (one 6-token party): n=500 avg=0.160ms worst=7.235ms
|
||||
1 poly + cellsTouched (scanline): n=2000 avg=0.034ms worst=1.181ms
|
||||
6 polys + cellsTouched (scanline): n=300 avg=0.187ms worst=0.349ms
|
||||
1 poly + cellsTouchedOld (prototype reference): n=500 avg=0.849ms worst=2.251ms
|
||||
TARGET polygon+cells, prototype scene (prototype baseline 0.451): 0.034 ms vs <= 0.451 ms: PASS
|
||||
== 5k sparse (stress): genScene(world=16384., n=5000, seed=1), avg walls in vision bbox 15.6 ==
|
||||
1 poly, 5k sparse (stress): n=2000 avg=0.058ms worst=0.197ms
|
||||
1 poly + cellsTouched, 5k sparse (stress): n=2000 avg=0.061ms worst=0.169ms
|
||||
1 move check (pathClear, cap-length step), 5k sparse (stress): n=20000 avg=0.009ms worst=0.245ms
|
||||
TARGET polygon, 5k-wall stress scene: 0.058 ms vs <= 1.0 ms: PASS
|
||||
== 5k dense (stress): genScene(world=4096., n=5000, seed=1), avg walls in vision bbox 206.9 ==
|
||||
1 poly, 5k dense (stress): n=2000 avg=1.409ms worst=17.788ms
|
||||
1 poly + cellsTouched, 5k dense (stress): n=2000 avg=1.712ms worst=16.250ms
|
||||
1 move check (pathClear, cap-length step), 5k dense (stress): n=20000 avg=0.013ms worst=4.333ms
|
||||
== egress (#28 stress: 6 players x 40 encountered entries, 262144 explored cells) ==
|
||||
GM egress pass (fresh diff base): n=200 avg=0.586ms worst=1.199ms
|
||||
player egress pass (fresh diff base): n=200 avg=0.188ms worst=2.470ms
|
||||
== tile gate (#65): old SQL-under-lock path vs published snapshot ==
|
||||
tile gate old: parse + SHA-256 + session JOIN + HashSet: n=2000 avg=0.012ms worst=0.023ms
|
||||
tile gate new: parse + SHA-256 + cache lookup + bitmap: n=2000 avg=0.002ms worst=0.024ms
|
||||
explored snapshot build (262144 cells): n=20 avg=3.472ms worst=3.852ms
|
||||
explored incremental mark (16 fresh cells): n=5000 avg=0.001ms worst=0.011ms
|
||||
tile gate old: parse + SHA-256 + session JOIN + HashSet: n=2000 avg=0.014ms worst=0.582ms
|
||||
tile gate new: parse + SHA-256 + cache lookup + bitmap: n=2000 avg=0.001ms worst=0.013ms
|
||||
explored snapshot build (262144 cells): n=20 avg=3.606ms worst=4.623ms
|
||||
explored incremental mark (16 fresh cells): n=5000 avg=0.002ms worst=0.765ms
|
||||
(sink 24393102)
|
||||
|
||||
Reference in New Issue
Block a user