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.
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.
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.
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
- What exists: two versions of the Game of Life rules, drafts for temperature creation and averaging, and the desert code for water, heat, and non-life reactions.
- In the temperature draft the spreading and adjacency parts are commented out, and the creation part has undefined variables, so it's not a working heat conduction yet.
- The Unity Game of Life creates display objects for the whole grid every frame. The Bevy version draws once at startup and never updates the image as cells change.
- The branch that uses Chinese characters as materials went on by itself; see Text cultivation.