Cavern Painters

Last Week I showed how the skeletons for the dungeons in Lair of the Kobolds are formed. This week I worked on painters to make these dungeons more varied, and the rules that govern the painters. There are currently three kinds of painters: a painter that makes a rectangular room like the basic rooms shown in the last post, a painter that carves a windy cavern corridor between a room’s connections, and a painter that carves a blobby cavern in the room.

A dungeon using room painters

A dungeon using room painters

The dungeon creator figures out which painter to use based on rules. The main route between the entrance and the exit (stairs down in this case) has to be a cavern corridor or cavern room. Any rooms off the main path may get a cavern or rectangle. To create complexes of carved out rectangular rooms like someone lives there, the rectangles can only connect to other rectangles.

Other rules govern the system too, for instance, a dead end may only be a rectangular or cavern room, not a corridor (though some really small dead end rooms right now look like a corridor just ends.)

Eventually the room painters will also do things like insert monsters and objects into the rooms, but these simple painters will do for now.

Posted in Dungeons, Lair Of The Kobolds | Comments Off on Cavern Painters


Last week I implemented dungeons, or at least their skeletons. Right now just big rectangular rooms are being dug out, but the dungeons go all the way down to the bottom layer connected by ramps. It doesn’t look too exciting right now, but eventually, each of these skeleton rooms will get a special room painter to dig out a cavern or a troll den or a dwarven bedroom or other interesting things for the kobolds to explore.

Dungeon Skeleton

The skeleton of a dungeon in a mountainous region


This skeleton is generated using the subdivision method, which takes the whole area and repeadedly slices it in two until the desired room size is reached.

Diagram of dungeon subdivision

Next, a start and end room are selected. Preferably they are very far apart. An A* path is used to link the rooms together between start and end. After that, all other rooms are linked to these rooms

Link rooms together

Now you can stop here if you want boxy square dungeons. If you don’t, some of these rooms need to be pruned. The next part is hard to show with such small diagrams. Basically calculate all the room “tendrils” that grow from the main path. In the diagram below, the main path is yellow. We want to keep that. The tendrils are orange. Start pruning these tendrils from the ends until the desired number of rooms is reached.

Prune dead ends

The result of this is a basic dungeon shape that can now be decorated any way you like.

Posted in Dungeons, Lair Of The Kobolds | 1 Comment