Home

Worlds That Run on Their Own

A set of simulation experiments that change on their own through local rules, worked on off and on since 2017. What's left is code for the Game of Life and a desert water-heat reaction, plus an unfinished draft for temperature.

TYPE
Simulation experiments driven by local rules
STATUS
Rules and prototypes exist; none of them is finished
WHEN
2017 to present
BUILT WITH
Unity and Bevy, written in C# and Rust
WHO
Just me

What this is

These experiments let local rules drive the change. Some are about cells living and dying, some about temperature and matter passing between neighboring cells. The earliest entry in my dev log is from December 2017, and I was already thinking about building game worlds with cellular automata (cells and their neighbors) back then.

The engine changed several rounds. Laya in 2017, Phaser in 2018, Unity and Bevy from 2021 on. I compared a few engines in May 2024, and built the desert experiment in Bevy in April 2026. The original projects from the first two stages are lost; the later stages still have commit records or files.

The engines along the way2017Layafirst notes on a world of cells2018Phasercarried on in another engine2021Unity, Bevytemperature on a 3D grid2022Unity2D birth and death rule2024Bevythe same rule, engines compared2026Bevywater, heat and chemistry in a desertcommits or files foundin the development notes only; originals not found

FIG. 1 · The engines I went through

Years and engines follow the dev log. Solid boxes are stages with surviving commit records or files; dashed boxes only appear in the log.

Cells only look at their neighbors

The Unity version defaults to a 100 × 100 grid, and each cell starts alive with 50% probability. Each cell only counts the eight cells around it. The left edge connects to the right and the top to the bottom, so edge cells have eight neighbors too.

A live cell stays alive with two or three live neighbors. A dead cell is born only with exactly three. Anything else becomes dead. All cells read from the current round's array and write into the next one, and the arrays swap only after every cell is done, so the result doesn't depend on which cell gets computed first. The code advances one round per frame, with no separate timer.

Birth and death with eight neighborsBIRTH AND DEATH WITH EIGHT NEIGHBORSCount the eight surrounding cellsselfThe center is excludedNext state by live neighbor countLive countAlive nowDead now0deaddead1deaddead2alivedead3alivealive4deaddead5deaddead6deaddead7deaddead8deaddeadAlive: survives with 2 or 3Otherwise deadDead: born with 3Otherwise stays deadRead the old grid, write the next grid, then exchange them.The cells illustrate the neighborhood; they are not a historical run.

FIG. 2 · One round of cell updates

A diagram drawn from the rules in the code, not a screenshot.

The ground changes water and reactions

The desert prototype stores water, minerals, dissolved matter, organic precursors, and heat in continuous arrays, 512 × 512 cells by default, and one cell doesn't map to one entity. It advances three steps per frame by default, adjustable from 1 to 24, and can be paused. Seven views and a mouse probe let me look at the whole field or a single cell.

Each step handles rainfall first, then water flow, heat diffusion, and diffusion of dissolved matter, and runs reactions after applying those changes. Sand, rock, clay, and reflective flats each have their own parameter set. Water retention controls how long water stays, flow parameters control water movement and diffusion, and catalysis parameters control mineral weathering and synthesis.

The water and heat values here are experimental numbers with no real-world unit calibration, so heat shouldn't be read as degrees Celsius. Step count follows the frame, so how fast the same rules run also depends on the frame rate.

Base parameters for four ground presetsBASE PARAMETERS FOR FOUR GROUND PRESETSRetention01Permeability01Catalysis01Sand0.140.820.07Rock0.050.130.18Clay0.760.20.46Reflective flat0.080.340.03Base presets; each cell also receives noise and clamping.Normalized parameters; physical units are not calibrated.

FIG. 3 · Base parameters of the four ground types

The numbers are the ground base parameters in the code, on a 0 to 1 scale with no calibrated physical units. Every cell also gets perturbation at runtime, so the table isn't any cell's final value.

Organics aren't life yet

Rain dissolves minerals. Water, heat, and ground parameters together affect the synthesis of organic precursors, and the organics then decay, partly back into dissolved matter. What I call "organics" here is just a numeric field. There's no replication rule yet, and the life value isn't updated.

The reaction suitability on screen is only a display and statistics score; crossing the threshold doesn't mean life is born. Conservation of mass isn't built yet. Dissolved matter only diffuses along concentration gradients and isn't carried along by the water flow.

Where it stands