Wall model: kinds or restriction flags #42

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

Part of #38

Question

Is a wall's behaviour a fixed kind (wall, door, window, …) or a set of independent restrictions (blocks sight, blocks movement, direction, door state, visibility to players), with kinds as presets?

Part of #38 ## Question Is a wall's behaviour a fixed kind (wall, door, window, …) or a set of independent restrictions (blocks sight, blocks movement, direction, door state, visibility to players), with kinds as presets?
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:58 +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
SirStone added a new dependency 2026-11-15 15:48:59 +01:00
SirStone self-assigned this 2026-11-15 16:52:40 +01:00
Author
Owner

Decided and recorded. DESIGN.md v0.22: new 5.8 "Wall switches, presets, doors and one-way", plus 1, 3.1, 5.1, 5.5, 6.1, 7.4, 8 and 14 (Q6 superseded). GLOSSARY.md: Wall rewritten; new Wall switch, Wall preset, One-way wall, Secret door, Locked door, Terrain. Commit 7511daa on main, not pushed.

What we decided

  • Behaviour is independent switches; a named kind is only a preset over them (not a fixed kind enum, not client-interpreted flags: the client may send a preset name and the server expands and validates it).
  • v1 switches: blocks_sight, blocks_movement, the door settings door, open, secret, locked, and one direction field sight_dir (both|left|right). No light axis, no sound axis.
  • A door is a wall with door set plus independent open/secret/locked, not a separate kind nor a state enum; door.set keeps working as "set open".
  • Direction is sight only. Movement is two-way, governed by its switch.
  • GM editor: a preset row (wall, door, secret door, locked door, terrain, one-way wall) gives the one-drag default; an advanced toggle exposes the raw switches.

Delegated knobs, as decided

  • Wire/storage shape: the switches are typed, validated fields on the wall record and in the wall payloads; flags stays the never-interpreted free object. kind survives on the wire as a derived read-only label (exact preset match, else custom), never an input and never the authority. Columns vs one validated restrictions object, field names and the migration are #49's. Why: the server must interpret sight and movement, so they cannot live in a field it never reads, and one authority cannot drift.
  • Secret/locked observability: nothing reaches a player, ever. A closed secret door must give byte-identical player frames and identical refusals to a solid wall; a locked door is just a closed door to sight and movement; the uniform move nack already makes refusals kind-neutral. Why: 3.1 withholds wall rows, so the obligation is rule equivalence, not a new hiding field.
  • A secret door is always closed (and two-way): door.set open:true on it, or sight_dir != both, is invalid; the GM clears secret first (one editor click). Why: an open or one-way secret door shows a gap or a sight seam and would stop being indistinguishable from a wall.
  • One-way door: allowed, since direction is an independent sight setting; closed it passes sight one way and blocks movement iff blocks_movement; open it blocks neither, both sides. Why: Q4 made direction sight-only, and an open door already blocks nothing, so no second mechanism is needed.
  • v1 preset table: wall (default), door, secret door, locked door, terrain (blocks movement, not sight: railing, bushes), one-way wall. No window preset: the switches can express a see-through door (door + blocks_sight:false: look through it closed, open it to pass), but "window" also names a distance-limited wall that two booleans cannot express, and terrain already covers the fixed see-over barrier — so v1 ships no preset under an ambiguous name and #47 picks the meaning. No "blocks nothing" preset. Why: the name is ambiguous, and naming identical switch sets twice would be a lie in the picker.
  • Composition hook: the switches select which predicate reads a wall; a wall with blocks_sight=false never enters the vision input at all, so thickness and height cannot affect terrain. What a low wall hides is #44, thickness is #45. Why: keeps the cheap case cheap and leaves #44/#45 a clean seam.
  • Status model: "blocking wall" (stuck, squeezed, door push, move checks) means blocks_movement and, for a door, closed; so terrain sticks and pushes like a solid wall, a one-way wall blocks movement both ways, and a secret door pushes a token exactly as a solid wall would.

