Progress / Phase 7
Phase 7: Crowds and a Larger World
A town square holds hundreds of players who can all see each other, with each player’s bandwidth held to a budget, on a much larger map where spatial queries drive chat, combat and AI.
Phase 70 / 20 · 0%
This phase is still ahead.
7.1 Spatial queries everywhere
0 of 3 done- Say chat range and combat events use the same spatial queries.
- Mob aggro, leashing and AI perception use the zone’s spatial grid instead of scanning every entity.
- Benchmarks of the grid’s queries with 1,000 players and 1,000 mobs in one zone.
7.2 Bandwidth budgets for crowds
0 of 4 done- Per-player byte budget with a priority accumulator: nearby, moving and targeted entities first, everyone else as the budget allows (scaling.md Case 3).
- Update-rate tiers by distance (every tick, every second tick, every fourth tick), and a cap on full-rate entities per player.
- Graceful degradation under overload: as a zone’s tick nears its budget, the server lowers update rates for distant entities first and logs it; game rules never degrade.
- Tests: the budget is never exceeded, every visible entity is updated at least at its tier’s minimum rate, and nothing flickers at area edges.
7.3 A larger map
0 of 3 done- Build a large map (about 200×150 tiles) with a town, a forest edge and ruins, as the first real zone layout.
- Decision Measure client rendering and memory on the large map, and decide whether chunked loading is needed.
- Minimap showing nearby terrain and other players.
7.4 Art Batch 07: zone tiles
0 of 2 done- Draw Batch 07 by hand: forest variants, town building exteriors, lanterns, ruins, water and bridges.
- Intake and integrate.
7.5 Measurement
0 of 3 done-
make loadtest SCENARIO=crowdat Case 3 Tier 1 and Tier 2 (100 and 300 players in one area) ondev-m5, before and after the budgets, indocs/perf/phase-07.md. - Case 3 Tier 3 (1,000 in one area) run as a degradation test: the server stays up, holds its budgets and recovers when the crowd disperses.
- Client frame rate with 300 players on screen measured, and fixed if it can’t hold 60 FPS on
dev-m5.
7.6 Walkthrough
0 of 2 done-
docs/walkthroughs/phase-07-crowds.md: why fan-out is O(n²), spatial partitioning, hysteresis, priority and bandwidth budgets, and degrading gracefully. - Devlog draft, release notes, tag
v0.7.0and publish builds.
Acceptance criteria
0 of 3 done- 300 players in one area meet Case 3 Tier 2 in scaling.md on
dev-m5: tick p99 under 25 ms, at most 32 KB/s per player, every visible entity updated at least 5 times a second. - Entities don’t visibly pop in or out at area edges during normal movement.
- Server tick p99 stays under 12.5 ms with 100 bots spread across the large map.
