What's the design approach to rogue-likes?

I’ve been playing a little bit of Spelunky and have come across a few other rogue-likes and can’t help but wonder how they accomplish random level generation. Of course tiles need to match in order to create the proper aesthetic but the program goes beyond that in its object placement.

What is the high level logic/design approach for random level generation?

There’s been a bunch of articles and talks about level generation in Spelunky. Here’s a nice two-part series.

I’ve seen a talk about Vlambeer’s Nuclear Throne where they explained that their “generator” is basically an AI bot which uses a set of rules to walk around semi-randomly, carving out the level as it goes.

OrangePascal also wrote a few articles about this topic in his tech blog.

There’s a number of ways to do random generation for roguelikes, actually! for spelunky, Mark Brown made an excellent video about how Spelunky’s levels were made:

a TL;DW for the video is that Spelunky’s levels are on a 4x4 grid, starting at the top and placing a room randomly either left, right, or down. when the path tries to go down at the bottom level, an exit is made. Then, one of a large number of rooms created by Derek Yu that fits the room type needed is used, potentially with additions in non-essential tiles. Following the level map, enemies and lot are weighted based on where in the map they generate in order to encourage certain types of play. In essence, the levels are half generated and half created.

As for the actual design approach, it really depends on how your game plays. The mechanics of your game will largely shape what you want out of a level, and so you’ll most likely have to experiment to figure out what exactly you want your game to play like. Sorry I can’t give more helpful advice on this one.

I think this largely depends on what kind of game you (exactly) want to create, solutions that work in one game might not work in case of another game.

There are some general approaches to procedural level generation in roguelikes:

  • Fully random world (example: Dwarf Fortress Adventure Mode)
  • Mostly random world with some predefined areas - for example, in places where this is important for a story/progression (example: Desktop Dungeons)
  • World composed from predefined nodes connected randomly (example: Binding of Isaac)

There are also some roguelikes with no random level generation at all, for example the Hammerwatch.

Complexity of level generation depends mostly on selected approach and aspects specific to your game - for example, doing Binding of Isaac style random generation is very easy to implement, while the one in Dwarf Fortress took months or even years to create and polish. If you want to have good looking levels, the more randomness you add the harder it gets to achieve that.

@OrangePascal will be able to answer this question very well.

Awesome video. In fact, awesome channel, thanks for sharing!

Off topic, but two of my favorites of his are



I’ve been developing a roguelike in Java myself, the Roguebasin Articles page has been a massive help: http://www.roguebasin.com/index.php?title=Articles. Also have a browse on the RoguelikeDev subreddit: https://www.reddit.com/r/roguelikedev/.