Why Procedural Generation Defined a Genre
Roguelikes owe their legendary replayability to algorithms that construct fresh maps, enemy configurations, and loot distributions every time a player dies. Instead of manually handcrafted levels, mathematical rules create infinite variety.
1. Binary Space Partitioning (BSP)
BSP trees recursively subdivide a 2D map into smaller rectangular bounding boxes, connecting leaf nodes with corridors to guarantee that all generated dungeon rooms remain reachable.
2. Wave Function Collapse (WFC)
Inspired by quantum mechanics, WFC examines tile adjacency constraints and collapses probability fields, creating organic caves, towns, and platforming structures that feel deliberately designed by human artists.