Voxel Game Maker

Docs Tutorials

Generated dungeons

Let the Generate tab build a dungeon for you, with a new layout every play and floors that get harder as you go down.

In the editor: Welcome ▸ Tutorials ▸ 3.5 ▸ ▶ Start goes on in your My Playground project with this lesson's checklist.

Build · about 40 minutes · Advanced mode

What you'll make: a dungeon that builds itself, a new layout every time you play, with stairs that lead to deeper and harder floors.

What you'll learn: the Generate graph: Layout, Area, Build, Goal and Place nodes, and the settings that change from floor to floor.

Before you start: do A HUD of your own. Switch to Advanced with Basic | Advanced on the toolbar.

#1. Start from a starter

  1. Press F12 (View ▸ Generate Level…). The Make a world questions are on the left.
  2. Set Place to Dungeon. Leave Layout on Going down and Floors on 3 floors.
  3. Press Make it. A new world with a level called Dungeon is added, and its node graph opens beside the questions.
  4. Press 🎲 Try another until you like the layout in the preview on the right.
  5. Press ▶ Play this layout.

Play it now: walk the dungeon and find the stairs down.

#2. Read the graph

Every wire carries an area: a set of tiles. The nodes run from left to right:

  • The Dungeon node carves rooms and corridors. Try changing its Rooms.
  • Area nodes such as Rooms and End room narrow the area down.
  • Build nodes lay the Floor and Walls, the Spawn point, the Exit down and the Way up.
  • Goal nodes add what the player must do. Goal: reach is already there; you'll add a boss in step 4.
  • Place nodes such as Scatter put monsters and loot in the rooms.

To change what a node places, drop a model or prefab from the bottom panels onto its box.

#3. A new layout every play

In the questions on the left, untick Same layout every time. In the game now says New layout every play. Press ✓ Check 20 to try 20 seeds at once. Any seed with a problem is listed; click it to look.

Play it now: play twice. The layout is different each time.

#4. Deeper floors get harder

  1. On the Dungeon node, set + rooms each floor down to 1.
  2. On the Scatter node that places monsters, set + more each floor down % to 50, and Gets harder deeper down to a little.
  3. Click + Node ▸ Recipes ▸ Boss every 3rd floor.
  4. Set the Floor box on the toolbar to 3 and look at the preview. The When fields go by it.

Play it now: take the stairs down twice. Each floor has more rooms and more monsters.

#5. Show the floor

In your HUD, add a Text with Floor {floor}. {floor} is the floor number.

#Try it yourself

  • On the Exit, set Last floor to 5 and After the last floor, go to a small boss room you build by hand.
  • Put two Goal nodes in the same One of group so each floor picks one of them.
  • Press ⇄ Connect to (it names your start level) to add a door from your start level into the dungeon.

#Learn more

#Next

Take apart: Endless Delve.