Voxel Game Maker

Docs User guide

Generating levels

Let the Generate tab build dungeons, caves and arenas for you, from ready-made starters or from rooms you built by hand.

A level can have a generator: a small graph of nodes that builds the whole level for you. That means rooms and corridors, floors and walls, the player start, stairs up and down, locked doors with their keys, goals, monsters and loot. Press F12 (or View ▸ Generate Level…) with a level open to get to the Generate tab.

#Your first generated level

  1. Open a level, or make a new one, and press F12.
  2. Pick a starter: Dungeon crawl, Gem hunt, Caves, Key & locked door, Boss arena, Endless delve, Room pieces or Open field. It uses your project's own models.
  3. Press the dice button until you like the layout in the preview. Layouts you've seen stay under the map as small pictures; click one to go back to it.
  4. Press ▶ Play this layout to walk that exact layout in the game.
  5. Choose In the game:
    • Same level every play: always this layout. Deeper floors get fixed layouts of their own.
    • New layout every play: a fresh layout each run and each floor.
    • What's in the level: what Generate into level built, with your own edits.
  6. Press ✓ Check 20 to try 20 seeds at once. Any seed with a problem (no way to the exit, a goal that couldn't be placed) is listed; click it to look.

#Play this layout or Generate into level

  • ▶ Play this layout is a test run. It saves, opens the game in a new window and starts you inside the layout you see, at the floor shown. The level itself doesn't change.
  • Generate into level builds the layout into the level as real tiles and objects, then shows it in the Level tab so you can move things, add things or delete things by hand. In the game switches to What's in the level, so your edits are what's played. Ctrl+Z takes it back out.

#How the graph works

Every wire carries an area: a set of tiles.

  1. The Layout node carves the level. Its output is every open tile.
  2. Area nodes narrow an area down (rooms, corridors, the end room, along walls, far from the start…). They chain: Rooms → Far from start → Along walls.
  3. Build nodes lay floors and walls and add the player start, the Exit, a Way up, Portals, Locked areas and Secret rooms.
  4. Goal nodes add objectives. A locked Exit opens once they're all done.
  5. Place nodes scatter monsters, loot and decoration.

New nodes arrive filled in with your likeliest models and wired to their usual area. Drop models or prefabs from the bottom panels onto a node's boxes to change them. + Node ▸ Recipes adds ready-made groups of nodes, such as a treasure room, a boss every 3rd floor, guards, torches, a way up, levers or a secret room.

#Tutorial: build a dungeon from your own rooms

The Room pieces layout joins small levels you built by hand, door to door. Here's how to make your own set.

#1. Make a world for your pieces

Open the World Map panel and click + World. Name it "Dungeon pieces". This keeps your pieces apart from the levels players visit.

#2. Make a piece

In that world, click + Level and name it "Small room". It opens in the Level tab (F1).

  1. Floor: with the rectangle brush, paint a 7×7 square of a floor model (any model tagged ground) on the bottom level.
  2. Walls: put a wall on every tile around the edge.
  3. Doorways: leave a gap of one tile in the middle of the north wall and one in the south wall. A doorway is floor on the edge of the piece with no wall on it.
  4. Decorate: add a torch, a chest, a monster. Everything you place comes along when the piece is used. Keep the tiles just inside each doorway clear.

#3. Make a few more

Pieces only join where doorways of the same width face each other, so keep every doorway one tile wide while you learn. A good first set:

Piece Doorways Why
Entry 1 Where the player starts
Hub (9×9) 4 Lets the dungeon branch
Hall (3×9) 2, at the ends Joins rooms together
Corner (7×7) 2, on two sides Turns the path
Boss room (13×13) 1 The end of the dungeon

Pieces are turned to fit, so one hall covers both north–south and east–west.

#4. Hook them up

  1. Open the level you want to generate and press F12.
  2. Add a Room pieces layout (or start from the Room pieces starter).
  3. Open the Explorer on the left (it folds away on this tab to give the graph room) and drag your pieces onto the node's Pieces box. A higher weight on a piece means it's used more often.
  4. Set Start piece to your Entry and End piece to your Boss room.
  5. Make sure there's a Walls node: it closes off doorways that lead nowhere.

#5. Try it

Press the dice button a few times, then ✓ Check 20, then ▶ Play this layout.

If a piece never shows up, check that its floor is a ground model on the bottom level, that its gaps are on the outermost edge, and that its doorways are the same width as the others. The side panel lists a piece with no doorway as a problem.

The Room pieces starter makes 6 example pieces in a Room pieces world. Open them to see how they're built, or copy one to start your own.

#Going up and down

  • Exit goes one floor deeper. Set Last floor and After the last floor, go to to finish in a hand-built boss lair or back in town.
  • Way up goes back up a floor, arriving next to that floor's Exit. On floor 1 it leads out to a level you pick, next to the door that leads in.
  • Portal is a door to any level.
  • ⇄ Connect adds a door from your start level into the dungeon and a Way up back out, in one step.

Floors stay as you left them. Go down and come back up and the layout is the same, what you picked up is still gone, and finished goals stay finished. Saves keep all of it. {floor} holds the floor number for HUD texts and scripts.

#Recipes

  • Key hunt: the Key & locked door starter locks the room with the stairs.
  • A dungeon under your overworld: a door in the overworld leads to the generated level; its Way up leads back; its Exit's last floor leads to a hand-built boss lair.
  • A boss every 3rd floor: Goal: defeat the boss, When every 3rd floor, Tougher / floor 25%.
  • Themed floors: two Floor nodes in the same One of group.
  • A shop in every dungeon: Stamp a room with a small shop level you built.