Roguelike Celebration: Adam Newgas on Constraint-Based Generation

Honestly, I could devote a post to every Roguelike Celebration talk. I’ve been limiting myself to just one such post a week, on Saturdays. This one, a short sixteen minutes talk about terrain generation, is for the developers out there.

Constraint-based generation, also known as “wave function collapse,” is a system where, as objects are placed randomly during generation, the generator “solves” the world around them, placing later terrain as is necessitated by prior terrain. If the generator reaches a contradiction, a situation where there is no viable terrain that can be placed, it undoes the contradictory placement and continues from there.

It’s a technique that’s fairly popular in procedural generation circles, and among other games is used in Caves of Qud. It’s also fun to watch it work!