Door geometry: thick doors and door push #50

Closed
opened 2026-11-15 16:13:16 +01:00 by SirStone · 1 comment
Owner

Part of #38

Question

When walls have thickness, what is a door: a leaf inside a deep opening or a thick wall segment? How do opening, closing and the door push (and stuck/squeezed) work with it, for plain, secret and locked doors?

Context: research in docs/research/walls-sight-thick-low.md (#39).

Fixed by #42 (DESIGN 5.8)

  • A door's switches describe it closed; an open door blocks neither sight nor movement, so the push only ever runs on a close.
  • A secret door is always closed and must push a token exactly as a solid wall would, with no signal; a one-way door passes sight one way while closed and both ways once open, and blocks movement per its switch in both directions.
  • A terrain wall is not a door and never triggers the push.

Question (narrowed)

With thickness (#45), what is a door: a leaf inside a deep opening, or the full thick segment? How do open/close, the push geometry and stuck/squeezed work in the thick case, and does the leaf swing matter?

Input from #44 (DESIGN 5.9, decided)

  • Height touches neither the collider nor the push: a low door still blocks and pushes by its switches, and an open door blocks nothing, so these geometry answers do not depend on height.
  • The see-over comparison happens at the sight wall's near face; a door leaf's thickness is #45's geometry, not a new height rule.

Input from #45 (DESIGN 5.10, decided)

  • Wall and door share one body: rectangle |ab| x thickness, square ends, position centre/left/right of the drawn line. Sight uses the 4-face quad; movement uses exact distance to the rectangle with a centre inside counting as overlap. What a door's body is (leaf in a deep opening vs the full thick segment) is this card's.
  • A close pushes and an edit never does (5.10): a thickness change, flip or move that covers a token leaves it stuck. 5.5's push moves a token perpendicular to the door, with thickness against its body, to >= r; that body's shape is this card's.
  • The push reads the same rectangle-distance primitive as the collider, so "what pushes" and "what blocks" cannot drift.
  • A thick open door's tunnel/keyhole beam was accepted in #43 (viewer-angle dependent, 1-2 cells); it is not reopened here.
  • Zero thickness is exactly today: a zero-thickness door keeps the current push.

Input from #48 (DESIGN 5.8, decided 2026-11-16)

  • secret and locked are checkboxes on any door, not presets: a secret door is door + secret, a locked door door + locked; the preset names secret_door/locked_door are gone (wire preset set: wall, door, window, one_way).
  • A window is a door when opening (door:true, blocks_sight:false): it can be locked (an opening window refuses to open until the GM unlocks it) and it can never be secret (a see-through secret door would show itself; secret requires both block switches on). A fixed window has door:false, so it never closes and never triggers the push.
  • The push question is unchanged: a close pushes per the door's body rectangle (5.10, 5.5); a window's blocks_sight is already off, so opening it changes only movement, and a locked window's door.set open:true is invalid like any locked door (#46).
Part of #38 ## Question When walls have thickness, what is a door: a leaf inside a deep opening or a thick wall segment? How do opening, closing and the door push (and stuck/squeezed) work with it, for plain, secret and locked doors? Context: research in docs/research/walls-sight-thick-low.md (#39). ## Fixed by #42 (DESIGN 5.8) - A door's switches describe it closed; an open door blocks neither sight nor movement, so the push only ever runs on a close. - A secret door is always closed and must push a token exactly as a solid wall would, with no signal; a one-way door passes sight one way while closed and both ways once open, and blocks movement per its switch in both directions. - A `terrain` wall is not a door and never triggers the push. ## Question (narrowed) With thickness (#45), what is a door: a leaf inside a deep opening, or the full thick segment? How do open/close, the push geometry and `stuck`/`squeezed` work in the thick case, and does the leaf swing matter? ## Input from #44 (DESIGN 5.9, decided) - Height touches neither the collider nor the push: a low door still blocks and pushes by its switches, and an open door blocks nothing, so these geometry answers do not depend on height. - The see-over comparison happens at the sight wall's near face; a door leaf's thickness is #45's geometry, not a new height rule. ## Input from #45 (DESIGN 5.10, decided) - Wall and door share one **body**: rectangle `|ab|` x `thickness`, square ends, `position` centre/left/right of the drawn line. Sight uses the 4-face quad; movement uses exact distance to the rectangle with a centre inside counting as overlap. What a **door's** body is (leaf in a deep opening vs the full thick segment) is this card's. - A **close pushes** and an **edit never does** (5.10): a thickness change, flip or move that covers a token leaves it `stuck`. 5.5's push moves a token perpendicular to the door, with thickness against its body, to `>= r`; that body's shape is this card's. - The push reads the **same rectangle-distance primitive** as the collider, so "what pushes" and "what blocks" cannot drift. - A thick open door's tunnel/keyhole beam was accepted in #43 (viewer-angle dependent, 1-2 cells); it is not reopened here. - Zero thickness is exactly today: a zero-thickness door keeps the current push. ## Input from #48 (DESIGN 5.8, decided 2026-11-16) - **`secret` and `locked` are checkboxes on any door**, not presets: a secret door is `door` + `secret`, a locked door `door` + `locked`; the preset names `secret_door`/`locked_door` are gone (wire preset set: `wall`, `door`, `window`, `one_way`). - **A window is a door when opening** (`door:true`, `blocks_sight:false`): it can be locked (an opening window refuses to open until the GM unlocks it) and it can **never** be secret (a see-through secret door would show itself; `secret` requires both block switches on). A **fixed** window has `door:false`, so it never closes and never triggers the push. - **The push question is unchanged:** a close pushes per the door's body rectangle (5.10, 5.5); a window's `blocks_sight` is already off, so opening it changes only movement, and a locked window's `door.set open:true` is `invalid` like any locked door (#46).
SirStone added the wayfinder:grilling label 2026-11-15 16:13:16 +01:00
SirStone added a new dependency 2026-11-15 16:13:19 +01:00
SirStone added a new dependency 2026-11-15 16:13:20 +01:00
SirStone added a new dependency 2026-11-15 16:13:20 +01:00
SirStone self-assigned this 2026-11-17 22:04:35 +01:00
Author
Owner

What we decided

A door is a piece of wall, and its leaf is its own body (DESIGN 5.8, 5.10). No separate leaf inside a deep opening, no clamp to the neighbouring pieces: the door stores the same a, b, thickness and position as any wall, and that body is the leaf for sight, movement and the push. The jambs are ordinary walls, so the doorway is just the gap between wall pieces. A thick door bulges out or leaves a step exactly as drawn, and a deep opening between thick jambs keeps the tunnel/keyhole view already accepted in #43. Open/close only add and remove that body: no swing, no slide, no hinge, no arc.

The close push is measured from the body (DESIGN 5.5, rewritten):

  • each token with dist(c, body) < r moves out of the side its centre is on, along that side's normal, by the smallest offset that ends >= r from the body (+PushEps);
  • side = the face the centre is beyond; a centre inside the body, or past an end but within the body's normal span, takes prev's side, defaulting to the left ((-dy,dx)) of a -> b;
  • within the axial span the target is the face offset by r; past an end it is the offset from the nearest end corner, keeping the along-axis coordinate;
  • first side invalid (out of bounds, or within r of any blocking body) → the other side; both invalid → the token stays and gets squeezed, and the door still closes. No axial slide out of a doorway, no chain, no retry;
  • each token is pushed independently, tokens never block tokens, and scene order only rewrites prev/hasPrev. This order rule is final, not a later "fix".

Settled consequences: locked doors and opening windows push exactly like a plain closed door; a fixed window (door:false) never closes so it never pushes; a secret door pushes exactly as a solid wall (#46's equivalence holds for thick doors); edits never push (5.10); height never enters (5.9).

Delegated picks (recorded FIXED (owner-delegated))

  • Face-normal offset within the body's axial span; past an end the offset from the nearest end corner keeping the along-axis coordinate (today's foot + n·sqrt(r²−e²) generalised). A radial displacement from the corner was rejected: it also moves the token along the axis and would break the byte-for-byte zero-thickness gate.
  • "Inside the body" for the side test = inside the body or past an end but within the body's normal span, which reduces exactly to today's centre-on-the-line test at t = 0.
  • Target and validity both use the same rectangle-distance primitive as the collider, over every blocking body (other thick walls included).
  • PushEps = 1e-6 px reused.
  • Zero thickness returns identical values to today's pushFrom on the same inputs; the existing push tests run unchanged as the regression gate (10.3).

Recorded in

docs/DESIGN.md: header v0.28, 5.4, 5.5, 5.8, 5.10, 10.3, 14. GLOSSARY.md: new Door entry, Wall body and Squeezed wording.

Commit 2a160fb on main (not pushed). No new wire field for doors: the leaf is the existing thickness/position body — passed to #49.

## What we decided **A door is a piece of wall, and its leaf is its own body** (DESIGN 5.8, 5.10). No separate leaf inside a deep opening, no clamp to the neighbouring pieces: the door stores the same `a`, `b`, `thickness` and `position` as any wall, and that body is the leaf for sight, movement and the push. The jambs are ordinary walls, so the doorway is just the gap between wall pieces. A thick door bulges out or leaves a step exactly as drawn, and a deep opening between thick jambs keeps the tunnel/keyhole view already accepted in #43. Open/close only add and remove that body: no swing, no slide, no hinge, no arc. **The close push is measured from the body** (DESIGN 5.5, rewritten): - each token with `dist(c, body) < r` moves out of the side its centre is on, along that side's normal, by the smallest offset that ends `>= r` from the body (+`PushEps`); - side = the face the centre is beyond; a centre inside the body, or past an end but within the body's normal span, takes `prev`'s side, defaulting to the left (`(-dy,dx)`) of `a -> b`; - within the axial span the target is the face offset by `r`; past an end it is the offset from the nearest end corner, keeping the along-axis coordinate; - first side invalid (out of bounds, or within `r` of any blocking *body*) → the other side; both invalid → the token stays and gets `squeezed`, and the door still closes. No axial slide out of a doorway, no chain, no retry; - each token is pushed independently, tokens never block tokens, and scene order only rewrites `prev`/`hasPrev`. This order rule is final, not a later "fix". Settled consequences: locked doors and opening windows push exactly like a plain closed door; a fixed window (`door:false`) never closes so it never pushes; a secret door pushes exactly as a solid wall (#46's equivalence holds for thick doors); edits never push (5.10); height never enters (5.9). ## Delegated picks (recorded FIXED (owner-delegated)) - Face-normal offset within the body's axial span; past an end the offset from the nearest end corner **keeping the along-axis coordinate** (today's `foot + n·sqrt(r²−e²)` generalised). A radial displacement from the corner was rejected: it also moves the token along the axis and would break the byte-for-byte zero-thickness gate. - "Inside the body" for the side test = inside the body **or** past an end but within the body's normal span, which reduces exactly to today's centre-on-the-line test at `t = 0`. - Target and validity both use the same rectangle-distance primitive as the collider, over every blocking body (other thick walls included). - `PushEps` = 1e-6 px reused. - **Zero thickness returns identical values to today's `pushFrom` on the same inputs**; the existing push tests run unchanged as the regression gate (10.3). ## Recorded in `docs/DESIGN.md`: header v0.28, 5.4, 5.5, 5.8, 5.10, 10.3, 14. `GLOSSARY.md`: new **Door** entry, **Wall body** and **Squeezed** wording. Commit `2a160fb` on `main` (not pushed). No new wire field for doors: the leaf is the existing thickness/position body — passed to #49.
Sign in to join this conversation.