A versatile maze generator built with React that supports multiple algorithms, shapes, and customization options.
Here's a Live Demo to play with it
- Multiple Maze Generation Algorithms
- Diverse Maze Shapes
- Comprehensive Customization
- Interactive Features
- Node.js (v12.0.0 or higher)
- npm or yarn
# Clone the repository
git clone https://github.com/andreaiacono/MazerJS.git
# Navigate to the project directory
cd MazerJS
# Install dependencies
npm install
# or
yarn install
# Start the development server
npm start
# or
yarn start
The application will be available at http://localhost:3000
.
- Select a maze generation algorithm from the dropdown
- Choose a frame type (Square/Rectangle, Polygon, Circular, or Text)
- Adjust parameters according to your preferences:
- For rectangular mazes: Set rows and columns
- For polygonal mazes: Set number of sides, rings, and sectors
- For circular mazes: Set rings and sectors
- For text mazes: Enter text and set letter size
- Click "Generate" to create a new maze
- Use "Solve" to find a path from entrance to exit
- Click "Show Solution" to display the solution path
- Use "Export" to save your maze
Creates long, winding corridors with fewer dead ends. This algorithm uses depth-first search with backtracking to generate mazes with typically one solution and long passages.
Creates mazes with a distinctive bias toward one corner. Simple and fast algorithm that connects each cell to either the north or east neighbor, creating a bias toward the northeast corner.
Generates mazes with horizontal corridors and random vertical connections. Creates a strong horizontal bias while maintaining randomness through occasional vertical paths.
Generates organic-looking mazes with many short dead ends. This algorithm builds a maze by randomly selecting walls to remove from a growing tree structure.
Creates mazes by recursively dividing the space with walls and adding random passages. Produces mazes with a more structured, geometric appearance.
Similar to DFS but with different backtracking behavior. Hunts for unvisited cells when it reaches a dead end, creating mazes with fewer and shorter dead ends than DFS.
Generates perfect mazes one row at a time. Memory-efficient algorithm that can theoretically generate infinite mazes by working on one row at a time.
Creates unbiased mazes through random walks, ensuring every possible maze has an equal probability of being generated. Can be slower than other algorithms but produces truly random mazes.
Produces unbiased mazes using loop-erased random walks. Creates truly random mazes like Aldous-Broder but can be more efficient for certain maze sizes.
Creates mazes based on a minimum spanning tree algorithm. Randomly merges disjoint sets to create the maze structure, often producing mazes with a more scattered appearance.
- Branching Probability: Controls how often the path branches (higher values create more complex mazes)
- Dead End Density: Determines the frequency of dead ends
- Entrance/Exit Position: Customize where the maze starts and ends
- Symmetry: Apply symmetrical patterns to the maze structure
- Frame Type: Choose the overall shape of the maze
- Wall Thickness: Adjust the thickness of maze walls
- Zoom: Change the maze display size
- Show/Hide Entrance/Exit Arrows: Toggle visibility of entrance and exit markers
- Wall/Background Color: Customize the visual appearance
- Animation Speed: Control how quickly the solution is displayed
- Solution Color: Customize the color of the solution path