BSc project · Solo · UE5 C++
Cave Generation Tool
A procedural cave generator for Unreal Engine 5, written in C++ with a custom cellular automata system.
- Role
- Tools developer
- Time
- 8 weeks
- Engine
- UE5 C++
- Grade
- 79%
01 // Why
Why I made it
Building cave layouts by hand in Unreal is slow.
I wanted a tool that generates one in seconds, with enough settings that a designer stays in full control of the result.
02 // How
How I built it
I prototyped it in Blueprints, then rewrote it in C++ when generation got too slow. A cellular automata system, inspired by Conway's Game of Life, fills a 2D grid at random, then neighbour rules smooth it into caves over several passes.
Seeds make results repeatable, and corridors and rooms, with optional loot, are carved on top.
Every value is exposed in the Details panel, so designers can tune the output without touching code.
03 // Play
Generate a cave
This is my cave tool rebuilt for the web, with the same cellular automata rules and settings as the Unreal version.
Press Generate to watch random noise smooth into a cave one pass at a time. Then tweak the Details panel, try a preset, or paint your own rock and smooth it.
This mini game needs JavaScript turned on.
05 // Settings
Everything you can tweak
- Grid Seed
- The seed for generating the grid. 0 picks a random one.
- Seed Lock
- Use the seed above when on, or a random seed when off.
- Grid Size X
- How many cells the grid has along X.
- Grid Size Y
- How many cells the grid has along Y.
- Grid Scale Z
- The height of the generated grid.
- Cell Spacing X
- Spacing between cells along X.
- Cell Spacing Y
- Spacing between cells along Y.
- Fill Probability
- The chance of each cell starting filled.
- Number of Iterations
- How many times the cellular automata rules run.
- Empty Neighbour Threshold
- A filled cell with fewer live neighbours than this becomes empty.
- Fill Neighbour Threshold
- An empty cell with at least this many live neighbours becomes filled.
- Number of Corridors
- How many corridors to carve.
- Corridor Length Min
- The shortest a corridor can be.
- Corridor Length Max
- The longest a corridor can be.
- Corridor Thickness
- Corridor width. Diagonal corridors get one extra.
- Allow Straight Corridors
- Lets straight corridors generate.
- Allow Diagonal Corridors
- Lets diagonal corridors generate.
- Allow Room Spawning
- Turns room generation on or off.
- Number of Rooms
- How many rooms to generate.
- Room Size Minimum
- The smallest a room can be.
- Room Size Maximum
- The largest a room can be.
- Allow Room Loot
- Spawns loot inside rooms.
- Loot Height
- The height loot spawns at.
- Room Loot
- The object to spawn as loot.
- Grid Mesh
- The static mesh used for each cell.
- Grid Material
- The material applied to each cell.
06 // Documents
Read the docs
Contact
Like what you see?
I’m looking for gameplay and systems design roles. Email is the quickest way to reach me.


