Cave generatorvshcave
Caves that generate themselves: first as a 2D map, then as 3D walls inside VenRad.

How it works
- Noise. A grid is filled at random from a seed.
- Smoothing. Each cell looks at its neighbours and decides whether it’s wall or floor. After a few passes, rooms appear. (cellular automaton)
- Connecting. Rooms are detected and joined with the shortest possible paths. (flood fill and minimum spanning tree)
- Corridors. They’re traced between rooms with an uneven width, so they don’t look ruler-drawn. (Bresenham and value noise)
The same seed always gives the same cave.
From map to 3D
At first it was one cube per cell, and it looked like Minecraft. Now the walls follow the cave’s outline: the edge is extracted, smoothed and raised into 3D. (marching squares and Chaikin)

Still to do
The floor and ceiling are still built per cell and don’t match the smoothed walls.
Next
A noise module shared across the engine, going from caves to worlds (villages, fields, cities), and a version that runs on this site.