M3 — Area of Interest (spatial partitioning + local chat) #5

Closed
opened 2026-07-16 23:04:47 +02:00 by marco · 1 comment
Owner

Players should only see and receive updates for nearby entities. Also makes say local, closing the global-chat tech debt.

Scope

  • Spatial partitioning (grid buckets / AoI) on the server.
  • Spawns/moves/chat broadcast only to observers within range.
  • Correct appear/disappear as players cross region boundaries.
  • say becomes local (interest-scoped).

Definition of Done

Base DoD applies on top (tests green, whole solution builds, zero warnings, multi-platform preserved); the criteria below are the issue-specific delta.

  • With 3 clients spread out, a player receives join/move/said only for others within the defined range (near sees, far does not).
  • say reaches only nearby players; the global-chat tech debt is closed and the range is documented.
  • Crossing a region boundary produces correct appear/disappear for observers (verified in-game).
Players should only see and receive updates for nearby entities. Also makes `say` local, closing the global-chat tech debt. ## Scope - [ ] Spatial partitioning (grid buckets / AoI) on the server. - [ ] Spawns/moves/chat broadcast only to observers within range. - [ ] Correct appear/disappear as players cross region boundaries. - [ ] `say` becomes local (interest-scoped). ## Definition of Done _Base DoD applies on top (tests green, whole solution builds, zero warnings, multi-platform preserved); the criteria below are the issue-specific delta._ - [ ] With 3 clients spread out, a player receives join/move/said only for others within the defined range (near sees, far does not). - [ ] `say` reaches only nearby players; the global-chat tech debt is closed and the range is documented. - [ ] Crossing a region boundary produces correct appear/disappear for observers (verified in-game).
Author
Owner

Done and merged to main (commit 7c60def).

Players now only receive join/leave/move/say for entities within a Chebyshev radius (GameOptions.AoiRadius, default 12). Each tick reconciles every observer's visible set (InterestManager + pure, unit-tested InterestDiff); entering view sends PlayerJoined, leaving sends PlayerLeft, and chat is scoped to the speaker's area of interest. The world map was enlarged (48x36) so AoI is observable.

Closes the "chat say is global" tech debt. Verified: unit tests (visibility diff, Chebyshev range) + integration tests (a far player is absent from Welcome and never seen; chat reaches nearby but not far listeners), with per-test server isolation. 128 tests green, zero warnings. No change to the IsoMmo.Shared/Protocol wire contract and the client is unchanged — join/leave-on-AoI reuse the existing messages.

Done and merged to `main` (commit 7c60def). Players now only receive join/leave/move/say for entities within a Chebyshev radius (`GameOptions.AoiRadius`, default 12). Each tick reconciles every observer's visible set (`InterestManager` + pure, unit-tested `InterestDiff`); entering view sends `PlayerJoined`, leaving sends `PlayerLeft`, and chat is scoped to the speaker's area of interest. The world map was enlarged (48x36) so AoI is observable. Closes the "chat say is global" tech debt. Verified: unit tests (visibility diff, Chebyshev range) + integration tests (a far player is absent from Welcome and never seen; chat reaches nearby but not far listeners), with per-test server isolation. 128 tests green, zero warnings. No change to the `IsoMmo.Shared/Protocol` wire contract and the client is unchanged — join/leave-on-AoI reuse the existing messages.
marco closed this issue 2026-07-17 07:38:36 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo#5
No description provided.