Luto Hominus’ Dungeon Generation

Posted by
December 20th, 2011 4:23 am

Step 1: Create a blank array of cells, each 9*9 tiles. This example uses 5*5 cells.

Step 2: Scatter points around randomly for the player, block, and kiln to spawn. Add an extra ‘dummy’ point for taste. Mark each of the cells these points are in ‘visited’.

Step 3: Draw lines from the player point to the block point, and the block point to the dummy point and kiln point. Mark each of the cells these paths touch as ‘visited’.

Step 4: Carve out the ‘visited’ cells into empty rooms. Note down exits to each room.

Step 5: Check the available exits in each room. Choose one configuration at random from five possible configurations for that exit configuration (75 room types total). Place these rooms into the correct cells.

Step 6: Output all these to a tilemap and you’re done!
(Excuse the tiny image size. One pixel = one tile.)

2 Responses to “Luto Hominus’ Dungeon Generation”

  1. ACodeGerm says:


    I did some random level generation for my game, with something like this in mind. I didn’t have the brown power to hash out something as elegant as this, but I do think I’ll use this technique on the polished version of my jam game.

    Thanks for sharing!

  2. Cell says:

    There’s a big presence of Cell’s 😛

    btw, cool :)


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]