Files
FFF_vtt_frozen/docs/adr/0008-thick-wall-one-rectangle.md
T
SirStone 8aaf03be04 docs: add ADRs for the durable design decisions
22 ADRs: server-authoritative sight and single egress, per-recipient views/diffs, uniform
nack, opaque ids, 32 px tile unit, wall switches/presets, see-over, thick walls, open-door
gap, typed wall columns, proto 2, build order, zoom clamp, accepted status leak, player
marker, chunked explored, slow-client policy, session/key split, closing message, character
records, global lock, synchronous choice. Each links its tickets and its spec section.
2026-11-17 23:12:04 +01:00

35 lines
1.7 KiB
Markdown

# A thick wall is one rectangle read by both sight and movement
Thickness widens the drawn `a -> b` line into a rectangle of length `|ab|` with square ends, placed
`center`, `left` or `right` of the line. The same exact rectangle is the sight footprint (four
faces, hoisted once per wall edit and viewer-independent) and the movement collider (true
circle-vs-rectangle distance, centre inside = overlap). We chose one shared shape over a generous
sight shape or a separate collider because a corner that is generous to one reader and tight to the
other is a class of bugs and leaks; and we chose the four-face quad over an observer-dependent
three-face silhouette because only the quad can be hoisted (measured 3.15x vs 8.4x on the 5k sparse
layout).
## Status
accepted
## Alternatives
- Inflate the wall by the token radius for movement: rejected, not the same shape as sight.
- Three-face near+caps silhouette: rejected, observer-dependent, cannot be hoisted, 0.699 ms/query
vs 0.263 ms hoisted quad.
- Polygon/mitre joints: rejected, a small outer notch at overlaps is acceptable and a cave is a
chain of straight walls.
## Consequences
`thickness: 0` degrades exactly to the old segment. The body is opaque floor: never in a player
polygon, never newly explored, no tile revealed under it. A token whose centre is inside a
sight-blocking body sees nothing until the GM moves it out. Wall edits never push (they set
`stuck`); only a door close pushes. The rectangle-distance primitive serves the move checks, the
status overlap, the door push and resize. Curved walls stay possible by changing the one wall-shape
function.
## Tickets
#45 (thickness), #43 (cost measurements), #47 (one-way body), #50 (door leaf and push).
## Spec
Current §5.10, §5.5, §5.9, §8.