Parts of the programming in the
Hunger Games Roguelike use Mazes for things that aren't Maze related, which might be of interest. The Hunger Games Simulation is a part of the
Maze program Daedalus, and so has access to many Maze creation and solving abilities, which can be used to help create landscape features. Consider the random arena map above, which is a flat wooded grassland with rivers, lakes, mountains placed upon it:
Rivers: We want to have random river-like lines crossing the arena. To do this, we create a Maze (a "perfect" Maze with no loops) the same size as the arena, then solve it leaving a single squiggly line. Each additional entrance on the edge of the bitmap results in an additional line or fork in the river. (The river in the map above is from a Maze with four entrances/exits, one on each edge of the bitmap.) The solved path is expanded slightly so that fanfold passages will merge into each other, resulting in a slightly wider section there, so the river realistically has different widths in different areas. The Maze is generated with the
Growing Tree algorithm, which has the right amount of curviness (curvier than
Prim's Algorithm, but not as curvy as
Recursive Backtracking).
Lakes: To have lakes, mountains (and meadows which are open spaces in the trees) we want to create irregular boundary shapes. To do this, we start creating a Maze in a separate bitmap using Prim's Algorithm, which semi-roughly "flows" outward from a start point. Stop creating the Maze after a certain number of cells, then expand the paths slightly so the passages cover adjacent walls, and the shape of the visited cells forms a nice random blob, which can then be randomly placed over the arena. For example, lakes will occasionally have small islands in them.