/maze-generator

Generate mazes in PNG format using the depth-first search algorithm

Primary LanguageCGNU General Public License v3.0GPL-3.0

Maze generator

Generate mazes in PNG format using the depth-first search algorithm.

Description

Simple C program for generating mazes of variable size using the depth-first search algorithm. For more information, see Wikipedia.

Building

$ git clone https://github.com/8dcc/maze-generator
$ cd maze-generator
$ make
...

Usage

You can change a lot of macros in the code, like cell size, wall width, colors, entrance and exit positions, vertical and horizontal bias, etc.

$ ./maze-generator.out <output.png> <w> <h>
Generating 65x50 maze...
Writing 650x500 file...
Done.

Screenshots

maze.png