Limbo Library's Roguelike Dungeon Generation [part 1]

limbo_library.gif

For Ludum Dare 47, we ended up making an action roguelike called Limbo Library which we described to ourselves as Minit meets Enter the Gungeon. One of the most programming intensive parts in our development process was implementing the random dungeon generation. We ended up referencing an article about Enter the Gungeon's dungeon generation process and implemented something similar.

The basic idea we started off with was figuring out what the key room types were. We decided there would be normal enemy rooms and elite enemy rooms as the two main types. In addition, within a run players would be able to obtain 2 chests. We also wanted to introduce a permanent upgrade for players to find and rooms that gated player progress on that upgrade. This ended up being a teleportation ability called blink and so we had a blink upgrade and blink required rooms. Finally, we planned on a boss room though a lot of content was cut due to time constraints. Below is an image of how the rooms in a run are all connected.

Ludum Dare 47(1).png

Each run, the rooms are always connected in this exact way, guaranteeing that you would need to face at least 2 elite rooms on the way to the boss and that you would need to obtain the blink ability as well. Within each room type, we would have some number of handcrafted templates. We ended up with 9 different room templates for our regular enemy rooms and 4 different room templates for our elite enemy rooms. Here is what one of the room templates looks like in the editor: room_example.png

Each room has 4 possible exits to the top, right, bottom, and left and we manually specified the coordinates of where the exits are in each room so that the dungeon generation algorithm knew how to fill in the hallways. The large blue rectangle pictured above is a collision box that causes the room to activate when a player walks into it. This raises all the doors so a player has to fight all enemies to continue onto the next room. It also tells the enemy objects to activate their attack logic.

I'll write more about how we did the actual geometry in laying out the rooms in a second blog post, but I just wanted to end with a zoomed out picture of the final result, with the room types annotated so that you can see how they correspond to the graph from earlier: dungeon_example1.png