Skip to content

v1.22.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 14:25
· 43 commits to main since this release

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 synced uint/int property (0 = global), AuthorityScope.SetInterest/ClearInterest/InterestOf, Connection.SetInterest, AuthorityScope.RequireInterest, InterestSet and InterestGrid2D (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 (see docs/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's server_info.
  • ServerHost.MaxSendQueueBytes and ConnectOptions.MaxSendQueueBytes; the default (8 MiB) and how to raise it are documented in transport.md.
  • OG0017 also covers [InterestKey] declarations.
  • A listen: entry takes maxSendQueueBytes; ListenConfig.MaxSendQueueBytes is 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.
  • InterestRequiredException and World.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 ClientJoined handler that throws refuses that one client instead of stopping the server.
  • A transfer's Moved notice 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.