A downloadable project for Windows

The purpose of this app is to play around with the mazegen library parameters. If you have some requests about the library or the program, please comment here or in the issues on github.com.

Mazegen is a maze generation library based on Bob Nystrom's approach, described here https://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/

The library https://github.com/aleksandrbazhin/mazegen

The source for the demo https://github.com/aleksandrbazhin/mazegen_sfml_example
For other platforms than Windows you have to build it yourself, although it's not hard

Algorithm and UI parameters

Refer to https://github.com/aleksandrbazhin/mazegen readme for more details on the algorithm. In short:

1. Throws rooms randomly `Room place attempts` times. If the room overlaps others it is skipped`.

2. Grows the maze by random walk, wiggling with a `wiggle chance`, from every point. Unlike the original it has user-defined constraints which are first to be used as growth starting points.

3. Connects rooms to all the adjacent halls by the doors once. Each hall region is connected at least once.

4. If the room is connected to an already connected region, the door is removed with `1 - extra connection chance`. Unlike the original, there is no flood fill to test for connectivity, instead union-find is used for maze regions.

5. Deadends are removed with `1 - deadend chance`. If `deadend chance` is 0, the maze just connects all the constraints and the rooms without any blind halls.

6. Deadends adjacent to the rooms are connected with `reconnect deadends chance`. This step is not in the original, but leads to a more natural looking maze - who would build a hall close to the room and not build a door?

Just play around with sliders, not much you can do with it


Download

Download
mazegen-sfml.zip 3.1 MB

Leave a comment

Log in with itch.io to leave a comment.