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.
31 lines
1.4 KiB
Markdown
31 lines
1.4 KiB
Markdown
# The server alone decides what each player sees
|
|
|
|
Every client is untrusted, including the GM's browser. The server computes per-player vision and
|
|
explored area, builds a typed per-recipient view, and sends only the diff; client-side fog is
|
|
cosmetic. All bytes to a player leave through one egress module that accepts a recipient and that
|
|
recipient's view, and raw world state has no code path into it. We chose this over trusting the
|
|
client to hide fog or over sending world state and filtering in the browser, because a modified
|
|
client must learn nothing it is not entitled to.
|
|
|
|
## Status
|
|
accepted
|
|
|
|
## Alternatives
|
|
- Trust the client with the full world and draw fog client-side: rejected, one devtools tab defeats
|
|
it.
|
|
- Send a filtered frame from each handler: rejected, filtering spreads across the codebase and a new
|
|
frame is a new leak surface.
|
|
- Enforce the boundary by discipline in a `sync()` function (the prototype): kept as the fallback,
|
|
replaced by distinct `PlayerView`/`GmView` types.
|
|
|
|
## Consequences
|
|
The server recomputes vision on every relevant mutation and holds per-player explored state, so it
|
|
needs the vision budget of current §5.3. A new message type must be built inside the egress or it
|
|
cannot reach a player. Leak testing is possible because there is one place to audit.
|
|
|
|
## Tickets
|
|
#11 (wire catalogue), #20 (typed views and single egress).
|
|
|
|
## Spec
|
|
Current §2 (trust boundary, single egress rule), §3.1 (what each role receives), §3.4 T1/T2.
|