Room Generation using Constraint Satisfaction | pvigier’s blog

submited by
Style Pass
2023-03-21 22:30:09

Two weeks ago, I was part of Roguelike Celebration and gave a talk on room generation using constraint satisfaction. It was great! Here is the video of my talk:

I don’t know why but the sound is a little jerky at times. :( And with my terrible accent, it may not be easy to understand certain parts. So I will transcript the talk in this article.

The input is simply any structure, it can be a building, a dungeon, anything. And it doesn’t matter what algorithm generated it. As it looks desperately empty, we want to fill the structure with objects, decorations and monsters. That’s what is room generation.

We can notice two things. First, it’s very intuitive to use. If we want to have a shower next to a wall, we just have to add a constraint to do so. And we have strong guarantees on the output, which is always a nice thing in procedural generation.

This is just a refined brute force approach, we will enumerate all the possible assignments by recursively assigning the variables one after the other.

Leave a Comment