Creating Cellular Automata Maps
Explore how to create organic and varied dungeon maps using cellular automata algorithms. This lesson guides you through implementing procedural map generation by evolving random chaos into playable, natural-looking game environments. You'll learn to apply tile rules, count neighbors, and iterate the automata to build intriguing dungeon layouts in Rust.
We’ve an empty map builder and have ported our room-based builder to use traits. It’s time to explore some more interesting dungeon generators.
Cellular automata
Cellular automata is a fun algorithm that starts with completely random chaos, but order gradually emerges as rules are applied repeatedly. This type of algorithm is great for producing organic-looking levels, such as a forest with clearings or an old cavern network. It was first popularized in Conway’s Game of Life.
Cellular automata theory
Cellular automata was originally designed to simulate organic life. Each map tile independently lives (becomes a wall) or dies (becomes open space) based on a count of its neighbors. We keep running iterations until we’ve a usable map. We can visualize the algorithm applied to each tile ...