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.
Смотрите видео Mazegenerator: sourcecode онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал FHomeBrew 01 Июль 2012. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 586 раз и оно понравилось 3 посетителям.