Skip to content

Spatial Tiers — Multi-Resolution Simulation #228

Closed

Description

@nockawa

Summary

Extend Typhon's ECS with spatially coherent entity clusters, per-cluster R-Trees, and a tiered simulation system. Game code runs different systems at different frequencies for different spatial regions, enabling 10M entities within ~43% tick budget.

Design Docs

Key Architecture Choices

  • Shared grid, single cell size across all spatial archetypes (Q1)
  • Transient cell state — cluster-to-cell mapping rebuilt from entity positions at startup (Q2, Q6)
  • Per-archetype per-cell R-Trees with lazy allocation, static/dynamic split (Q10)
  • One-tick stale spatial index accepted between movement and migration fence (Q3)
  • Parallel per-cell bulk loading for 10M entity seeding (~160ms) (Q4)
  • Dealloc empty clusters only — no compaction (Q5)
  • Game owns tier policy — runtime provides helpers (SetCellTierMin, ResetAllTiers) (Q7)
  • Checkerboard = one DAG node, two internal phases (Q8)
  • Tier-filtered change detection — iterate tier clusters, check bitmap word per cluster (Q9)

Dependency Graph

#229 Spatial Clusters + Migration <-- foundation
 |-- #230 Per-Cell Cluster R-Trees + Query
 |-- #231 Tier System + Dispatch
 |    |-- #233 Cluster Dormancy
 |    +-- #234 Checkerboard + Budget Metrics
 +-- #232 Tick Lifecycle Integration (depends on #229, #230, #231, #233)

Critical Path

#229 -> #230 + #231 (parallel) -> #232

Sub-issues

Activity

  1. moved this to In Progress in Typhon devon Apr 9, 2026
  2. changed the title [-]Spatial Tiers — Multi-Resolution Simulation (Umbrella)[/-] [+]Spatial Tiers — Multi-Resolution Simulation[/+] on Apr 9, 2026
  3. moved this from In Progress to Done in Typhon devon Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions