Skelitten Games

Quick-Start Guide

This page provides a minimalistic guide on how to set up everything needed to generate a basic dungeon.

The guide assumes you deleted all demo content. Everything will be created from scratch.

Important Concepts

  • A module is a piece of a dungeon that the generator can work with.
  • Modules connect to other modules through connectors.

Creating the Data Assets

Create the following assets (Content Browser → right-click → Dungeon Generator):

  1. Dungeon Connector Type
    • This defines the style or dimensions of an opening. Name it something like Normal Door, Small Vent, or Round.
    • Open the asset and set a fitting Display Name.
    • Optional: Also provide a Preview Mesh that shows the dimensions of your door or vent.
  2. Dungeon Module Set
    • This defines the theme of your modules. Name it something like Lava, Ice, or Moon.
    • Open the asset and set a fitting Display Name and Folder Name.
  3. Dungeon Module Type
    • This is a category for modules. Name it something like Spawn Room, Corridor, or Dead End.
    • A type should fit into multiple sets: both a lava and an ice dungeon could have a Long Corridor.
    • Open the asset and set a fitting Display Name and Folder Name.
  4. Dungeon Graph
    • This asset allows us to define rules for how a dungeon should generate. Name it something like Basic Dungeon.
    • Open it and drag out of Dungeon Start → Module.
    • Set the Module node to use your Module Type.
    • Set the Count to something like 10.

Creating a Module

Start by opening the Dungeon Tools (Top bar → Tools → Dungeon Tools). 

In the Dungeon Tools Widget:

  1. Make sure the dropdowns are set to use the Module Set and Module Type you created earlier.
  2. Click on Create new module. This creates and opens a new level.
  3. Build the module. For example, you could build a room using your game's assets. Or you could create a simple space using the Cube Grid Tool.
  4. Find ConnectorMarker1 in the Outliner. Select it → Details panel → Set the Connector Type to use the type you created earlier. If you assigned a Preview Mesh, it will appear now.
  5. Place one Connector Marker in each opening that should lead to another module. You must place at least one Connector Marker per module. For now, I recommend placing at least two (because modules with only one Connector Marker can only be used as a start or end module).

The Connector Marker arrow must point outside of your module and must begin exactly where the level geometry ends.

  1. Select your level geometry and click Create module bounds.
    • This creates a Module Bounds Piece around all selected geometry.
    • These bounds let the generator know how much space this module occupies.
    • Make sure that no Connector Marker arrows start inside these bounds.
    • Bounds are convex, but you can create multiple bounds if needed to define a concave shape. 
  2. If you want a minimap:
    • Open Project Settings → Search for Supported Agents → Add a new agent named "Minimap".
    • In Dungeon Tools, click Create Nav Bounds → Click Create Minimap Mesh.
  3. Save the level → Click Save module data.

For more information, check out Modules and Dungeon Tools, Connectors, and Minimap System.

Generating a Dungeon

Finally, we need to set up the generator and spawner components.

  1. Open your Game Mode.
    • If you're using the plugin in a replicated environment, reparent your Game Mode to Dungeon Game Mode or Dungeon Game Mode Base.
    • Add a Dungeon Generator Component (unless you just reparented, the Dungeon Game Modes have this component by default).
    • Select the Dungeon Generator Component → In the Details panel under Events, add On Generation Finished.
    • On Begin Play → Call Generate Dungeon. Select the Dungeon Graph and Module Set you created earlier.
    • When On Generation Finished runs → Call Load Dungeon on the generator component and pass on the Dungeon ID.
  2. Open your Game State (or create one if you don't have one yet).
    • Click Add Component → Dungeon Spawner Component.
    • Make sure your Game State is set as the Game State Class in your Game Mode.
  3. Open any level and make sure there is space for the dungeon to generate.
    • Make sure you are using your Game Mode in this level (Project Settings → Default Game Mode or World Settings → Game Mode Override).
    • Press Play or Simulate. Your dungeon should now generate and load in.

For more information, check out Generating and Loading Dungeons.

Use this setup on your Game Mode.

If the dungeon is not loading in for you:

  • On your Game Mode → Dungeon Generator Component → Turn on Enable Debug, then try again.
  • Alternatively, add the On Generation Failed event to your Game Mode graph and print the Reason and Message.

Search documentation

Type to search all documentation.