Thick walls: sight and movement #45

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

Part of #38

Question

How does thickness change sight edges, token collision, the move step and door push?

Fixed by #42 (DESIGN 5.8)

  • A wall enters the movement rules only with blocks_movement on and, for a door, while closed. A terrain wall is thick for movement and absent from sight entirely, so its thickness never touches the vision input.
  • A one-way direction is sight-only and does not change the collider; a one-way wall blocks movement both ways.
  • The door push with a thick door is #50's business; this card fixes the geometry both share.

Question (unchanged)

How does thickness change sight edges, token collision, the move step and door push? Add the two predicates of 5.8 to that list: which sight footprint (wall rectangle? offset edge?) and which collider (capsule against the thick segment?).

Input from #44 (DESIGN 5.9, decided)

  • See-over is a per-target predicate evaluated at every crossed sight wall: this card must name the near face a thick wall presents to that comparison (v1 compares at the zero-width wall line).
  • Height never enters movement, so thickness only widens the collider: the stuck/squeezed and push triggers keep reading blocks_movement and the closed door as today.
  • A thick sight wall still carries no "see-over" flag and the fog polygon stays strict; thickness may move the polygon edge but not the predicate's shape.
Part of #38 ## Question How does thickness change sight edges, token collision, the move step and door push? ## Fixed by #42 (DESIGN 5.8) - A wall enters the movement rules only with `blocks_movement` on and, for a door, while closed. A `terrain` wall is thick for movement and absent from sight entirely, so its thickness never touches the vision input. - A one-way direction is sight-only and does not change the collider; a one-way wall blocks movement both ways. - The door push with a thick door is #50's business; this card fixes the geometry both share. ## Question (unchanged) How does thickness change sight edges, token collision, the move step and door push? Add the two predicates of 5.8 to that list: which sight footprint (wall rectangle? offset edge?) and which collider (capsule against the thick segment?). ## Input from #44 (DESIGN 5.9, decided) - See-over is a per-target predicate evaluated at every crossed sight wall: this card must name the **near face** a thick wall presents to that comparison (v1 compares at the zero-width wall line). - Height never enters movement, so thickness only widens the collider: the `stuck`/`squeezed` and push triggers keep reading `blocks_movement` and the closed door as today. - A thick sight wall still carries no "see-over" flag and the fog polygon stays strict; thickness may move the polygon edge but not the predicate's shape.
SirStone added the wayfinder:grilling label 2026-11-15 15:48:54 +01:00
SirStone added a new dependency 2026-11-15 15:48:58 +01:00
SirStone added a new dependency 2026-11-15 15:48:58 +01:00
SirStone added a new dependency 2026-11-15 15:48:59 +01:00
SirStone added a new dependency 2026-11-15 16:13:19 +01:00
Author
Owner

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

  • Owner accepted the thick-door tunnel/keyhole view: an open thick door reveals a beam whose shape depends on the viewer's angle, not the opening's width (1–2 cells on the 32 px grid). No "opening as wide as the gap" special case.
  • Owner accepted the cost: ~10× on the 5k dense scene (13.2 ms vs 1.25 ms baseline); the per-move budget is re-baselined and optimised later (map fog line updated). Sparse stays 0.26 ms per polygon.
  • Suggested footprint: 4-face hoistable quad over the 3-face silhouette — exact, viewer-independent, cacheable per wall edit (0.26 vs 0.94 ms on 5k sparse, 12.7 vs 13.2 dense). The 3-face near+caps version is observer-dependent and can never be hoisted.
  • Thick polygon ⊂ thin polygon in every scene measured (0 cells gained: prototype scene 228→227, corner 242→232, terrain identical).
  • A shared corner shows no crack at zero width either (±RayEps fan already covers it), so thickness is not justified by closing joints.
  • A closed secret door as the same rectangle is trivially indistinguishable from a solid wall (useful for #46).
**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. - **Owner accepted** the thick-door **tunnel/keyhole view**: an open thick door reveals a beam whose shape depends on the viewer's angle, not the opening's width (1–2 cells on the 32 px grid). No "opening as wide as the gap" special case. - **Owner accepted the cost**: ~10× on the 5k dense scene (13.2 ms vs 1.25 ms baseline); the per-move budget is re-baselined and optimised later (map fog line updated). Sparse stays 0.26 ms per polygon. - **Suggested footprint:** 4-face hoistable quad over the 3-face silhouette — exact, viewer-independent, cacheable per wall edit (0.26 vs 0.94 ms on 5k sparse, 12.7 vs 13.2 dense). The 3-face near+caps version is observer-dependent and can never be hoisted. - Thick polygon ⊂ thin polygon in every scene measured (0 cells gained: prototype scene 228→227, corner 242→232, terrain identical). - A shared corner shows **no crack** at zero width either (±RayEps fan already covers it), so thickness is not justified by closing joints. - A closed secret door as the same rectangle is trivially indistinguishable from a solid wall (useful for #46).
SirStone self-assigned this 2026-11-15 19:32:47 +01:00
Author
Owner

Decided and recorded. DESIGN.md v0.25 (new 5.10 "Thick walls: the body, sight and movement", plus 1, 5.1, 5.3, 5.5, 5.7, 5.8, 5.9, 6.1, 7.4, 8, 13, 14) and GLOSSARY.md (Wall amended, new Wall body, See-over amended). Commit 5c3a123 on main (not pushed).

What we decided

  1. Placement is per wall. position is center (default), left or right of the drawn a -> b line, so the line is the room's interior and the thickness grows outward. The editor shows it as a flip control with a live preview, and a flip changes only the body: a/b never move.
  2. Body = rectangle |ab| x thickness, square ends. Offsets follow position. thickness: 0 is today exactly — same polygon, same collider, same see-over point — and every existing wall migrates to 0 and is unchanged.
  3. The body is opaque floor. It is never inside a player's polygon and its own area is never newly explored, so a player's fog stays black under it and no tile is newly revealed there. (Explored only grows, so cells explored before a wall was thickened over stay explored; a body reveals nothing, ever.)
  4. One shape, two readers. Sight and movement use the same exact rectangle. Sight sees it as the 4-face quad, hoisted per wall edit as #43 measured (viewer-independent, cacheable). Movement uses exact circle-vs-rectangle distance, a centre inside the body counting as distance 0 = overlap. One rectangle-distance primitive serves pathClear, the stuck/squeezed overlap check, the door push, pushOutOfWalls and resize. A blocks_sight: false wall contributes nothing to sight, body included; its collider keeps the thickness.
  5. Default thickness. A new wall starts at the GM's last-used thickness; a fresh editor starts at 0.
  6. See-over clears every crossed face. The eye -> target-top line must be strictly above the wall at every face of the body it crosses — near and far — not just the near face. Both faces coincide at zero thickness, so 5.9 stands. The visible fraction's per-wall minimum is a minimum over the crossed faces.
  7. A wall edit never pushes. A thickness change, flip or move that covers a token leaves the token in place and stuck (it may only move to reduce or leave the overlap). Only a door closing pushes.
  8. A viewer inside a sight-blocking body sees nothing. Empty polygon until it leaves: no cells, no other tokens, no tiles. It is normally stuck too, so the GM moves it out.
  9. No dead end. v1 walls stay straight rectangles; a cave is a chain of walls; joints overlap (small outer-corner notch, no crack, no mitre). The occupied area sits behind one wall-shape function and no other code builds geometry from a/b, so curved/freeform walls and tracing walls from a map image are a change to that function, not a redesign.

Delegated knobs, as decided

  • Thickness in px, a map distance like length and token radius; heights are metres and no scale converts between them (5.7).
  • Limits: 0 <= thickness <= 256 px (8 tiles). 0 is the line; 256 is already a room-sized block better drawn as several walls, and the cap bounds the quad. The body may cross the map edge (a border wall thickened outward); only the map area exists.
  • Side formula: left is the (-dy, dx) normal of a -> b, the same pair sight_dir uses and the same left as 5.5's default door-push side. #47 still fixes which side the editor offers first and how it draws the arrow.
  • Joints: plain rectangle overlap, no mitre/merge/joint object; the overlap closes the corner.
  • Field names: thickness (number, px) and position (center|left|right) on the record and in the payloads; #49 decides columns vs one validated object, the payload shape and the migration.
  • Last-used default is editor state for the session (not a scene field, not on the wire).

Downstream

  • #50 Door geometry: a thick door's shape (leaf in a deep opening vs the full thick segment) and the push geometry. 5.10 only guarantees that the push reads the same rectangle-distance primitive and that a close pushes while an edit does not.
  • #47 Windows and one-way walls: a one-way wall occluding its own body on the side that sees across (5.10 defers it), and which side's explored cells, if any, the body removes.
  • #49 Wire/schema/migration: thickness and position, defaults, columns vs object, existing rows to 0/center.
  • #48 Terrain: unchanged — absent from sight, body included; its collider uses the thickness.
  • Oracles: the independent explored/tile oracle and the leak checker build the rectangle themselves (never by calling vision.nim or the move rules) for both the sight footprint and the distance test. Assertions land with the build tickets.

Player-facing cover percentages stay out of scope (a rules-engine judgement); the GM-only who-sees-it view of #44 is unchanged.

Decided and recorded. DESIGN.md v0.25 (new 5.10 "Thick walls: the body, sight and movement", plus 1, 5.1, 5.3, 5.5, 5.7, 5.8, 5.9, 6.1, 7.4, 8, 13, 14) and GLOSSARY.md (`Wall` amended, new `Wall body`, `See-over` amended). Commit `5c3a123` on `main` (not pushed). ## What we decided 1. **Placement is per wall.** `position` is `center` (default), `left` or `right` of the drawn `a -> b` line, so the line is the room's interior and the thickness grows outward. The editor shows it as a flip control with a live preview, and a flip changes only the body: `a`/`b` never move. 2. **Body = rectangle `|ab|` x `thickness`, square ends.** Offsets follow `position`. `thickness: 0` is today exactly — same polygon, same collider, same see-over point — and every existing wall migrates to 0 and is unchanged. 3. **The body is opaque floor.** It is never inside a player's polygon and its own area is never newly explored, so a player's fog stays black under it and no tile is newly revealed there. (Explored only grows, so cells explored before a wall was thickened over stay explored; a body reveals nothing, ever.) 4. **One shape, two readers.** Sight and movement use the same exact rectangle. Sight sees it as the 4-face quad, hoisted per wall edit as #43 measured (viewer-independent, cacheable). Movement uses exact circle-vs-rectangle distance, a centre inside the body counting as distance 0 = overlap. One rectangle-distance primitive serves `pathClear`, the `stuck`/`squeezed` overlap check, the door push, `pushOutOfWalls` and resize. A `blocks_sight: false` wall contributes nothing to sight, body included; its collider keeps the thickness. 5. **Default thickness.** A new wall starts at the GM's last-used thickness; a fresh editor starts at 0. 6. **See-over clears every crossed face.** The eye -> target-top line must be strictly above the wall at **every face of the body it crosses** — near and far — not just the near face. Both faces coincide at zero thickness, so 5.9 stands. The visible fraction's per-wall minimum is a minimum over the crossed faces. 7. **A wall edit never pushes.** A thickness change, flip or move that covers a token leaves the token in place and `stuck` (it may only move to reduce or leave the overlap). Only a door **closing** pushes. 8. **A viewer inside a sight-blocking body sees nothing.** Empty polygon until it leaves: no cells, no other tokens, no tiles. It is normally `stuck` too, so the GM moves it out. 9. **No dead end.** v1 walls stay straight rectangles; a cave is a chain of walls; joints overlap (small outer-corner notch, no crack, no mitre). The occupied area sits behind one wall-shape function and no other code builds geometry from `a`/`b`, so curved/freeform walls and tracing walls from a map image are a change to that function, not a redesign. ## Delegated knobs, as decided - **Thickness in px**, a map distance like length and token radius; heights are metres and no scale converts between them (5.7). - **Limits: `0 <= thickness <= 256` px** (8 tiles). 0 is the line; 256 is already a room-sized block better drawn as several walls, and the cap bounds the quad. The body may cross the map edge (a border wall thickened outward); only the map area exists. - **Side formula:** `left` is the `(-dy, dx)` normal of `a -> b`, the same pair `sight_dir` uses and the same left as 5.5's default door-push side. #47 still fixes which side the editor offers first and how it draws the arrow. - **Joints:** plain rectangle overlap, no mitre/merge/joint object; the overlap closes the corner. - **Field names:** `thickness` (number, px) and `position` (`center|left|right`) on the record and in the payloads; #49 decides columns vs one validated object, the payload shape and the migration. - **Last-used default** is editor state for the session (not a scene field, not on the wire). ## Downstream - **#50 Door geometry**: a thick door's shape (leaf in a deep opening vs the full thick segment) and the push geometry. 5.10 only guarantees that the push reads the same rectangle-distance primitive and that a close pushes while an edit does not. - **#47 Windows and one-way walls**: a one-way wall occluding its own body on the side that sees across (5.10 defers it), and which side's explored cells, if any, the body removes. - **#49 Wire/schema/migration**: `thickness` and `position`, defaults, columns vs object, existing rows to `0`/`center`. - **#48 Terrain**: unchanged — absent from sight, body included; its collider uses the thickness. - Oracles: the independent explored/tile oracle and the leak checker build the rectangle themselves (never by calling `vision.nim` or the move rules) for both the sight footprint and the distance test. Assertions land with the build tickets. Player-facing cover percentages stay out of scope (a rules-engine judgement); the GM-only who-sees-it view of #44 is unchanged.
Sign in to join this conversation.