|
Maze Builder Docs 7.5.6
|
Create and customize mazes on multiple platforms and languages. An example output string is shown here:
The library provides support for different export formats like Wavefront object format, JSON, and plain text or stdout.
There is an included example for parsing command-line arguments and creating JSON output:
mazebuildercli.exe -r 2 -c 5 -o 2x5.json
This example lets you build mazes with all the functionality of the computer terminal.
Run the binary_tree algorithm with long arguments and make a Wavefront object maze:
Run the dfs algorithm with short arguments:
Get some help and print to standard output:
Commands are case-sensitive!
Interface with the C++ API in a modern C++ program:

Check out the this example in a live app!
The web app can be run locally with the provided secure_http_server.py script. Once the script is running, open the browser to http://localhost:8000.
CMake is used for project configuration.
Here are the external dependencies which can be grabbed from the Internet by CMake:
Use the following CMake options to configure the project:
| CMake Option | Default | Description |
|---|---|---|
| MAZE_BUILDER_EXAMPLES | OFF | Build with project examples enabled |
| MAZE_BUILDER_COVERAGE | OFF | Build with code coverage using CppCheck |
| MAZE_BUILDER_TESTS | OFF | Build with testing using Catch2 |
| MAZE_BUILDER_DOCS | OFF | Build the docs using doxygen |
| MAZE_BUILDER_MEMCHECK | OFF | Build with Valgrind and Memcheck support |
Configure it with Ninja generator: cmake -G"Ninja Multi-Config" -S . -B build-examples -DMAZE_BUILDER_EXAMPLES:BOOL=ON
Build it: cmake --build build-examples --config Release
By default, both a shared-object library and static library are produced. The shared and static files have different naming conventions depending on the platform:
| Platform | static lib | shared lib |
|---|---|---|
| Windows | mazebuildercore_static.lib | mazebuildercore_shared.dll |
| Linux | libmazebuildercore_static.a | libmazebuildercore_shared.so |
| MacOS | libmazebuildercore_static.a | libmazebuildercore_shared.dylib |
Configure the project for testing: cmake -S . -B build-tests -DMAZE_BUILDER_TESTS:BOOL=ON
Run the tests: ctest --test-dir build-tests/tests --verbose -C Debug
Configure the examples for the Web using Emscripten and their toolchain file (or emcmake).
The Ruby script mazes.rb generates PNG images of mazes using algorithms and methods similar to the C++ library. It is a good place to start learning about the maze-generating algorithms. The Python script solver.py plays with the maze generation by loading PNG files and finding paths and networks.
Script dependencies:
gem install chunky_pngpip install numpy pillow networkx