Hey everyone,
The second video on the maze generator. Pretty long one at that.
In this video we'll take a look at the sourcecode for the maze generator in the previous video. It features images of the mazes it generates to provide an illustrated explanation.
It's basically a line by line read of the sourcecode with me explaining what it means and what it does. There's a couple of things that are noteworthy.
Notes
1) I like shorthand notations. Abbreviating names and functions are a common practice in my codes. As is shadowing. I love shadowing. So you'll be seeing some of that in this video.
2) there's a few computations that allow me to skip some if and else statements. The function coor does this for me as well as the function for carving the midway squares.
3) of all there's no explicit condition written down to end the algorithm or to start backtracking. It's all pretty implicit and hidden, but I'll remark where this is the case.
4) the mazes have to have an odd number of squares along the with as well as along the height for it to work because it takes 2 squares per step (it has to in order for there to be walls).
So I hope you guys enjoyed this video even though it was a tad longer than what I strive for.
Please comment, rate and subscribe if haven't done so already. Feel free to ask questions and make suggestions.
Watch video Mazegenerator: sourcecode online, duration hours minute second in high quality that is uploaded to the channel FHomeBrew 01 July 2012. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 586 times and liked it 3 visitors.