Repository navigation
v1.22.0
Per-connection spatial interest: a connection receives only the part of a scope it is looking at, so a scope with many players no longer costs every client the whole world. RecursiveAI.OneGame.Physics ships as 1.22.0-preview.1.
Added
[InterestKey]on a synceduint/intproperty (0 = global),AuthorityScope.SetInterest/ClearInterest/InterestOf,Connection.SetInterest,AuthorityScope.RequireInterest,InterestSetandInterestGrid2D(cells with enter/leave radii, sticky entity keys). Entities entering and leaving a connection's interest are sent as additions and removals; joins carry only in-interest entities. Works for clients, peer nodes and relays, needs no wire change (1.21 clients and servers interoperate), and keeps view hashes and drift checks exact. Hot tables and random streams are not filtered (seedocs/interfaces/sync.md).SubmitResult.OutsideInterest; a command to an entity outside the connection's view is answered as an unknown entity.AuthorityScope.Traffic(bytes per entity type),EntitiesSent,EntitiesRemoved,FrameBytes,SnapshotBytes, listed per scope by the server'sserver_info.ServerHost.MaxSendQueueBytesandConnectOptions.MaxSendQueueBytes; the default (8 MiB) and how to raise it are documented intransport.md.- OG0017 also covers
[InterestKey]declarations. - A
listen:entry takesmaxSendQueueBytes;ListenConfig.MaxSendQueueBytesis its code form. ServerHost.ClientJoined: raised when a client is admitted, before its first message, so a game can set its interest before the first snapshot.IBoundedSendChannel: transports with a bounded send queue report how full it is.InterestRequiredExceptionandWorld.HiddenTablesOnly: once a scope requires interest, making its random streams visible or adding a visible table later is refused.
Changed
- A node paces what it sends over a bounded transport: a snapshot (or any burst) larger than the send queue is fed in as acknowledgements free room instead of overflowing at once. What waits is capped, and overflow still closes the link.
- A server logs a send-queue overflow with the setting to raise instead of a bare "left".
- A
ClientJoinedhandler that throws refuses that one client instead of stopping the server. - A transfer's
Movednotice names only the entities each watcher could see, and commands from such a watcher to an entity in transit are held or forwarded as before.