feat(walls): player markers — emission, opaque ids, storage, resync (#59)
A wall that is player_marker:true and derives window sends a player one anchor (the drawn midpoint, integer px) and an opaque per-player 12-char id once any point of its segment enters that player's vision polygon. Markers live in PlayerVision like explored, persist to marker_seen in the same derived-memory transaction, load before the first connection and resync as a full set after explored; the GM and other players never receive one. - markers.nim: emission gate, visible-extent test, id mint, anchor, marker_seen I/O. - views/main: PlayerView markers + full/diff frames, refresh sync, startup load. - markers.test.mjs: window preset, switch off, solid wall, any-part anchor, walk-away/door/lost sight, full-after-explored, per-player privacy, GM none. - leakcheck: marker allowed type + independent visible-extent oracle with a positive control (a marked window the subject sees). - restart: marked window in the fixture; marker set and marker_seen rows identical before/after SIGTERM and SIGKILL. - protocol/tviews: catalogue and frame order pin the 16th message. Retraction, re-earning and MARKER_* faults are #60. Ref #59
This commit is contained in:
+13
-11
@@ -441,20 +441,22 @@ from the prototype, what was missing, what the M3 build added, and the tools it
|
||||
oracle-refused (a withheld proof cell still fails). Fault class `ONEWAY` (built) — the
|
||||
player-facing computation drops `sight_dir`, so the one-way wall becomes two-way — with its
|
||||
injected fault (`LEAK_FAULT=oneWay`) and exact-class assertion, shaped like the existing classes.
|
||||
- **Player marker (#48; shape fixed by #49; planned: Walls r1 #59/#60).** Once planned Walls r1 #59
|
||||
lands, `leakcheck.nim` allows the `marker` type and, with its own code (never calling `vision.nim`),
|
||||
checks that a marker exists for a player exactly when some
|
||||
point of the wall's visible extent has entered that player's polygon **and** the wall is
|
||||
`player_marker:true` and derives `window`, and that the frame carries only the opaque marker id and
|
||||
the anchor: anything else is `WALLDATA`/`MARKER_EXTRA`. Positive control: a window in the open yields
|
||||
exactly one marker once its anchor is seen; a wall behind a sight blocker, `player_marker:false`, or a
|
||||
solid wall with the switch on yields none. Faults: `MARKER_EARLY`, `MARKER_EXTRA`, `MARKER_OFF`.
|
||||
Retraction is checked GM-side: removing the wall, clearing the switch or moving the geometry retracts
|
||||
the marker, never sends the new position early, and writes no explored cell or tile.
|
||||
- **Player marker (#48; shape fixed by #49; emission/storage/oracle built #59; retraction and the
|
||||
exact fault classes #60).** `leakcheck.nim` allows the `marker` type and, with its own code (never
|
||||
calling `vision.nim`), checks that a marker exists for a player exactly when some point of the
|
||||
wall's visible extent has entered that player's polygon **and** the wall is `player_marker:true`
|
||||
and derives `window`, and that the frame carries only the opaque marker id and the anchor: anything
|
||||
else is `WALLDATA`/`MARKER`. Positive control: a marked window the subject sees yields exactly one
|
||||
marker at its drawn midpoint; a wall behind a sight blocker, `player_marker:false`, or a solid wall
|
||||
with the switch on yields none. The oracle's expected set accumulates like explored memory, so
|
||||
walking away, a door or lost sight never makes a sent marker wrong. Faults `MARKER_EARLY`,
|
||||
`MARKER_EXTRA`, `MARKER_OFF` and retraction (removing the wall, clearing the switch, moving the
|
||||
geometry retracts the marker, never sending the new position early and writing no explored cell or
|
||||
tile) remain #60.
|
||||
- **Wall fields, storage and migration (#49).** Three gates. **Leak:** `BannedAlways` contains every
|
||||
wall field name (`thickness`, `position`, `height`, `blocks_sight`, `blocks_movement`, `sight_dir`,
|
||||
`player_marker`, `door`, `open`, `secret`, `locked`, `label`, `a`, `b`), so any of them in a player
|
||||
frame is `WALLDATA`; `marker` is an allowed server type with its own oracle (planned: Walls r1 #59);
|
||||
frame is `WALLDATA`; `marker` is an allowed server type with its own oracle (built #59);
|
||||
positive control: a wall
|
||||
`height` injected into a player `token` frame fails with exactly `WALLDATA`. **Migration:** a
|
||||
schema-7 fixture (both wall kinds, an open door, non-empty `flags`, tokens and a character with props)
|
||||
|
||||
Reference in New Issue
Block a user