38 lines
1.9 KiB
Markdown
38 lines
1.9 KiB
Markdown
# Observer browser mode
|
|
|
|
Milestone 009 adds a password-free observer role to the same local browser
|
|
application. The role is still authenticated by its temporary session token,
|
|
but joining it does not request a player name or consume either player slot.
|
|
At most four observer sessions are connected at once.
|
|
|
|
## Projection and authorization
|
|
|
|
An observer renders only the server's `observer` view projection. That
|
|
projection contains all maze cells, remaining objects, both player positions,
|
|
inventories, effects, exit state, phase, and result. The browser does not
|
|
simulate movements or infer updates. Each player status also reflects the
|
|
server-owned WebSocket connection state. A complete projection establishes the
|
|
server-approved static geometry on join, restoration, and match start.
|
|
Subsequent bounded projections replace all dynamic player and object state
|
|
while reusing only that authoritative geometry, avoiding an 8,192-cell
|
|
retransmission after every move.
|
|
|
|
The observer screen contains no movement, start, or drop-key control. This is
|
|
only presentation-level defense: the gateway also rejects and logs observer
|
|
`start`, `move`, and `drop_key` attempts before they reach authoritative
|
|
mutation. Disconnecting an observer changes only lobby presence and never
|
|
pauses the game.
|
|
|
|
## Viewport and navigation
|
|
|
|
At `1024 x 768` CSS pixels and above, the complete `128 x 64` default map is
|
|
initially scaled to fit the available stage. The observer can zoom with the
|
|
labelled buttons or mouse wheel and pan with pointer dragging. Zoom is bounded
|
|
between 0.25 and 6 times the eight-pixel base cell size; the **Вся карта**
|
|
control restores the calculated fit and centered position.
|
|
|
|
When either viewport dimension is below the supported minimum, the map and
|
|
controls are hidden and the Russian message **Нужен экран побольше** explains
|
|
the `1024 x 768` requirement. All assets remain local and use the shared
|
|
retro-arcade visual language.
|