Songs of Syx Under the Hood: Data-Oriented Java for 100k Agents

Songs of Syx Under the Hood: Data-Oriented Java for 100k Agents

Engine & Tech Stack

  • Engine / language: a custom engine written in Java, rendering through LWJGL and OpenGL, built specifically to simulate very large populations.

  • Map representation: a 2D tile grid for the settlement, with a separate world and region layer above it.

Core AI & Decision Making

  • Agents: citizens run lightweight, data-oriented behaviour instead of heavy per-agent AI, so tens of thousands can update cheaply.
  • Dispatch: labour is matched to jobs, rooms and industries, and the wider economy is resolved at an aggregate level.

State Management & Data Architecture

  • Model: data-oriented design that avoids per-object overhead, storing agent attributes in compact arrays so the simulation scales to huge counts.
  • Rooms and services: housing, food and industry track state at the room and aggregate level rather than per-tile wherever possible.

Tick Scheduling & Performance Tricks

  • Batched updates: update loops are staggered so the whole city does not recompute every frame, and costlier systems run at coarser intervals.
  • Design goal: the engine deliberately trades per-agent fidelity for throughput, which is what enables the massive population counts.

Pathfinding & Spatial Systems

  • Routing: grid pathfinding with region and room abstraction keeps movement cheap across large maps and crowds.
  • Partitioning: region structure bounds searches and keeps crowd routing scalable.

Follow us on social media for updates