Stream bounded reactive gameplay state

This commit is contained in:
Meta Vens 2026-07-19 11:17:13 +01:00
commit 68b91b2196
7 changed files with 105 additions and 22 deletions

View file

@ -107,6 +107,14 @@ under Unity `Assets/Scripts/ServerShared/Behaviors`.
pilot input capability; then the pilot and sector-map Eve surfaces; then the
daemon SoA view, CultMesh body publication, and Eve entity view; finally the
remaining topology surfaces when topology publication is requested.
- **Reactive combat state:** the retained pilot topology advertises an embedded
reactive-surface slot. `combat.presentation` exists only in that
frame-versioned fragment alongside feedback and shot receipts; the topology
cannot retain an older selection, visibility, lock, or target-meter value.
Current combat variables are republished at the fragment version; feedback
events and shot receipts include only facts newer than the previously
published fragment. Their retained daemon arrays remain persistence/history,
not a growing payload retransmitted to every client.
- **Derived state:** pilot/map surfaces and input capability are projections of
the prepared authoritative frame and catalog. SoA documents are bulk render
projections; they do not own command acceptance, beam feedback, or gameplay
@ -116,8 +124,11 @@ under Unity `Assets/Scripts/ServerShared/Behaviors`.
facts. No client or renderer may repair delayed control state from a newer
entity slab.
- **Shared path:** initial publication and ordinary prepared-frame publication
both call `PublishDaemonApiDocumentsAsync`, so the same ordering applies to
boot and live ticks.
both call `PublishDaemonApiDocumentsAsync`. The live loop publishes hot SoA
bodies every simulation tick and periodic control/reactive documents on the
prepared-publication cadence, so those planes are not one atomic generation.
Consumers must use each document's version; a static topology value may not
impersonate newer reactive state.
- **Cut line:** bulk SoA publication no longer precedes the pilot/map control
surfaces on the ordered state stream.
- **Verification layer:** daemon tests should assert record order at the

View file

@ -294,6 +294,15 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
`weapon.lock.started`, `weapon.lock.acquired`, and `weapon.lock.lost` events
with prior/current progress. Eve projects those events generically while the
continuous combat presentation remains the reticle's state owner.
`combat.presentation` lives only in the frame-versioned reactive Eve surface
mounted through the pilot topology's embedded-document slot. The retained
topology advertises that slot and cannot publish a second, stale combat node.
Selection, visibility, hostility, lock progress, and target meters are derived
from the same daemon frame as feedback and shot receipts; generic lowerers
compose that provider-owned fragment without acquiring combat semantics.
The fragment carries current combat variables plus only feedback and shot
facts newer than its previous published frame. Retained event and receipt
arrays are daemon history and never become an ever-growing reactive snapshot.
Sensor, radiator, reactor, and capacitor behaviors publish typed state rows
for ping state, radiator temperature/throughput, reactor draw/load, and
capacitor charge/capacity/efficiency. Aether drives publish typed axis,