design: low walls sight and see-over (#44)

This commit is contained in:
2026-11-15 19:21:10 +01:00
parent 7511daa3c5
commit 4c968b78d8
2 changed files with 39 additions and 5 deletions
+13 -1
View File
@@ -51,9 +51,21 @@ A figure on the map. It may belong to a character; a plain token (monster, item)
_Avoid_: entity, piece, counter _Avoid_: entity, piece, counter
**Wall**: **Wall**:
A barrier on the map with a length, a thickness and a height. It hides what its dimensions hide. What it *does* is a set of **switches** it carries: blocks sight, blocks movement, and (for sight) a direction; a door is a wall with the door setting plus open/secret/locked. A named wall kind is only a preset over those switches, never the wall's own identity. A wall is full height unless the GM gives it a height in metres, so by default nobody sees over it; an older wall without a height keeps hiding everything behind it. In v1 a wall has zero thickness; per-wall thickness and what a low wall hides are pending (map #38). A barrier on the map with a length, a thickness and a height. It hides what its dimensions hide. What it *does* is a set of **switches** it carries: blocks sight, blocks movement, and (for sight) a direction; a door is a wall with the door setting plus open/secret/locked. A named wall kind is only a preset over those switches, never the wall's own identity. A wall is full height unless the GM gives it a height in metres, so by default nobody sees over it; an older wall without a height keeps hiding everything behind it. A low wall hides only what fails the see-over line (see Low wall, See-over). In v1 a wall has zero thickness; per-wall thickness is pending (map #38, #45).
_Avoid_: blocker, collider, obstacle, sight blocker, wall type (use preset) _Avoid_: blocker, collider, obstacle, sight blocker, wall type (use preset)
**Low wall**:
A wall with its sight switch on and a height below full, so it hides some things and not others. It is not a kind or a preset. What it hides is not a property of the wall alone: it depends on whose eyes look, how tall the thing looked at is, and how far away it is.
_Avoid_: half wall, short wall, cover (that is a rules word)
**See-over**:
The rule for being seen across a low wall: the figure's top must rise strictly above the line from the viewer's eye to it, at every low wall that line crosses. So the same wall hides a crouched figure beside it and shows a distant standing one, and a giant's head shows over a fence. It changes no fog: the floor behind a low wall stays unexplored even while the figure standing on it is seen.
_Avoid_: see-through (that is a wall that does not block sight at all), over-the-wall vision
**Visible fraction**:
The share of a figure's height above the highest blocking sight line between a viewer's eye and the figure: 0 when hidden, 100 % when nothing is in the way. A GM-only number, shown in the GM's who-sees-it view; players always get a plain visible/hidden answer and never the number.
_Avoid_: cover percentage, exposure, concealment
**Wall switch**: **Wall switch**:
One independent setting a wall's behaviour is made of: `blocks sight` or `blocks movement`. Neither implies the other: a wall can hide what is behind it and let people walk through, or the reverse. A door's settings (open, secret, locked) and the sight direction are settings of the same wall but not switches. Switches are stored on the wall and read by the server. One independent setting a wall's behaviour is made of: `blocks sight` or `blocks movement`. Neither implies the other: a wall can hide what is behind it and let people walk through, or the reverse. A door's settings (open, secret, locked) and the sight direction are settings of the same wall but not switches. Switches are stored on the wall and read by the server.
_Avoid_: flag, bit, property (that word already means token data), restriction type _Avoid_: flag, bit, property (that word already means token data), restriction type
+26 -4
View File
@@ -1,6 +1,6 @@
# FFF_vtt design # FFF_vtt design
Status: draft v0.22, 2026-11-15 (owner decisions recorded in section 14; v0.4 records Q4 (tile_size 32 px), the outbox lock invariant (4.2, 4.3), and the follow-ups in 3.4, 8, 11.1, 12, 13; v0.5 records the M2 move-rule decisions in 5.5 and updates 3.4, 4.2, 5.1, 5.4, 6.1, 7.4, 8, 10.3, 12, 13; v0.6 records #14 (characters and player data) in 3.1, 3.4, 4.1, 4.4, 6.1, 8, 9, 10.3, 13, 14; v0.7 records #6 (players and invites) in 3.1, 3.2, 3.4, 4.4, 6.1, 8, 12, 13, 14; v0.8 records #7 (map tiles) in 3.3, 3.4, 11.1, 13, 14; v0.9 records #9 (test tools) in 2, 10.4, 13, 14; v0.10 records #12 (what M3 done means) in 13, 14; v0.11 records #15 (M3 limits) in 4.3, 6.4, 10.1, 13, 14; v0.12 records #11 (M3 message list) in 3.1, 3.2, 3.4, 4.2, 4.3, 5.5, 5.6, 6, 7.5, 13, 14; v0.13 records the owner review of #11 flags in 1, 3.1, 5.5, 6.1, 8, 14; v0.14 records #17 (getting in: keys, sessions, the auth slice) in 3.2, 4.4, 6.5, 6.6, 8, 11.1, 13, 14; v0.15 records #18 (talking safely: the protocol shell and the `closing` close-reason message) in 3.2, 4.3, 6, 6.1, 6.2, 6.4, 6.5, 10.3, 13, 14; v0.16 records #19 (walls and doors: the scene/wall schema, the wall payload rules and the slice-4 rollout) in 4.4, 6.1, 8, 13, 14; v0.17 records #20 (tokens and sight: the `entity` step, the typed views and the single egress, vision and explored, and the slice-5 rollout) in 4.4, 6.1, 6.3, 8, 10.3, 13, 14; v0.18 records #23 (characters and names: the `character`/`name_reveal`/`encountered` step, the name rule, the players' names and the `roster` frame, and the four name/character fault classes) in 4.1, 4.4, 6.1, 6.3, 6.4, 6.5, 8, 10.3, 13, 14; v0.19 records the owner confirmation of the #22 property-schema registry (keep the empty registry with the permissive fallback in v1; strict mode comes with the FFF seam, post-v1) in 6.1, 14; v0.20 records the #27-#31 correctness and cost fixes (per-player reveal persistence, one encountered rewrite path, link-by-update, the borrowed egress context, one scene read per request) in 4.3, 6.1, 10.3, 14; v0.21 records #41 (the height model: metres, `height` and `eye_height` as GM-only registered props with a token override, eye height 93% by default, walls full height unless the GM gives a height) in 5.7, 6.1, 8, 9, 14; v0.22 records #42 (the wall model: independent sight/movement switches with door settings and a sight-only direction, kinds as presets, a derived `kind` label, the v1 preset table, and secret/locked unobservable to players) in 1, 3.1, 5.1, 5.5, 5.8, 6.1, 7.4, 8, 14. All of Q1-Q24 are RESOLVED or DEFERRED; none OPEN). Audience: the owner and coding agents. Status: draft v0.23, 2026-11-15 (owner decisions recorded in section 14; v0.4 records Q4 (tile_size 32 px), the outbox lock invariant (4.2, 4.3), and the follow-ups in 3.4, 8, 11.1, 12, 13; v0.5 records the M2 move-rule decisions in 5.5 and updates 3.4, 4.2, 5.1, 5.4, 6.1, 7.4, 8, 10.3, 12, 13; v0.6 records #14 (characters and player data) in 3.1, 3.4, 4.1, 4.4, 6.1, 8, 9, 10.3, 13, 14; v0.7 records #6 (players and invites) in 3.1, 3.2, 3.4, 4.4, 6.1, 8, 12, 13, 14; v0.8 records #7 (map tiles) in 3.3, 3.4, 11.1, 13, 14; v0.9 records #9 (test tools) in 2, 10.4, 13, 14; v0.10 records #12 (what M3 done means) in 13, 14; v0.11 records #15 (M3 limits) in 4.3, 6.4, 10.1, 13, 14; v0.12 records #11 (M3 message list) in 3.1, 3.2, 3.4, 4.2, 4.3, 5.5, 5.6, 6, 7.5, 13, 14; v0.13 records the owner review of #11 flags in 1, 3.1, 5.5, 6.1, 8, 14; v0.14 records #17 (getting in: keys, sessions, the auth slice) in 3.2, 4.4, 6.5, 6.6, 8, 11.1, 13, 14; v0.15 records #18 (talking safely: the protocol shell and the `closing` close-reason message) in 3.2, 4.3, 6, 6.1, 6.2, 6.4, 6.5, 10.3, 13, 14; v0.16 records #19 (walls and doors: the scene/wall schema, the wall payload rules and the slice-4 rollout) in 4.4, 6.1, 8, 13, 14; v0.17 records #20 (tokens and sight: the `entity` step, the typed views and the single egress, vision and explored, and the slice-5 rollout) in 4.4, 6.1, 6.3, 8, 10.3, 13, 14; v0.18 records #23 (characters and names: the `character`/`name_reveal`/`encountered` step, the name rule, the players' names and the `roster` frame, and the four name/character fault classes) in 4.1, 4.4, 6.1, 6.3, 6.4, 6.5, 8, 10.3, 13, 14; v0.19 records the owner confirmation of the #22 property-schema registry (keep the empty registry with the permissive fallback in v1; strict mode comes with the FFF seam, post-v1) in 6.1, 14; v0.20 records the #27-#31 correctness and cost fixes (per-player reveal persistence, one encountered rewrite path, link-by-update, the borrowed egress context, one scene read per request) in 4.3, 6.1, 10.3, 14; v0.21 records #41 (the height model: metres, `height` and `eye_height` as GM-only registered props with a token override, eye height 93% by default, walls full height unless the GM gives a height) in 5.7, 6.1, 8, 9, 14; v0.22 records #42 (the wall model: independent sight/movement switches with door settings and a sight-only direction, kinds as presets, a derived `kind` label, the v1 preset table, and secret/locked unobservable to players) in 1, 3.1, 5.1, 5.5, 5.8, 6.1, 7.4, 8, 14; v0.23 records #44 (low walls: see-over as a per-target predicate over the strict fog polygon, movement blind to height, the floor behind a low wall left unexplored, and the GM-only who-sees-it view) in 5.7, 5.8, 5.9, 7.4, 14. All of Q1-Q24 are RESOLVED or DEFERRED; none OPEN). Audience: the owner and coding agents.
Legend: Legend:
- **[FIXED]** owner decision, not up for debate here. - **[FIXED]** owner decision, not up for debate here.
@@ -368,11 +368,11 @@ What the vertical dimension is made of, and in what unit. Vision only: what a lo
- **GM-only.** Both keys are in the `gm` bucket, so no player frame carries either: the `token` frame's `props` is `public` plus `owner` for the controller (6.1), and a player never reads the `gm` bucket. Players see only the outcome, their sight. - **GM-only.** Both keys are in the `gm` bucket, so no player frame carries either: the `token` frame's `props` is `public` plus `owner` for the controller (6.1), and a player never reads the `gm` bucket. Players see only the outcome, their sight.
- **Limits** [FIXED (owner-delegated), 2026-11-15, #41]: every height > 0; `height` <= 100 m; `eye_height` <= 100 m and **may exceed** `height` (a floating eye); a wall's height > 0 and <= 100 m. The registered kind is enforced on write, so a non-number is `invalid` (8, 9). - **Limits** [FIXED (owner-delegated), 2026-11-15, #41]: every height > 0; `height` <= 100 m; `eye_height` <= 100 m and **may exceed** `height` (a floating eye); a wall's height > 0 and <= 100 m. The registered kind is enforced on write, so a non-number is `invalid` (8, 9).
- **First registered keys.** `height` and `eye_height` are the first two keys of the property-schema registry (8, 9): `kind` number, bucket `gm`. This is the first time the server interprets props, so the "the server never interprets props in v1" wording of 8 and 9 is narrowed to **the server interprets only registered keys used by core sight rules** (6.1, 8, 9). - **First registered keys.** `height` and `eye_height` are the first two keys of the property-schema registry (8, 9): `kind` number, bucket `gm`. This is the first time the server interprets props, so the "the server never interprets props in v1" wording of 8 and 9 is narrowed to **the server interprets only registered keys used by core sight rules** (6.1, 8, 9).
- Deferred: whether the *target's* height matters for see-over (a giant's head over a fence) -> #44 "Low walls: sight and movement"; what height existing tokens and characters get at migration (`height` is required) -> #49 "Wall wire format, schema and migration". - Deferred: what height existing tokens and characters get at migration (`height` is required) -> #49 "Wall wire format, schema and migration". The *target's* height in see-over (a giant's head over a fence) is settled by #44 (5.9): the target's top is what has to clear the line.
- Conflict note (settled later): section 1's non-goals (windows/transparent walls, one-way walls) and Q6's `wall`|`door` only were contradicted by the wall-model work. That is 5.8 [FIXED, 2026-11-15, #42], which superseded both; this block fixed heights and units only, and what a low wall hides (#44) and thickness (#45) are still open. - Conflict note (settled later): section 1's non-goals (windows/transparent walls, one-way walls) and Q6's `wall`|`door` only were contradicted by the wall-model work. That is 5.8 [FIXED, 2026-11-15, #42], which superseded both; this block fixed heights and units only, and what a low wall hides (#44) and thickness (#45) are still open.
### 5.8 Wall switches, presets, doors and one-way [FIXED (owner decision), 2026-11-15, #42] ### 5.8 Wall switches, presets, doors and one-way [FIXED (owner decision), 2026-11-15, #42]
What a wall's behaviour is made of. Heights are 5.7; what a low wall does to sight and movement is #44; thickness is #45; the wire and the migration are #49. What a wall's behaviour is made of. Heights are 5.7; what a low wall does to sight and movement is 5.9 (#44); thickness is #45; the wire and the migration are #49.
- **Behaviour is independent switches, not a kind [FIXED (owner decision), Q1].** A wall carries its own settings and the server reads those. A named kind is only a preset over them. Rejected: a fixed kind enum as the record's behaviour, and client-interpreted free flags; the client may send a preset name, and the **server** expands it and validates the resulting switch set (6.1). - **Behaviour is independent switches, not a kind [FIXED (owner decision), Q1].** A wall carries its own settings and the server reads those. A named kind is only a preset over them. Rejected: a fixed kind enum as the record's behaviour, and client-interpreted free flags; the client may send a preset name, and the **server** expands it and validates the resulting switch set (6.1).
- **v1 switches [FIXED (owner decision), Q2].** `blocks_sight: bool`, `blocks_movement: bool`; door settings `door: bool`, `open: bool`, `secret: bool`, `locked: bool`; one direction field `sight_dir: "both"|"left"|"right"` (default `both`). No light axis, no sound axis in v1 (and none on the map). - **v1 switches [FIXED (owner decision), Q2].** `blocks_sight: bool`, `blocks_movement: bool`; door settings `door: bool`, `open: bool`, `secret: bool`, `locked: bool`; one direction field `sight_dir: "both"|"left"|"right"` (default `both`). No light axis, no sound axis in v1 (and none on the map).
- **Direction is sight only [FIXED (owner decision), Q4].** `sight_dir` says sight is blocked from one side only; movement is always governed by `blocks_movement` and is two-way (a one-way wall blocks movement both ways). `left`/`right` are the sides of the wall's `a -> b` order read from `a` to `b`; `left` names the side whose view across the wall is blocked. Which side the editor offers first, and what a one-way wall does to explored cells and tiles, is #47. - **Direction is sight only [FIXED (owner decision), Q4].** `sight_dir` says sight is blocked from one side only; movement is always governed by `blocks_movement` and is two-way (a one-way wall blocks movement both ways). `left`/`right` are the sides of the wall's `a -> b` order read from `a` to `b`; `left` names the side whose view across the wall is blocked. Which side the editor offers first, and what a one-way wall does to explored cells and tiles, is #47.
@@ -394,9 +394,28 @@ What a wall's behaviour is made of. Heights are 5.7; what a low wall does to sig
No `window` preset in v1. The switch set *can* express the see-through door of Fantasy Grounds and Roll20 (a door with `blocks_sight:false`, `blocks_movement:true`: look through it while closed, open it to pass), but "window" also names Foundry's distance-limited wall, which two booleans cannot express, and `terrain` already covers the fixed see-over barrier. v1 therefore ships no preset under that ambiguous name; #47 picks the meaning. No "blocks nothing" preset either: a segment that blocks nothing is a marker, not a barrier, and the editor deletes instead. No `window` preset in v1. The switch set *can* express the see-through door of Fantasy Grounds and Roll20 (a door with `blocks_sight:false`, `blocks_movement:true`: look through it while closed, open it to pass), but "window" also names Foundry's distance-limited wall, which two booleans cannot express, and `terrain` already covers the fixed see-over barrier. v1 therefore ships no preset under that ambiguous name; #47 picks the meaning. No "blocks nothing" preset either: a segment that blocks nothing is a marker, not a barrier, and the editor deletes instead.
- **Derived label, not a stored kind [FIXED (owner-delegated), #42].** The record stores the switches. `kind` survives on the wire as a read-only label derived from them (exact match with the preset table above, else `custom`); it is never an input and never the authority, so the label and what the rules do cannot drift. Rejected: storing `kind` next to the switches. - **Derived label, not a stored kind [FIXED (owner-delegated), #42].** The record stores the switches. `kind` survives on the wire as a read-only label derived from them (exact match with the preset table above, else `custom`); it is never an input and never the authority, so the label and what the rules do cannot drift. Rejected: storing `kind` next to the switches.
- **Where the switches live [FIXED (owner-delegated), #42].** Typed, validated fields on the wall record and in the wall payloads, defaulted server-side; never inside `flags`, because the server interprets sight and movement and `flags` stays the never-interpreted free object (6.1, 8). Whether they become columns or one validated restrictions object is #49's; the direction is named fields, not a free-form blob. - **Where the switches live [FIXED (owner-delegated), #42].** Typed, validated fields on the wall record and in the wall payloads, defaulted server-side; never inside `flags`, because the server interprets sight and movement and `flags` stays the never-interpreted free object (6.1, 8). Whether they become columns or one validated restrictions object is #49's; the direction is named fields, not a free-form blob.
- **Composition with thickness and height (hook, decided in #44/#45, not here).** The switches choose *which* predicate reads a wall: the sight wall list holds a wall only when `blocks_sight` (one-way: only for the blocked side), the movement collider only when `blocks_movement`. #44 then decides how the sight predicate treats a wall's height, #45 how thickness widens the sight footprint and the movement collider. A wall with `blocks_sight=false` is absent from the vision input entirely, height and thickness included — that is what keeps `terrain` cheap. - **Composition with thickness and height (height decided in 5.9, thickness in #45).** The switches choose *which* predicate reads a wall: the sight wall list holds a wall only when `blocks_sight` (one-way: only for the blocked side), the movement collider only when `blocks_movement`. 5.9 then decides how the sight predicate treats a wall's height, #45 how thickness widens the sight footprint and the movement collider. A wall with `blocks_sight=false` is absent from the vision input entirely, height and thickness included — that is what keeps `terrain` cheap.
- **Status model (5.5).** "Blocking wall" for `stuck`, `squeezed`, the door push and the move checks means `blocks_movement` and, for a door, closed. So a terrain wall sticks and pushes exactly as a solid wall; a one-way wall blocks movement both ways; a secret door pushes a token exactly as a solid wall would, with no signal. - **Status model (5.5).** "Blocking wall" for `stuck`, `squeezed`, the door push and the move checks means `blocks_movement` and, for a door, closed. So a terrain wall sticks and pushes exactly as a solid wall; a one-way wall blocks movement both ways; a secret door pushes a token exactly as a solid wall would, with no signal.
### 5.9 Low walls: see-over [FIXED (owner decision), 2026-11-15, #44]
What a wall shorter than a figure does to sight and movement. Heights and units are 5.7; the switches and the one-way direction are 5.8; thickness is #45; the wire and the migration are #49. Answers #41's open question: the *target's* height matters.
- **Movement is blind to height [FIXED (owner decision), #44].** "Does a low wall block movement?" is answered by `blocks_movement` alone, exactly as in 5.5/5.8. Height is a sight input and never enters the move rules, the collider, `stuck`/`squeezed` or the door push: a knee-high wall with the switch on stops a walker, and a wall with it off is walked through however tall it is.
- **See-over is a per-target predicate, not a wall flag [FIXED (owner decision), #43].** A token is visible iff its top clears the wall on the line from the viewer's eye; the visibility polygon stays **strict**, i.e. it still stops at every sight wall's line (5.1). Consequence, accepted: a visible token may stand on a cell its viewer has not explored ("floating on black"). Rejected: a permissive polygon that fogs a band nobody can see, and a "see-over" switch on the wall.
- **Geometry.** Viewer eye at the viewer token's centre with effective eye height `h_e` (5.7); target at its centre with effective height `h_t` (so its top is `h_t`). For each sight-blocking wall `W` the 2D segment eye -> target crosses (the viewer's filtered sight list, 5.8: `blocks_sight` on, closed if a door, direction permitting the block from the viewer's side), let `d_W` = distance eye -> crossing point and `d_T` = distance eye -> target centre. The sight line to the top is `h_e + (h_t - h_e)·(d_W/d_T)` high where it crosses `W`. The target is visible iff that height is **strictly greater** than `W`'s height for **every** crossed wall; equality is hidden. A full-height wall (no `height` prop, 5.7) is absolute: nobody sees over it, a giant included.
- **Consequences, all intended [FIXED (owner decision), #44].** No "adjacent always visible" exception and no distance rule. A crouched figure right behind a low wall is hidden while a distant figure behind the same wall is seen; a figure shorter than the viewer's eye is seen over a wall from far away and not from close up. A giant's head over a fence: yes, when it clears the line.
- **No per-cell height test [FIXED (owner decision), #44].** The floor behind a low wall stays unexplored and black, no tile is sent, and neither the polygon, `cellsTouched` nor `tiles.nim` learns about the band. There is no per-cell elevation in v1; the predicate is per target, not per cell.
- **Players get a binary answer [FIXED (owner decision), #44].** Visible or not; when visible the whole token is drawn and its name/status behave as today. No clipping, no partial-body drawing, no cover rules (a rules-engine judgement, non-goal 1).
- **GM-only who-sees-it view [FIXED (owner decision), in v1, #44].** The GM can see, per token, which player(s)/characters see it and its **visible fraction**: the share of the token's height above the highest blocking sight line, 100 % when nothing is crossed (definition below). GM-only, derived from data the GM already receives (all walls, all tokens, the `gm` props), so no player-visible field is added; never on a player wire in any form. The panel's shape is M4 editor/fog work (7.4).
- **Delegated knobs [FIXED (owner-delegated), #44].**
- Comparison strict, equality hidden, evaluated at the wall's near face (v1 walls are zero-width, so the crossing point is the wall; #45 fixes the near face for a thick wall). *Why: a body exactly level with the wall top is not above it.*
- Every crossed sight wall must clear; the predicate is an AND, so one failing wall hides the token. Candidate walls come from the existing radius-bbox cull, so the cost is per crossed wall and adds no fan (research #39: the predicate is not part of the polygon). *Why: one rule, one pass, zero geometry.*
- Hook at `visibleTo` (`server/vision.nim`): visible iff `insideAny(pos)` **or** the predicate. `visibilityPolygon`, `cellsTouched` and `tiles.nim` never read a height. *Why: the token-visibility rule stays in one copy (10.3's fault classes rely on it) and the fan is untouched.*
- Visible fraction: per crossed wall the required top is `h_req(W) = h_e + (h_w - h_e)·(d_T/d_W)`, and `f_W = clamp((h_t - h_req(W))/h_t, 0, 1)`; the token's fraction is the **minimum** over crossed walls, 1 when none is crossed. `f = 0` exactly when the predicate hides it, because the comparison is strict. *Why: the same predicate read as a number cannot drift from the binary answer.*
- In the GM view a player's fraction for a token = the **maximum** over that player's tokens that see it. *Why: the player does see it from that one.*
- Oracles [FIXED (owner-delegated), #44]. `tools/leakcheck.nim`'s `clearLine` gets its own height test (walls carry their height; a target's top is compared independently of the server's code, never by calling vision.nim). Cells in a low wall's hidden band are **maybe** for the independent explored/tile oracle: a tile there may be allowed or refused, both correct, but a band cell may never be **sure** (a `200` on a band cell is legitimate, a withheld proof cell never). A token hidden only by the band gives no `token` frame, no name and no encountered entry, and no churn: no alternating frames as a position crosses the line. The assertions land with the build tickets (/to-spec), not here.
- Deferred: nothing about see-over itself. A `terrain` wall is unaffected (it never reaches sight, 5.8). Whether the client or the server computes the GM's numbers is M4's build call.
--- ---
## 6. Protocol ## 6. Protocol
@@ -688,6 +707,7 @@ Prototype `client/src/main.ts`: explored rects appended to a `Graphics` mask for
- Mouse: wheel zoom, drag pan, drag token. Touch: one finger drag/pan, two-finger pinch/pan [MEASURED works on Note 10]. - Mouse: wheel zoom, drag pan, drag token. Touch: one finger drag/pan, two-finger pinch/pan [MEASURED works on Note 10].
- Wall editor (GM) [FIXED, Q6, extended by 5.8]: click-click segments, snap to grid/endpoints optional, delete, undo of last edit [PROPOSED]; submits `wall.*` intents; server is the validator. A preset row (`wall` (default), `door`, `secret door`, `locked door`, `terrain`, `one-way wall`) sets the switches for a one-drag default; an **advanced** toggle exposes the raw switches (`blocks_sight`, `blocks_movement`, `sight_dir`, `door`, `open`, `secret`, `locked`) for a custom wall. The editor draws `kind` (the derived label) only; no preset is a stored kind. Thickness and height controls arrive with #45 and M4. - Wall editor (GM) [FIXED, Q6, extended by 5.8]: click-click segments, snap to grid/endpoints optional, delete, undo of last edit [PROPOSED]; submits `wall.*` intents; server is the validator. A preset row (`wall` (default), `door`, `secret door`, `locked door`, `terrain`, `one-way wall`) sets the switches for a one-drag default; an **advanced** toggle exposes the raw switches (`blocks_sight`, `blocks_movement`, `sight_dir`, `door`, `open`, `secret`, `locked`) for a custom wall. The editor draws `kind` (the derived label) only; no preset is a stored kind. Thickness and height controls arrive with #45 and M4.
- Grid snap on drop: client option, off by default [FIXED, Q18]. Server accepts any in-bounds position within the step cap and clear of walls (5.5; step cap = effective vision radius, Q18 FIXED). - Grid snap on drop: client option, off by default [FIXED, Q18]. Server accepts any in-bounds position within the step cap and clear of walls (5.5; step cap = effective vision radius, Q18 FIXED).
- Who-sees-it view (GM only) [FIXED (owner decision), 2026-11-15, #44]: for each token, which player(s)/characters see it and its visible fraction (5.9, 100 % when unobstructed). GM-only and never on a player wire; the panel's shape belongs to the M4 editor/fog work.
### 7.5 Prediction and rollback for own moves ### 7.5 Prediction and rollback for own moves
- Players do **not** know the walls, so the client cannot predict collisions [INFERRED, consequence of strict model]. Prediction = optimistic placement of the dragged sprite, send `token.move` with `reqId` at <= 20 Hz, and a final send on release. - Players do **not** know the walls, so the client cannot predict collisions [INFERRED, consequence of strict model]. Prediction = optimistic placement of the dragged sprite, send `token.move` with `reqId` at <= 20 Hz, and a final send on release.
@@ -989,3 +1009,5 @@ Out of M3 accept, unchanged: concurrency (M5) and the 127.0.0.1 bind check (M6 d
Owner also decided 2026-11-15 [FIXED (owner decision), 2026-11-15, #41]: the height model. Heights are metres, decimal; map distances stay px and no map scale is introduced, because see-over compares heights with heights (research #39 3.3). `height` and `eye_height` are properties, not fields: a character carries the base value, a plain token must carry its own (`token.create` without one is refused), a linked token uses the character's value and may carry a temporary on-map override that never writes the character. Effective token height = token override, else character, else the plain token's own. Eye height follows the same pattern; if nobody set one by hand anywhere it is 93% of the effective token height and follows changes live [93% FIXED (owner-delegated)]. A wall is full height (nobody sees over it) unless the GM gives it one in metres; existing walls are unchanged. Both keys live in the `gm` bucket, so players see only the outcome, their sight. They are the first two keys of the property-schema registry (`number`, `gm`), so "the server never interprets props in v1" becomes "the server interprets only registered keys used by core sight rules". Limits [FIXED (owner-delegated)]: all heights > 0; `height` <= 100 m; `eye_height` <= 100 m and may exceed `height`; a wall's height > 0 and <= 100 m. Deferred: the target's height in see-over (#44) and the height existing tokens and characters get at migration (#49); wall kinds were settled afterwards by #42 (5.8, v0.22), while thickness (#45) and what a low wall hides (#44) stay with map #38. See 5.7, 6.1, 8, 9. Owner also decided 2026-11-15 [FIXED (owner decision), 2026-11-15, #41]: the height model. Heights are metres, decimal; map distances stay px and no map scale is introduced, because see-over compares heights with heights (research #39 3.3). `height` and `eye_height` are properties, not fields: a character carries the base value, a plain token must carry its own (`token.create` without one is refused), a linked token uses the character's value and may carry a temporary on-map override that never writes the character. Effective token height = token override, else character, else the plain token's own. Eye height follows the same pattern; if nobody set one by hand anywhere it is 93% of the effective token height and follows changes live [93% FIXED (owner-delegated)]. A wall is full height (nobody sees over it) unless the GM gives it one in metres; existing walls are unchanged. Both keys live in the `gm` bucket, so players see only the outcome, their sight. They are the first two keys of the property-schema registry (`number`, `gm`), so "the server never interprets props in v1" becomes "the server interprets only registered keys used by core sight rules". Limits [FIXED (owner-delegated)]: all heights > 0; `height` <= 100 m; `eye_height` <= 100 m and may exceed `height`; a wall's height > 0 and <= 100 m. Deferred: the target's height in see-over (#44) and the height existing tokens and characters get at migration (#49); wall kinds were settled afterwards by #42 (5.8, v0.22), while thickness (#45) and what a low wall hides (#44) stay with map #38. See 5.7, 6.1, 8, 9.
Owner also decided 2026-11-15 [FIXED (owner decision), 2026-11-15, #42]: the wall model. A wall's behaviour is **independent switches**, and a named kind is only a **preset** over them: never a fixed kind enum in the record, and never client-interpreted free flags (the client may send a preset name; the server expands and validates it). v1 switches are `blocks_sight` and `blocks_movement` plus the door settings `door`, `open`, `secret`, `locked` and one direction field `sight_dir` (`both|left|right`); no light or sound axis. Direction is **sight only**: movement is two-way governed by its switch. A door is a wall with `door` set and independent `open`/`secret`/`locked` settings, not a separate kind or a state enum, and `door.set` keeps working as "set `open`". The switches describe the closed wall: an open door blocks neither sight nor movement. A secret door is always closed and two-way (`open:true` or `sight_dir != both` on it is `invalid`), so it can look exactly like a solid wall. `secret` and `locked` are GM-only and never observable to a player in any form; the obligations are byte-identical player frames and refusals for a closed secret door against a solid wall, and one uniform move nack. v1 presets (one-drag editor defaults and the GM's label) are `wall` (default), `door`, `secret door`, `locked door`, `terrain` (blocks movement, not sight: railing, bushes) and `one-way wall`; there is no `window` preset until #47 gives windows a rule, and "blocks nothing" is not a preset. The record stores the switches; `kind` survives on the wire as a derived read-only label (exact preset match, else `custom`), never an input and never the authority [FIXED (owner-delegated)]. The switches are typed validated fields on the record and in the payloads, not entries in the never-interpreted `flags`; columns vs one validated object, and the existing-row migration, are #49's [FIXED (owner-delegated)]. The GM editor has a preset row plus an **advanced** toggle that exposes the raw switches [FIXED (owner decision)]. Thickness and height compose through the switches (a wall with `blocks_sight=false` never reaches the sight predicate) and are decided in #45 and #44. See 1, 3.1, 5.1, 5.5, 5.8, 6.1, 7.4, 8, 14. Owner also decided 2026-11-15 [FIXED (owner decision), 2026-11-15, #42]: the wall model. A wall's behaviour is **independent switches**, and a named kind is only a **preset** over them: never a fixed kind enum in the record, and never client-interpreted free flags (the client may send a preset name; the server expands and validates it). v1 switches are `blocks_sight` and `blocks_movement` plus the door settings `door`, `open`, `secret`, `locked` and one direction field `sight_dir` (`both|left|right`); no light or sound axis. Direction is **sight only**: movement is two-way governed by its switch. A door is a wall with `door` set and independent `open`/`secret`/`locked` settings, not a separate kind or a state enum, and `door.set` keeps working as "set `open`". The switches describe the closed wall: an open door blocks neither sight nor movement. A secret door is always closed and two-way (`open:true` or `sight_dir != both` on it is `invalid`), so it can look exactly like a solid wall. `secret` and `locked` are GM-only and never observable to a player in any form; the obligations are byte-identical player frames and refusals for a closed secret door against a solid wall, and one uniform move nack. v1 presets (one-drag editor defaults and the GM's label) are `wall` (default), `door`, `secret door`, `locked door`, `terrain` (blocks movement, not sight: railing, bushes) and `one-way wall`; there is no `window` preset until #47 gives windows a rule, and "blocks nothing" is not a preset. The record stores the switches; `kind` survives on the wire as a derived read-only label (exact preset match, else `custom`), never an input and never the authority [FIXED (owner-delegated)]. The switches are typed validated fields on the record and in the payloads, not entries in the never-interpreted `flags`; columns vs one validated object, and the existing-row migration, are #49's [FIXED (owner-delegated)]. The GM editor has a preset row plus an **advanced** toggle that exposes the raw switches [FIXED (owner decision)]. Thickness and height compose through the switches (a wall with `blocks_sight=false` never reaches the sight predicate) and are decided in #45 and #44. See 1, 3.1, 5.1, 5.5, 5.8, 6.1, 7.4, 8, 14.
Owner also decided 2026-11-15 [FIXED (owner decision), 2026-11-15, #44]: low walls. A token is visible iff **its top clears every sight wall the line from the viewer's eye crosses**, strictly: the sight line's height at the wall (`h_e + (h_t - h_e)·d_W/d_T`) must exceed the wall's height, and one failing wall hides it. The target's own height therefore matters (a giant's head over a fence, a crouched figure hidden next to the wall it would clear from further away); there is no adjacent-visible exception and no distance rule. The visibility polygon stays **strict**, so the floor behind a low wall stays unexplored and black, no tile is sent, and a visible token may stand on a black cell; no per-cell height is tested anywhere. Movement never reads height: `blocks_movement` alone decides, so a knee-high wall with the switch on stops a walker. Players get a binary answer and the whole token, with no clipping and no cover percentages (a rules-engine judgement, still a non-goal). The GM gets a GM-only **who-sees-it** view: per token, which player(s)/characters see it and its visible fraction (the share of its height above the highest blocking sight line, 100 % unobstructed), derived from data the GM already receives, never on a player wire, its panel shape M4's. Knobs delegated: strict comparison with equality hidden, evaluated at the wall near face; every crossed wall must clear; the hook sits at `visibleTo` as `insideAny or predicate` with heights never entering `visibilityPolygon`; no "see-over" switch on the wall; the hidden band's cells and tiles are oracle-*maybe*, a band-hidden token gives no frame, name or churn, and the leak checker's clear-line oracle gets its own height test. See 5.7, 5.8, 5.9, 7.4.