Cave Generator

Size (10-50) Desired density (approximate %) Density:
Density is more accurate the closer to 50%

Find my code at


Set the size and the desired density, then hit Gererate to generate a new cave.

About this project

Project category Own project
Framework Browser
Syntax JavaScript
Duration 1 day
Team size 1 person
Platform PC/Browser

The goal

This project was all about an algorithm for randomly generating holes and paths in an area, like
a cave system.
With an algorithm based off of Conway's Game of Life I made cells that check the states of cells
surrounding them, to adapt to them accordlingly.

My feedback:
Pro - All made in just one afternoon.
Con - The construction of the cells is complex and slow.