
Flash submissions are emulated via Ruffle. Ruffle is currently in development and compatibility is not guaranteed. Click here for more info.
This is version 2.3 of my Maze Generator tool.
[Edit] 2.0: Added the pathfinder function.
[Edit] Fixed a few bugs since 2.0, please force-refresh the page (Ctrl+F5 on Windows, no idea on mac :P)
[Edit] 2.1.1: Some more minor bugfixes.
[Edit] 2.2: Added the "Complexity" feature, moved the spead toggle to the + and - buttons, and some minor tweaks.
[Edit] 2.3: Added the "Draw markers" function. By pressing [D] and [E], you can draw and erase a little cross at your current location, to mark dead ends, for example.
You can use it to generate random mazes of any specified size, walk around on them, and it can find the correct path from the entrance to the exit.
Controls:
Press [Spacebar] to generate a maze,
Press [Spacebar] again to restart.
Press [R] to reset above fields.
Press [M] to enter the maximum width and heigth.
Press [+] and [-] to toggle drawing and solving speed.
Press [D] and [E] to Draw and Erase markers at your location.
Press [S] when the maze is generated to solve the maze.
Click in the maze with your left mouse button at any time to pause and resume maze creation / pathfinding.
When nothing is entered in the fields, the MazeGen will generate a 25*25 maze, with CellSize 5.
After the maze is generated, you can walk around in it, with the arrow keys.
The "Instant Render?" checkbox determines if the MazeGen will show you the creation process, or if it will render the maze as fast as it can. Expect a little delay on huge mazes, if you check this checkbox.
[Edit] 2.0: Added the pathfinder function.
[Edit] Fixed a few bugs since 2.0, please force-refresh the page (Ctrl+F5 on Windows, no idea on mac :P)
[Edit] 2.1.1: Some more minor bugfixes.
[Edit] 2.2: Added the "Complexity" feature, moved the spead toggle to the + and - buttons, and some minor tweaks.
[Edit] 2.3: Added the "Draw markers" function. By pressing [D] and [E], you can draw and erase a little cross at your current location, to mark dead ends, for example.
You can use it to generate random mazes of any specified size, walk around on them, and it can find the correct path from the entrance to the exit.
Controls:
Press [Spacebar] to generate a maze,
Press [Spacebar] again to restart.
Press [R] to reset above fields.
Press [M] to enter the maximum width and heigth.
Press [+] and [-] to toggle drawing and solving speed.
Press [D] and [E] to Draw and Erase markers at your location.
Press [S] when the maze is generated to solve the maze.
Click in the maze with your left mouse button at any time to pause and resume maze creation / pathfinding.
When nothing is entered in the fields, the MazeGen will generate a 25*25 maze, with CellSize 5.
After the maze is generated, you can walk around in it, with the arrow keys.
The "Instant Render?" checkbox determines if the MazeGen will show you the creation process, or if it will render the maze as fast as it can. Expect a little delay on huge mazes, if you check this checkbox.
Category Flash / Abstract
Species Unspecified / Any
Size 1000 x 1000px
File Size 20.8 kB
hey cool! i'm mildly curious what kind of algorithm you chose; pengo had a good maze generation algorithm which, i think, involved generating a path from the top right to the bottom left, and then filling in the rest of the dead ends afterwards. in high school i had already written a much dumber algorithm, which just generated an "up, down, left, or right wall" pivoting randomly from every corner of the maze, which worked OK although occasionally resulted in "dead cells".
i think it's smart to generate the "correct path" first, and ensure it's a certain length - otherwise the maze can be too easy! the first maze that this program generated for me (practically) allowed me to go right, and then down, to solve the maze; 80% of the maze was unused.
i think it's smart to generate the "correct path" first, and ensure it's a certain length - otherwise the maze can be too easy! the first maze that this program generated for me (practically) allowed me to go right, and then down, to solve the maze; 80% of the maze was unused.
The algorithm I use starts off with a maze, where all cells have walls on all sides, the MazeGen then picks a random cell, and opens a path in a random direction, and marks that cell as visited. If all neighbouring cells are visited (Aka, a dead end), the MazeGen traces back it's steps, to the last cell that had unvisited neighbours. That way, junctions are made.
This will go on like that until the amount of visited cells is equal to the total amount of cells, in the maze. No dead ends possible :P
This will go on like that until the amount of visited cells is equal to the total amount of cells, in the maze. No dead ends possible :P
Comments