Prototype: sight polygon with thickness and height #43
Notifications
Due Date
No due date set.
Blocks
Depends on
#44 Low walls: sight and movement
SirStone/FFF_vtt_frozen
#45 Thick walls: sight and movement
SirStone/FFF_vtt_frozen
#39 Research: sight with thick and low walls
SirStone/FFF_vtt_frozen
#41 Height model: tokens, eyes and units
SirStone/FFF_vtt_frozen
Reference: SirStone/FFF_vtt_frozen#43
Reference in New Issue
Block a user
Part of #38
Question
What does sight actually look like with thick and low walls in our polygon code? A throwaway rough implementation to react to (pictures/ASCII of polygons, explored cells, cost).
Input from #42 (DESIGN 5.8)
Filter the sight input before the geometry: a wall enters the polygon only with
blocks_sighton, a one-way wall only for the blocked side, and an open door never. Aterrainwall must produce no polygon change at all. Prototype the shapes of thickness (#45) and height (#44); no kind logic belongs in the geometry.Owner reactions (2026-11-15)
Findings per scenario (pictures in
index.html)d = s·h_eye/(h_eye − h_wall)behind the wall. No single polygon is statically right: strict = visible token on a fogged tile, permissive = fog over floor nobody sees.blocks_sight:falsecosts exactly zero geometry (identical 64-vertex polygon, identical explored set), thickness and height included.Cost (avg ms per polygon, radius 400, cell 32, 2000 iters)
Hoisted quad is 0.26 ms on 5k sparse — inside the old 1 ms target; 12.7 ms on 5k dense, which the owner accepted. The 5.8 filter costs +0.15 ms per polygon at 5k walls (2.8× the sparse baseline ≈ 0.9 ms for a 6-token party). The 3-face silhouette is observer-dependent and can never be hoisted; the 4-face quad can.
Downstream suggestions (passed on, not fixed here — #44/#45/#47/#49 own them)
wall.*/door.set) instead of filtering per query; only the one-way decision stays per observer (cheap per-wall test on the pre-built list, or two pre-built lists).leftwall sees nothing across); it needs one clarifying sentence wherever it is fixed.Artifact
Branch
prototype/wall-sight(pushed, never merged, no PR):https://git.fossellini.top/SirStone/FFF_vtt/src/branch/prototype/wall-sight/prototype-wall-sight/index.html
index.html(findings),cost.txt(raw bench),sightmodel.nim(5.8 filter + thickness expansion + height predicate, wrappingserver/geometry.nim),pictures.nim(six SVG scenarios),bench_thick.nim.server/untouched; nothing folded back.