Prim's Algorithm is a tree-based algorithm that can be used to generate mazes. I added a visual simulation for it that allows you to visualize the maze generation process and mess around with colors, cell sizes, etc. It also allows you to add rooms.
View it in the browser!:- Visualize Maze
- Modify settings live. I used ImGui. You can modify
- Colors, color waves or pulses
- Time / distance adjustment for color waves
- Cell size
- Room settings - number, sizes, etc
You should be able to resize the window as well. Have fun using it!
This is a Cmake project, with builds for Emscripten or local stuff. I use Find_Package to pull in dependencies:
ImGUI files are included directly in the project, as per the documentation.
Building the project is easier using the CMakePresets.json file.
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config ReleaseYou can also build for emscripten if you'd like:
mkdir build-web
cd build-web
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release
emmake cmake --build . --config Release