feat(walls): one-way sight per-viewer filter and ONEWAY fault (#58)
The vision fan blocks a sight-blocking one-way wall only for a viewer on its blind side (sight_dir names it; left is the (-dy,dx) normal of a->b), one sign test inline after the radius cull, so the hoisted wall list stays viewer-independent. Movement never reads the direction: one-way walls block both ways. Explored and tiles therefore differ by side and only ever grow. - geometry: WallDir + Wall.sightDir + blindTo, filter in visibilityPolygon. - worldmap: sight_dir mapping (movement mapping unchanged). - vision: the ONEWAY leak-fault build drops sight_dir player-side. - leakcheck: own side test for the fan and the clear-segment oracle; ONEWAY class detected against the sight_dir-dropped fan. - leak scenario gains a one-way wall the subject sees across; fault test asserts exactly ONEWAY. - oneway.test.mjs: both sides, tile sweep with its own oracle, flip with fixed endpoints, monotone explored/tiles, restart, two-way movement. - docs: DESIGN 5.8 mechanism sentence corrected; TESTING #58 markers built. - nginx harness: temp dirs created recursively (restart on one state dir).
This commit is contained in:
+6
-4
@@ -1115,16 +1115,18 @@ What a wall's behaviour is made of. Heights are 5.7; what a low wall does to sig
|
||||
marker carries no type).
|
||||
- **What a one-way wall does to the floor [FIXED (owner decision), 2026-11-16, #47].** Explored
|
||||
cells and tiles differ per side **by construction, not by a new mechanism**: each viewer's sight
|
||||
wall list drops the one-way walls whose blind side that viewer stands on, so polygon,
|
||||
`cellsTouched`, explored and therefore tiles differ between the two sides with no extra state.
|
||||
wall list drops every one-way wall the viewer sees across (the viewer is not on its blind side),
|
||||
so polygon, `cellsTouched`, explored and therefore tiles differ between the two sides with no
|
||||
extra state.
|
||||
Explored only grows (5.4), so flipping the direction or `a`/`b` never un-explores a cell and never
|
||||
revokes a tile; a flip only widens what the newly-seeing side may explore next. Movement is
|
||||
two-way (above). With a low wall the direction filters first, then 5.9/5.10 evaluate every crossed
|
||||
face of the walls that remain.
|
||||
- **Per-viewer filter [FIXED (owner-delegated), 2026-11-16, #47].** Nothing per-viewer is stored or
|
||||
copied: the 5.10 quad faces stay hoisted and viewer-independent, and the fan skips a
|
||||
sight-blocking wall inline when it is one-way and the viewer is on its blind side — one sign test
|
||||
per **one-way** wall per viewer (cross product with `(-dy, dx)`), after the radius-bbox cull;
|
||||
sight-blocking one-way wall inline for a viewer on the seeing side (it blocks only a viewer on its
|
||||
blind side) — one sign test per **one-way** wall per viewer (cross product with `(-dy, dx)`),
|
||||
after the radius-bbox cull;
|
||||
two-way walls pay only a type check. Rejected: a per-viewer copy of the wall list (the prototype
|
||||
measured ~0.15 ms per viewer per frame for the copy, times tokens) and two prebuilt left/right
|
||||
lists (choosing between them needs the same per-viewer side test, and they duplicate the list).
|
||||
|
||||
Reference in New Issue
Block a user