Coding Challenge #10.3: Maze Generator with p5.js - Part 3

Subscribers:
1,750,000
Published on ● Video Link: https://www.youtube.com/watch?v=8Ju_uxJ9v44



Duration: 12:05
125,195 views
1,909


Choo choo! In this multi-part coding challenge, I create a maze generator using a depth-first search algorithm with recursive backtracking. The idea is to walk through a grid of cells, removing walls as we go to build a maze. Code: https://thecodingtrain.com/challenges/10-dfs-maze-generator

πŸ•ΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/EBkm4txSA

Other Parts of this Challenge:
πŸ“Ί Part 1: Creating the Cells: https://youtu.be/HyK_Q5rrcr4
πŸ“Ί Part 2: Visiting Neighboring Cells: https://youtu.be/D8UgRyRnvXU
πŸ“Ί Part 4: Backtracking: https://youtu.be/_p5IH0L63wo

πŸŽ₯ Previous video: https://youtu.be/FGAwi7wpU8c?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Next video: https://youtu.be/IKB1hWWedMk?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
🌐 Maze Generation Algorithm: https://en.wikipedia.org/wiki/Maze_generation_algorithm#Randomized_depth-first_search

Videos:
πŸ”΄ Live Stream Archive: https://youtu.be/nF7DVmovWr0?t=7250s

Related Coding Challenges:
πŸš‚ #51 A* Pathfinding Algorithm: https://youtu.be/aKYlikFAV4k
πŸš‚ #76 10Print: https://youtu.be/bEyTZ5ZZxZs
πŸš‚ #171 Wave Function Collapse: https://youtu.be/rI_y2GAlQFM

Timestamps:
00:00 Recap from Part 2
01:00 Next Step in the Algorithm
04:00 Remove Walls between Two Cells
08:07 Debugging the Code
09:35 There we Go! Problem Solved
10:02 Highlight the Current Cell
10:53 What do we Need to do Next?

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

πŸš‚ Website: http://thecodingtrain.com/
πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: https://github.com/CodingTrain
πŸ’¬ Discord: https://discord.gg/hPuGy2g
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: https://standard.tv/codingtrain
πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain
πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/

πŸŽ₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: https://p5js.org
πŸ”— p5.js Web Editor: https://editor.p5js.org/
πŸ”— Processing: https://processing.org

πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#maze #recursion #backtracking #depthfirstsearch #p5js #javascript







Tags:
maze
challenge
maze challenge
programming
object oriented programming
nature of code
tutorial
p5.js
p5js
javascript
daniel shiffman
creative coding
javascript (programming language)
coding challenge
oop
object oriented
html5 canvas
programming challenge
coding
p5 js
p5.js tutorial
recursive
recursive algorithm
depth-first search
recursion