Last time, I outlined the major systems that make The Ocean Machine feel alive. Today I went deeper and started locking down the architecture at a more practical level. The goal is to build a simulation that doesn’t just look alive, but behaves consistently, scales upward, and stays debuggable as complexity increases.
The big update: the project is now clearly structured around three core pillars, each made of two tightly paired subsystems. Together, these are the “engine” that drives the ecosystem.
Pillar 1: World + Spatial Systems
This pillar answers a simple question: what exists, where is it, and how do other systems find it?
World & Spatial Systems — the world state stays authoritative, and the octree makes “local context” and searching fast and scalable.
World Systems (Source of truth)
The World System is the authoritative “truth” about what the simulation is at any moment. It owns the list of entities (creatures, points of interest, obstacles/structures), manages global parameters (boundaries, time scale, simulation tick), and ensures updates happen in a stable order. If something needs the current state of the world, it comes from here.
Spatial Organization System (Octree)
The Spatial Organization System is the world’s spatial structure for locality and fast searching. Instead of brute-forcing “what’s near me?” checks, space gets partitioned into regions of dynamically varying sizes (octree). That supports stable, predictable spatial queries (nearby entities, obstacles, signal sources) and makes it possible to scale the ecosystem up without performance collapsing.
Why this matters:
This is the backbone that makes everything else possible — perception, avoidance, targeting, signals, and efficient updates all depend on it.
Pillar 2: Sensing + Environmental Signal Systems
This pillar answers: what invisible forces exist in the world, and what does a creature actually ‘notice’?
Sensing & Environmental Systems — signals exist and evolve in the world, and perception turns them into a stable list of stimuli per creature.
Environmental & Signal System (The world’s measurable forces)
The Environmental & Signal System is how the simulation creates and manages invisible forces over time — disturbances, attraction/repulsion zones, flow influence, points of interest, and anything that decays or blends. Importantly, it outputs a standardized “signal format” that other systems can interpret, and it can also generate aggregated info for secondary displays.
This is where the world becomes computable just like ecology: things propagate, fade, overlap, and influence behavior.
Perception & Sensing System (How creatures sample the world)
The Perception & Sensing System is how creatures turn raw world data into a compact set of “stimuli.” Creatures don’t scan everything. They query the spatial system for candidates, evaluate distance/intensity/line-of-sight/relevance (based on species traits like range or skittishness), then produce a ranked “stimulus list.”
This is where the simulation shifts from “data exists” to “something is perceived.”
Why this matters:
This is the difference between scripted reactions and believable behavior. Creatures respond to computed conditions, not pre-baked triggers.
Pillar 3: Artificial Behavior + Interaction Systems
This pillar answers: given what was perceived, what does the creature decide, and how does it act?
Artificial Behavior & Interaction — perception becomes intent, intent becomes motion, and motion creates new signals that feed back into the world.
Behavior & Decision System (Intent)
The Behavior & Decision System turns a creature’s stimulus list into intent. Instead of reacting constantly, it prioritizes goals (flee, investigate, forage, idle, hunt) and maintains short-term commitment to prevent jitter. This system chooses targets, sets goal conditions, and outputs “what the creature is trying to do right now.”
Action & Movement System (Execution)
The Action & Movement System executes intent through motion: steering, obstacle avoidance, path planning, and side effects. It takes intent + constraints (speed, turn rate, energy, buoyancy, size) and produces actual movement and interactions. Importantly, movement can emit new signals (disturbances), feeding back into the sensory loop.
Why this matters:
This is where “alive” becomes visible. If motion is believable and stable, the entire ecosystem reads as real.