Tatami - A roguelike dungeon generation algorithm

Hi, I recently wrote an algorithm in Rust for the purpose of generating dungeons for roguelike games, and I thought I'd share it here.

Tatami is an algorithm that creates a multi-floor dungeon layout from a rooms in the shape of randomly oriented, interconnected rectangles.

The library attempts to provide many of the common features found in roguelikes, such as stairs, teleports, items, enemies and traps. It is intended to be used as a base upon which a fully featured game can be built on.

Here's an example image of what the algorithm can generate. Unfortunately, there is currently a bug causing some rooms to be generated inside each other, so this image isn't perfect.

It's actually pretty fast! On my PC, it can generate a 5-floor, 192x192 dungeon in 70ms in the release build.

If you would like to check out the project you can find it here: https://github.com/giraffekey/tatami

10 Likes

Bug fixed!

4 Likes

Looks nice, and I'm thinking about using it as inspiration for my DnD Dungeons! I'll probably write a thin binary wrapper around it

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.