Consequences for the open cards (edited there, not here)

  • Low walls: the "does it block movement" half of the question is answered by the switch; what remains is see-over (eye vs wall height, distance, the target's height).
  • Secret and locked doors: the model and the leak obligation are fixed; what remains is whether players may ever open doors (still map fog) and the equivalence oracle.
  • Windows and one-way walls: no window rule exists yet; one-way's play semantics (side convention, explored, tiles) remain.
  • Terrain walls: the rules are fixed; what remains is the play consequence the owner should see: a terrain wall is invisible to players, they only feel the collision.
  • Wire/migration (#49): 5.8 pre-decides the field set, the defaults, the rejected kind input and the derived label; #49 owns columns-vs-object, names and upgrading existing rows.

Answer: a wall's behaviour is a set of independent restrictions, and kinds are presets over them.

Decided and recorded. DESIGN.md v0.22: new 5.8 "Wall switches, presets, doors and one-way", plus 1, 3.1, 5.1, 5.5, 6.1, 7.4, 8 and 14 (Q6 superseded). GLOSSARY.md: `Wall` rewritten; new `Wall switch`, `Wall preset`, `One-way wall`, `Secret door`, `Locked door`, `Terrain`. Commit `7511daa` on `main`, not pushed. ## What we decided - **Behaviour is independent switches; a named kind is only a preset over them** (not a fixed kind enum, not client-interpreted flags: the client may send a preset name and the server expands and validates it). - **v1 switches:** `blocks_sight`, `blocks_movement`, the door settings `door`, `open`, `secret`, `locked`, and one direction field `sight_dir` (`both|left|right`). No light axis, no sound axis. - **A door is a wall with `door` set** plus independent open/secret/locked, not a separate kind nor a state enum; `door.set` keeps working as "set `open`". - **Direction is sight only.** Movement is two-way, governed by its switch. - **GM editor:** a preset row (wall, door, secret door, locked door, terrain, one-way wall) gives the one-drag default; an **advanced** toggle exposes the raw switches. ## Delegated knobs, as decided - **Wire/storage shape:** the switches are typed, validated fields on the wall record and in the wall payloads; `flags` stays the never-interpreted free object. `kind` survives on the wire as a **derived read-only label** (exact preset match, else `custom`), never an input and never the authority. Columns vs one validated restrictions object, field names and the migration are #49's. *Why: the server must interpret sight and movement, so they cannot live in a field it never reads, and one authority cannot drift.* - **Secret/locked observability:** nothing reaches a player, ever. A closed secret door must give byte-identical player frames and identical refusals to a solid wall; a locked door is just a closed door to sight and movement; the uniform move nack already makes refusals kind-neutral. *Why: 3.1 withholds wall rows, so the obligation is rule equivalence, not a new hiding field.* - **A secret door is always closed** (and two-way): `door.set open:true` on it, or `sight_dir != both`, is `invalid`; the GM clears `secret` first (one editor click). *Why: an open or one-way secret door shows a gap or a sight seam and would stop being indistinguishable from a wall.* - **One-way door:** allowed, since direction is an independent sight setting; closed it passes sight one way and blocks movement iff `blocks_movement`; open it blocks neither, both sides. *Why: Q4 made direction sight-only, and an open door already blocks nothing, so no second mechanism is needed.* - **v1 preset table:** wall (default), door, secret door, locked door, terrain (blocks movement, not sight: railing, bushes), one-way wall. **No `window` preset:** the switches *can* express a see-through door (door + `blocks_sight:false`: look through it closed, open it to pass), but "window" also names a distance-limited wall that two booleans cannot express, and `terrain` already covers the fixed see-over barrier — so v1 ships no preset under an ambiguous name and #47 picks the meaning. No "blocks nothing" preset. *Why: the name is ambiguous, and naming identical switch sets twice would be a lie in the picker.* - **Composition hook:** the switches select which predicate reads a wall; a wall with `blocks_sight=false` never enters the vision input at all, so thickness and height cannot affect terrain. What a low wall hides is #44, thickness is #45. *Why: keeps the cheap case cheap and leaves #44/#45 a clean seam.* - **Status model:** "blocking wall" (stuck, squeezed, door push, move checks) means `blocks_movement` and, for a door, closed; so terrain sticks and pushes like a solid wall, a one-way wall blocks movement both ways, and a secret door pushes a token exactly as a solid wall would. ## Consequences for the open cards (edited there, not here) - **Low walls:** the "does it block movement" half of the question is answered by the switch; what remains is see-over (eye vs wall height, distance, the target's height). - **Secret and locked doors:** the model and the leak obligation are fixed; what remains is whether players may ever open doors (still map fog) and the equivalence oracle. - **Windows and one-way walls:** no window rule exists yet; one-way's play semantics (side convention, explored, tiles) remain. - **Terrain walls:** the rules are fixed; what remains is the play consequence the owner should see: a terrain wall is invisible to players, they only feel the collision. - **Wire/migration (#49):** 5.8 pre-decides the field set, the defaults, the rejected `kind` input and the derived label; #49 owns columns-vs-object, names and upgrading existing rows. Answer: a wall's behaviour is a set of independent restrictions, and kinds are presets over them.
Sign in to join this conversation.