Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 1.74 KB

File metadata and controls

28 lines (24 loc) · 1.74 KB

Custom Maze Generation (with Animation!)

Figure 1: Maze Generation with DFS Shortest Path Finder (Speed up 2x)

license Code language count GitHub top language

Maze Generation

  1. DFS Traversal.
  2. Random shuffle 4 directions (Up, Down, Left, Right) while traversing to destination.
  3. Repeat step 1-2 with random start coords in main path and random end coords. This will be our available paths to traverse.
  4. Once we finished setting our available path, start constructing maze's wall by traversing while making sure wall does not collide with path. Again, the coords are shuffled.
  5. Run DFS to find the shortest path to traverse after the maze construction.
  6. Voilà!

Resources

Original Demo (Non speed up)

maze_original.mp4