https://github.com/8dcc/maze-generator
Generate mazes in PNG format using the depth-first search algorithm
https://github.com/8dcc/maze-generator
Last synced: about 2 months ago
JSON representation
Generate mazes in PNG format using the depth-first search algorithm
- Host: GitHub
- URL: https://github.com/8dcc/maze-generator
- Owner: 8dcc
- License: gpl-3.0
- Created: 2024-01-31T16:13:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-01T20:53:04.000Z (over 2 years ago)
- Last Synced: 2025-02-23T12:14:31.884Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: Maze generator
#+AUTHOR: 8dcc
#+STARTUP: showeverything
Simple C program for generating mazes of variable size using the depth-first
search algorithm. For more information, see [[https://en.wikipedia.org/wiki/Maze_generation_algorithm][Wikipedia]].
* Building
#+begin_src console
$ git clone https://github.com/8dcc/maze-generator
$ cd maze-generator
$ make
...
#+end_src
* 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.
#+begin_src console
$ ./maze-generator.out [OUTPUT.png] [WIDTH] [HEIGHT]
Generating 65x50 maze...
Writing 650x500 file...
Done.
#+end_src
* Screenshots
[[file:examples/maze1.png]]
[[file:examples/maze2.png]]