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:
@@ -49,11 +49,12 @@ test('hello is the first frame; n counts server frames per connection, never glo
|
||||
})
|
||||
})
|
||||
|
||||
// The 15 server message types of DESIGN 6.1. A client must ignore unknown server types (6.2), but
|
||||
// the server itself never invents one: this pins the direction that is testable without a client.
|
||||
// The 16 server message types of DESIGN 6.1 (15 M3 + `marker`, 6.2 proto 2). A client must ignore
|
||||
// unknown server types (6.2), but the server itself never invents one: this pins the direction that
|
||||
// is testable without a client.
|
||||
const SERVER_TYPES = new Set(['hello', 'ack', 'error', 'roster', 'walls', 'wall', 'wall_gone',
|
||||
'vision', 'explored', 'token', 'token_gone', 'character', 'character_gone', 'encountered',
|
||||
'closing'])
|
||||
'vision', 'explored', 'marker', 'token', 'token_gone', 'character', 'character_gone',
|
||||
'encountered', 'closing'])
|
||||
|
||||
test('every server frame carries a catalogue type (nothing outside the wire catalogue)', async () => {
|
||||
await withGmServer(async (s, gmKey) => {
|
||||
|
||||
Reference in New Issue
Block a user