Description

3D Maze Solver generates a 3D scene from an ASCII file containing specifications for a maze. Once the maze has been parsed and rendered, 3D Maze Solver will solve the maze in real-time. After successfully completing the maze, the solver will pause and play a success animation allowing the viewer to see the correct path through the maze. Techniques utilized: Phong shading, texturing, WASD + yaw + pitch camera movement, and a depth-first search algorithm to solve mazes.

Example ASCII Maze

@@@@@@@@@@@@@@@@@@@@@
@.......@.......@..X@
@.@.@.@@@.@@@@@.@.@.@
@.@.@.@.......@...@.@
@.@.@@@.@@@@@@@@@.@.@
@.@.......@.....@.@.@
@@@@@@@@@@@.@@@.@.@.@
@...@...@...@...@.@.@
@.@.@.@.@.@@@@@.@@@.@
@.@...@...@...@.....@
@.@@@@@.@@@.@.@@@@@@@
@...@...@...@.......@
@.@.@@@@@.@@@@@@@@@.@
@.@.....@.@.....@.@.@
@.@@@@@.@.@@@.@.@.@.@
@.....@...@...@...@.@
@@@@@@@.@@@.@@@@@@@.@
@S@...@.....@.......@
@.@.@.@@@@@@@.@@@@@.@
@...@.........@.....@
@@@@@@@@@@@@@@@@@@@@@

Screenshots

The example ASCII maze rendered and solved. Blue tiles are visited, yellow tiles are part of the solution, the green tile is the start position, and the red tile is the end position.

The solver is green when progressing and red when backtracking from a dead end.

Wireframe mode allows the solution path to be seen through walls.

Free camera movement allows spectators to view mazes from interesting angles.

Mazes can be up to 100x100 blocks. The larger mazes' solutions often form interesting patterns.

References