Windows and one-way walls #47

Closed
opened 2026-11-15 15:48:54 +01:00 by SirStone · 3 comments
Owner

Part of #38

Question

What do windows and one-way walls do to sight, explored cells, tiles and movement, and which side is which?

Fixed by #42 (DESIGN 5.8)

  • One-way is a direction on the sight switch, never a kind: sight_dir is both|left|right, read on the wall's a -> b order, and it blocks sight from one side only. Movement stays two-way, governed by blocks_movement.
  • A one-way wall is evaluated per observer: the sight wall list differs per viewer. Nothing about it may be shared state on the wire, and nothing is (walls never reach players).
  • window has no rule yet. The switches can express the Fantasy Grounds/Roll20 window (door + blocks_sight:false + blocks_movement:true: look through it closed, open it to pass) but not Foundry's distance-limited wall.

Question (narrowed)

One-way: which side is blocked by the left convention of 5.8, what happens to explored cells and tiles for the side that cannot see through, and how does the editor show the direction (arrow, triangles)? Window: is it the see-through door (a preset over door settings) or a distance rule (a new switch, cost from #39), and what does it do closed and open?

Input from #44 (DESIGN 5.9, decided)

  • The low-wall hidden band settles its explored/tile half: band cells are oracle-maybe, no band cell or tile is sent, and a visible token may float on black. Only the one-way side-change on explored/tiles is left here.
  • A one-way low wall: direction decides whether the wall is crossed at all, because the predicate runs over the viewer's filtered sight list (5.8); the clearance comparison then applies only to viewers it blocks.
  • The GM who-sees-it view is GM data only, so it cannot show direction or any wall fact to a player.

Input from #45 (DESIGN 5.10, decided)

  • position (where a thick wall's body sits) uses the same left/right pair as sight_dir: left is the (-dy, dx) normal of a -> b. Which side the editor offers first and how it draws the direction arrow stay here, so both fields keep one convention.
  • A one-way wall's own body on the side that sees across is still open (5.10 defers it): does that side see the body's floor, and does the blocked side? Normally a body is opaque floor — no player polygon, no newly explored cell, no tile.
  • A thick low one-way wall composes: direction decides whether the wall is crossed at all (the viewer-filtered sight list, 5.8), then see-over evaluates every crossed face of the rectangle (5.10), strictly.
  • Zero thickness is exactly today: the body degenerates to the segment, so no rule here may depend on thickness.
Part of #38 ## Question What do windows and one-way walls do to sight, explored cells, tiles and movement, and which side is which? ## Fixed by #42 (DESIGN 5.8) - One-way is a **direction on the sight switch**, never a kind: `sight_dir` is `both|left|right`, read on the wall's `a -> b` order, and it blocks sight from one side only. Movement stays two-way, governed by `blocks_movement`. - A one-way wall is evaluated per observer: the sight wall list differs per viewer. Nothing about it may be shared state on the wire, and nothing is (walls never reach players). - `window` has no rule yet. The switches *can* express the Fantasy Grounds/Roll20 window (door + `blocks_sight:false` + `blocks_movement:true`: look through it closed, open it to pass) but not Foundry's distance-limited wall. ## Question (narrowed) One-way: which side is blocked by the `left` convention of 5.8, what happens to explored cells and tiles for the side that cannot see through, and how does the editor show the direction (arrow, triangles)? Window: is it the see-through door (a preset over door settings) or a distance rule (a new switch, cost from #39), and what does it do closed and open? ## Input from #44 (DESIGN 5.9, decided) - The low-wall hidden band settles its explored/tile half: band cells are oracle-*maybe*, no band cell or tile is sent, and a visible token may float on black. Only the one-way side-change on explored/tiles is left here. - A one-way **low** wall: direction decides whether the wall is crossed at all, because the predicate runs over the viewer's filtered sight list (5.8); the clearance comparison then applies only to viewers it blocks. - The GM who-sees-it view is GM data only, so it cannot show direction or any wall fact to a player. ## Input from #45 (DESIGN 5.10, decided) - `position` (where a thick wall's body sits) uses the **same** `left`/`right` pair as `sight_dir`: left is the `(-dy, dx)` normal of `a -> b`. Which side the editor offers first and how it draws the direction arrow stay here, so both fields keep one convention. - A one-way wall's own body on the side that **sees across** is still open (5.10 defers it): does that side see the body's floor, and does the blocked side? Normally a body is opaque floor — no player polygon, no newly explored cell, no tile. - A thick **low** one-way wall composes: direction decides whether the wall is crossed at all (the viewer-filtered sight list, 5.8), then see-over evaluates **every crossed face** of the rectangle (5.10), strictly. - Zero thickness is exactly today: the body degenerates to the segment, so no rule here may depend on thickness.
SirStone added the wayfinder:grilling label 2026-11-15 15:48:54 +01:00
SirStone added a new dependency 2026-11-15 15:48:59 +01:00
SirStone added a new dependency 2026-11-15 15:48:59 +01:00
Author
Owner

Per research #39 (Roll20 models one-way as elevation): grill together with Low walls: sight and movement (#44).

Per research #39 (Roll20 models one-way as elevation): grill together with Low walls: sight and movement (#44).
Author
Owner

Input from #43 (prototype, pictures + findings) — suggestions passed on, this card owns the decision.

  • One-way occludes its own body. From the unblocked side the wall must still hide its own footprint, otherwise the fog over it reads as a gap and leaks the wall's direction. Only the pass-through is directional: sight crosses the near face; the far face is not a hole.
  • Wording ambiguity to fix. 5.8's "left names the side whose view across the wall is blocked" reads both ways (blocked from the left, or the left side is hidden from the right). The prototype implements the first: a viewer west of a sight_dir:"left" wall sees nothing across it. Needs one clarifying sentence wherever it is fixed.
  • One-way is the only scenario where two players' explored maps differ permanently, and the only place the 5.8 filter must run per observer — a per-query cost, not a free switch (+0.15 ms/polygon at 5k walls; see #49 for precomputing two directional lists).
**Input from #43** (prototype, [pictures + findings](https://git.fossellini.top/SirStone/FFF_vtt/src/branch/prototype/wall-sight/prototype-wall-sight/index.html)) — suggestions passed on, this card owns the decision. - **One-way occludes its own body.** From the unblocked side the wall must still hide its own footprint, otherwise the fog over it reads as a gap and leaks the wall's direction. Only the **pass-through** is directional: sight crosses the near face; the far face is not a hole. - **Wording ambiguity to fix.** 5.8's "left names the side whose view across the wall is blocked" reads both ways (blocked *from* the left, or the left side is hidden *from* the right). The prototype implements the first: a viewer west of a `sight_dir:"left"` wall sees nothing across it. Needs one clarifying sentence wherever it is fixed. - One-way is the only scenario where two players' explored maps differ permanently, and the only place the 5.8 filter must run **per observer** — a per-query cost, not a free switch (+0.15 ms/polygon at 5k walls; see #49 for precomputing two directional lists).
SirStone self-assigned this 2026-11-16 21:44:45 +01:00
Author
Owner

Resolved by the owner on 2026-11-16; recorded in DESIGN v0.26, commit b8f04c2.

What we decided

  1. Window (v1). A window is see-through along its whole drawn length; no sill or top height is stored or used. It is drawn as its own wall piece inside a wall (wall | window | wall, like a door), in two forms: fixed (blocks_sight:false, blocks_movement:true, no door) and opening (the same plus door:true; pass when open). The editor gets a window preset. This supersedes "no window preset in v1" everywhere (#42, DESIGN §1 non-goals, 5.8, §8, Q6).
  2. One-way direction. sight_dir:"left" means a viewer on the left side — the (-dy, dx) normal of a -> b, the same side as position — cannot see across; a viewer on the right sees across. The one_way preset defaults to left. The editor shows an arrow at the wall's middle from the seeing side toward the watched side, plus a flip that swaps left/right without moving a/b; GM-only, never on a player wire.
  3. Thick one-way body. Opaque floor from both sides: no player polygon, never explored, no tile. Only pass-through past the wall is directional. This closes 5.10's deferral.
  4. Settled consequences (no new mechanism). Explored and tiles differ per side because each viewer's sight list is filtered; explored only grows, so flips never un-explore; movement stays two-way via blocks_movement; a low one-way filters first, then see-over checks every crossed face; zero thickness is the segment.

Delegated picks [FIXED (owner-delegated)]

  • kind collision. window is the opening form (a see-through door) and derives kind:"window". The fixed form's switches are exactly terrain's, so it derives kind:"terrain"; no second preset, no new kind. Rules are identical and terrain is the broader name; the editor may annotate a fixed window between wall pieces (M4 UI), nothing on the wire distinguishes it.
  • Validation. sight_dir != "both" requires blocks_sight:true, else invalid.
  • Filter shape. Hoisted viewer-independent body faces plus one sign test per one-way wall per viewer inline in the fan — no per-viewer list copy (the prototype's ~0.15 ms per viewer per frame, times tokens, rejected) and no two prebuilt lists (they would need the same per-viewer test).
  • Oracle. tools/leakcheck.nim and the independent explored/tile oracle apply their own (-dy, dx) side test; the 0.5 px boundary band along the blind side is oracle-maybe (never sure); new fault class ONEWAY (the player-facing computation drops sight_dir).

Out of scope: windows with a real sill and top height and light through windows — discussed when lighting arrives (map #38 Out of scope).

Sections: DESIGN 1, 5.1, 5.8, 5.9, 5.10, 6.1, 7.4, 8, 10.3, 14, Q6; GLOSSARY Wall preset, One-way wall, Terrain, Window.

Resolved by the owner on 2026-11-16; recorded in DESIGN v0.26, commit `b8f04c2`. **What we decided** 1. **Window (v1).** A window is see-through along its whole drawn length; no sill or top height is stored or used. It is drawn as its own wall piece inside a wall (`wall | window | wall`, like a door), in two forms: fixed (`blocks_sight:false`, `blocks_movement:true`, no door) and opening (the same plus `door:true`; pass when open). The editor gets a `window` preset. This supersedes "no window preset in v1" everywhere (#42, DESIGN §1 non-goals, 5.8, §8, Q6). 2. **One-way direction.** `sight_dir:"left"` means a viewer on the left side — the `(-dy, dx)` normal of `a -> b`, the same side as `position` — cannot see across; a viewer on the right sees across. The `one_way` preset defaults to `left`. The editor shows an arrow at the wall's middle from the seeing side toward the watched side, plus a flip that swaps `left`/`right` without moving `a`/`b`; GM-only, never on a player wire. 3. **Thick one-way body.** Opaque floor from both sides: no player polygon, never explored, no tile. Only pass-through past the wall is directional. This closes 5.10's deferral. 4. **Settled consequences (no new mechanism).** Explored and tiles differ per side because each viewer's sight list is filtered; explored only grows, so flips never un-explore; movement stays two-way via `blocks_movement`; a low one-way filters first, then see-over checks every crossed face; zero thickness is the segment. **Delegated picks [FIXED (owner-delegated)]** - **`kind` collision.** `window` is the opening form (a see-through door) and derives `kind:"window"`. The fixed form's switches are exactly `terrain`'s, so it derives `kind:"terrain"`; no second preset, no new kind. Rules are identical and `terrain` is the broader name; the editor may annotate a fixed window between wall pieces (M4 UI), nothing on the wire distinguishes it. - **Validation.** `sight_dir != "both"` requires `blocks_sight:true`, else `invalid`. - **Filter shape.** Hoisted viewer-independent body faces plus one sign test per one-way wall per viewer inline in the fan — no per-viewer list copy (the prototype's ~0.15 ms per viewer per frame, times tokens, rejected) and no two prebuilt lists (they would need the same per-viewer test). - **Oracle.** `tools/leakcheck.nim` and the independent explored/tile oracle apply their own `(-dy, dx)` side test; the 0.5 px boundary band along the blind side is oracle-*maybe* (never *sure*); new fault class `ONEWAY` (the player-facing computation drops `sight_dir`). **Out of scope:** windows with a real sill and top height and light through windows — discussed when lighting arrives (map #38 Out of scope). **Sections:** DESIGN 1, 5.1, 5.8, 5.9, 5.10, 6.1, 7.4, 8, 10.3, 14, Q6; GLOSSARY `Wall preset`, `One-way wall`, `Terrain`, `Window`.
Sign in to join this conversation.