A downloadable tool

A procedural 3D map generation tool for Godot 4, designed to help developers quickly prototype dungeons, caves, and modular level layouts directly inside the editor.

This plugin was built as part of an exploration of procedural content generation (PCG) techniques, using a combination of Cellular Automata (CA), region analysis, and rule-based content placement.

---

What it does

The Map Generator allows you to create fully procedural 3D environments with a single click. It generates not only the map layout, but also supports optional systems like navigation baking and procedural prop placement.

Under the hood, the system uses a multi-step generation pipeline:

  • Randomized initial map fill
  • Cellular Automata smoothing to create natural cave-like structures
  • Region detection using flood fill
  • Region cleanup and merging
  • Optional connection of disconnected regions
  • Scene construction using GridMap or Node-based builders
  • Optional procedural prop placement based on rules
  • Optional NavigationMesh baking for AI navigation

---

Procedural Approach

The core of the generator is based on Cellular Automata, a technique commonly used in procedural cave generation.

Instead of manually designing levels, the system evolves a random grid into structured spaces using simple rules like:

  • “If a cell has too many wall neighbors, it becomes a wall”
  • “Otherwise it becomes floor”

Over multiple iterations, this produces natural-looking cave systems and dungeon-like layouts.

---

Features

  • Procedural 3D map generation
  • Cellular Automata-based cave system
  • Open or closed map generation
  • Seed-based deterministic output
  • GridMap or Node-based rendering support
  • Optional NavigationMesh baking
  • Rule-based procedural prop system
  • Customizable map size and density
  • Support for multiple visual styles (mesh libraries)

---

Prop System

Props are generated using a flexible rule system rather than hardcoded logic.

Each prop can define:

  • Where it can spawn (floor, wall, ceiling)
  • Required conditions (adjacency, empty space, etc.)
  • Spawn probability / weight
  • Scene to instantiate

This makes it possible to extend the system without modifying the core generator.

---

Navigation Support

The plugin can optionally generate a NavigationMesh automatically after map creation, enabling immediate AI navigation using Godot’s NavigationAgent system.

---

How to Use

Install:

  • Download and copy the folder into res://addons/ in your project.
    • If you don`t have  res://addons/, manually create it.
  • Enable the plugin Project Settings → Plugins → Map Generator.

After enabled:

A dock panel will appear inside the editor.

You can set:

  • Map size (X / Y / Z)
  • Seed (for reproducible maps)
  • Open or closed map style
  • Prop density (optional)
  • Navigation generation toggle




Download

Download
cavegen.zip 4.3 MB

Comments

Log in with itch.io to leave a comment.

nice!