I am working on a roguelike game written in Haskell. I've decided to represent the world as a 2D grid using Data.Array.Repa
, now I wish to dynamically generate random dungeons which can contain corridors that are either straight or turn 90-degrees, and rooms which can be of (almost) any size and shape.
I'm having trouble figuring out a strategy to generate these dungeons. A drunkard's walk might work, but it seems like it might be too erratic and wouldn't produce many rooms. What is a better approach to generating the dungeons?
Also, is Data.Array.Repa
a good choice of data structure to use here?