Generate and solve mazes with real-time visualisation, using DFS for generation and BFS for solving.
- Maze Generation: Create mazes using depth-first search (DFS) algorithm
- Maze Solving: Find optimal paths using breadth-first search (BFS) algorithm
- Real-time Visualisation: Watch algorithms work step-by-step
- Speed Control: Adjust visualisation speed with UP/DOWN arrow keys
- Interactive Controls: Pause, restart, and control the visualisation
- Custom Start/End Points: Click to place solver start and end points
- Configurable Parameters: Set maze dimensions and cell size via command-line arguments
Before building MazeVisualiser, ensure you have the following installed:
- .NET 9 SDK
- SFML 2.6.2
Then follow the build steps:
-
Clone the repository:
git clone https://github.com/Brooklyn-Dev/MazeVisualiser.git
-
Navigate to the project directory:
cd MazeVisualiser
-
Restore NuGet packages:
dotnet restore
-
Build the project:
dotnet build --configuration Release
-
Run the application:
dotnet run --configuration Release
- Executable:
./bin/Release/net9.0/MazeVisualiser [options]
- With dotnet:
dotnet run --configuration Release -- [options]
- Executable:
- Download the latest release from the Releases page
- Extract the archive to your desired location
- Run the executable
MazeVisualiser
Options:
-w, --width <integer> Set maze width (default 33)
-h, --height <integer> Set maze height (default 33)
-c, --cellsize <integer> Set cell size in pixels (default 20)
--help Show this help message
Controls:
SPACE Pause visualisation
R Restart generation
UP Increase visualisation speed
DOWN Decrease visualisation speed
LMB Place solver start point
RMB Place solver end point
- Black: Walls
- White: Path
- Blue: Tracked
- Cyan: Frontier
- Green: Solver start point
- Red: Solver end point
- Yellow: Shortest Path
- C# / .NET 9 - Core language and framework
- SFML 2.6.2 - Simple and Fast Multimedia Library for graphics, window management, and input handling
- SFML.Net 2.6.1 - C# binding for SFML
If you find this project interesting or useful, consider giving it a star ⭐️!