Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nexusgksoftwares/maze-project
Maze Generator and Solver Welcome to the Maze Generator and Solver project! ๐ This C++ application, powered by SDL2, creates and solves mazes with captivating visuals. Experience the beauty of algorithms as you watch mazes being generated and solved before your eyes. Ready to dive in? Let's get started!
https://github.com/nexusgksoftwares/maze-project
cpp csharp maze maze-algorithms maze-game maze-generation-algorithms maze-generator
Last synced: 2 days ago
JSON representation
Maze Generator and Solver Welcome to the Maze Generator and Solver project! ๐ This C++ application, powered by SDL2, creates and solves mazes with captivating visuals. Experience the beauty of algorithms as you watch mazes being generated and solved before your eyes. Ready to dive in? Let's get started!
- Host: GitHub
- URL: https://github.com/nexusgksoftwares/maze-project
- Owner: NexusGKSoftwares
- License: mit
- Created: 2024-10-30T18:56:48.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T19:18:47.000Z (3 months ago)
- Last Synced: 2024-12-18T06:33:33.136Z (about 2 months ago)
- Topics: cpp, csharp, maze, maze-algorithms, maze-game, maze-generation-algorithms, maze-generator
- Language: C++
- Homepage:
- Size: 311 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
---
# ๐ Maze Generator and Solver
Welcome to the **Maze Generator and Solver** project! ๐ This C++ application, powered by SDL2, creates and solves mazes with captivating visuals. Experience the beauty of algorithms as you watch mazes being generated and solved before your eyes. Ready to dive in? Let's get started!
> **GitHub Repository:** [MAZE-PROJECT](https://github.com/NexusGKSoftwares/MAZE-PROJECT.git)
---
## ๐ Table of Contents
1. [๐ Project Overview](#-project-overview)
2. [โจ Features](#-features)
3. [๐ป Technologies Used](#-technologies-used)
4. [โ๏ธ Setup Instructions](#%EF%B8%8F-setup-instructions)
5. [๐ฅ๏ธ How to Run on Different Operating Systems](#%EF%B8%8F-how-to-run-on-different-operating-systems)
6. [๐ง Code Explanation](#-code-explanation)
7. [๐ฎ Usage](#-usage)
8. [๐ Future Improvements](#-future-improvements)
9. [๐ค Contributors](#-contributors)
10. [๐ License](#-license)---
## ๐ Project Overview
This project is a visual demonstration of maze generation using a **randomized depth-first search algorithm** and maze-solving using the **A* algorithm**. ๐งฉ It combines stunning graphics with an intuitive interface, making algorithmic pathfinding both fun and educational.## โจ Features
- **๐ Dynamic Maze Generation:** Watch as a maze unfolds in real-time with the depth-first search algorithm.
- **๐ข Pathfinding Visualization:** See the A* algorithm in action as it solves the maze and reveals the optimal path.
- **๐ง Customizable Maze Sizes:** Adjust the maze dimensions to your liking for varied experiences.
- **๐ธ Image-Based Navigator:** A visually appealing way to follow the solution through the maze.
- **๐ฌ Interactive Graphics:** Experience a seamless and engaging user interface.---
## ๐ป Technologies Used
- **Programming Language:** C++
- **Graphics Library:** SDL2
- **IDE:** Visual Studio Code or any C++ IDE of your choice
- **Build Tools:** CMake, Makefiles---
## โ๏ธ Setup Instructions
### Prerequisites
Ensure you have:
- A **C++ compiler** (e.g., GCC, Clang, or MSVC)
- **SDL2** development libraries
- **SDL2_image** library for image support---
## ๐ฅ๏ธ How to Run on Different Operating Systems
### ๐ง Running on Linux (Ubuntu)
1. **Install SDL2 and SDL2_image:**
```bash
sudo apt-get install libsdl2-dev libsdl2-image-dev
```
2. **Clone the Repository:**
```bash
git clone https://github.com/NexusGKSoftwares/MAZE-PROJECT.git
cd MAZE-PROJECT
```
3. **Build the Project:**
```bash
mkdir build && cd build
cmake ..
make
```
4. **Run the Application:**
```bash
./maze_solver
```### ๐ช Running on Windows
1. **Install SDL2:**
- Download SDL2 from the [SDL website](https://www.libsdl.org/download-2.0.php).
- Extract the files to `C:\SDL2` (or a path of your choice).
2. **Install a C++ Compiler:**
- **MinGW:** Download from [MinGW](https://www.mingw-w64.org/) and add it to your PATH.
- **Visual Studio:** Set up Visual Studio for C++ development.
3. **Set Up SDL2 in Your IDE:**
- **For MinGW:** Copy `SDL2.dll` to your project directory and compile:
```bash
g++ maze.cpp -o maze.exe -I"C:\path\to\SDL2\include" -L"C:\path\to\SDL2\lib" -lmingw32 -lSDL2main -lSDL2
```
- **For Visual Studio:** Configure the include and library directories.
4. **Run the Program:**
- **MinGW:** Run `maze.exe` in your terminal.
- **Visual Studio:** Press **F5** to build and run.### ๐ Running on macOS
1. **Install SDL2 and SDL2_image Using Homebrew:**
```bash
brew install sdl2 sdl2_image
```
2. **Clone the Repository:**
```bash
git clone https://github.com/NexusGKSoftwares/MAZE-PROJECT.git
cd MAZE-PROJECT
```
3. **Build and Run:**
```bash
mkdir build && cd build
cmake ..
make
./maze_solver
```---
## ๐ง Code Explanation
The project is divided into components that handle maze generation, solving, and rendering.- **๐ Maze Generation:** Uses a depth-first search to create complex paths.
- **๐ข Pathfinding:** Implements the A* algorithm for efficient navigation.### Key Classes and Algorithms
- **Point Struct:** Represents (x, y) coordinates in the maze grid.
- **Maze Class:** Manages the maze structure, generation, and solving processes.
- **Depth-First Search:** Generates the maze layout.
- **A* Algorithm:** Solves the maze efficiently.---
## ๐ฎ Usage
1. **Launch the Program:** The maze will be generated and displayed.
2. **Watch the Solution:** The A* algorithm will illuminate the path, guiding the image-based navigator through the maze.
3. **Explore and Customize:** Modify `WINDOW_SIZE` or `CELL_SIZE` in the code for a different experience.---
## ๐ Future Improvements
- **๐ฒ Multiple Maze Algorithms:** Add new generation techniques like Primโs or Kruskalโs algorithm.
- **๐ ๏ธ Difficulty Settings:** Allow users to choose the maze complexity.
- **๐ฑ Improved GUI:** Introduce a more user-friendly interface.
- **๐ฎ User-Controlled Navigation:** Let users manually solve the maze.---
## ๐ค Contributors
- **NexusGK** - Lead Developer and Designer---
## ๐ License
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for more information.---
Feel free to reach out with questions, feedback, or suggestions. Happy maze-solving! ๐