Game dev
Saved & recent

Cellular automata

Related terms: cave generation, Game of Life, smoothing

A grid where every cell updates from a simple rule about its neighbors, all cells at once, step after step. Simple local rules add up to large organic shapes.

The classic use is caves. Fill the grid at random with about 45% wall. Then repeat: look at each cell and the eight around it. If five or more of those nine are wall, the cell becomes wall. Otherwise it becomes floor. After a few steps the static has turned into caverns.

Further reading
Jim Babcock: Cellular Automata Method for Generating Random Cave-Like Levels
Random fill2 steps5 steps
Click the picture or choose New variation for a new seed.

View in the full Game dev collection