+Red Hood Thank you so much. I genuinely really appreciate kind feedback as it spurs me on to do more! The good news is I'm planning a tutorial on implementing a simple algorithm where the resulting maze may well blow your mind... Stay tuned!
Go straight, every chance you get, go right (or left but pick one and stick with it) When you reach a dead end, turn around, start from the top. This is how you get out of a maze with a few lines of code. :)
Hi everyone what i am trying to figure out is how to change the location of the maze, so if i wanted more mazes linked how can i spawn more than 1? i have 2 mazes now but there are intersecting with each other ?
Yes! I recently found a website that showed examples of this. Source: astrolog.org/labyrnth/algrithm.htm You will find the answer to your question under Tessalation
If I want there to be a collectable item at the end of the maze, how will I spawn one since the maze is generated there is no place for an object to be placed.
All the floor maze parts are named floor 1 , floor 2 ,etc till the last one so you can find the object that you want and spawn the collectable at it's last transform + a new vector 3 with a y offset
I'm working on a game, but I want the game to spawn the maze with doors, desks, shelves, books, e.t.c. is there a way to do it? I have prefabs, but is there a way to generate them randomly like the maze?
Hi there. Yeah, I reckon you could randomize some of the walls to have doors instead. Of course, that might make it too easy. You'd need to write an algorithm to check the path back.
@@richardhawkes I found it out. Basically, all I had to do was use your way and then make the prefabs spawn randomly in the map using another script. Thank you very much!
I've made *THICC* walls instead of those thin walls, but they always merge and overlap each other, and I don't seem to be able to find a way that makes it possible for them to fill in all corners, yet not merge and make weird flickering effects... Could anybody help?
How could I change the texture for the floor? I don't really know c# so i just want some help with that. Maybe some code? I just want to change the floor texture from the wall texture so that it has some more detail.
Hi Richard i am learning to use unity and came across this tutorial, really cool thanks for that, but i got an issue and have no clue why. I did the scripts along the video and in the end i downloaded the pack to fill some code that was not visible, and after debugging all the flags i have some weird mazes that *sometimes have closed "chambers", sometimes we are inside the chambers so we could not reach the end and sometimes does not have a border to outside the maze.* otherwise its working some spawns are perfect. do you have an idea where should i look for a fix? i re-watched the tutorial a few times and compared all the code but i must have missed something. And while i am here its possible to have an option to choose where i want the start and finish to be? because i idealised the finish in the middle but its very rare to have an optimal maze for that. and again thanks a lot for the explanation!
Hi, I am making a game for my college project and was wondering if it would be possible to use this code and your assets in my game, and would I be able to modify the code/assets accordingly? Also, is there a way to make an entrance and exit on the left and right of the maze?
Hi there. You are 100% allowed to use the code and assets 😀 Please make sure you understand it though before handing it eh? On the entrance point. You could adjust the "for" loops on the surrounding walls logic. Good luck.
@@richardhawkes Oh, my lecturer and I found your video and he said it's okay if I acquire permission to use it from the creator (you) and reference you, but watching the video is kind of helping me to understand. It's just... still really confusing :) Okay, you mean the for loops in the HuntandKillMaze script? If so, how might I do it? Thank you for being so quick to respond though. You're brilliant!
I've been trying to figure it out for a month now. I really cannot do it. How are you so good at coding? What would I have to do to kill just one entrance wall and an exit wall each?
@@Blinky From what I gathered when trying to make my own maze generation algorithm was that you should make an if statement that checks which position the wall is in and if true, continue.
@@Blinky idk if you still need it but you can search for name as floor 0,0 and then place the entrance there like transform.position to floor.transform.position same for the exit as floor maxrow-1,maxcol -1 ;
Hey I really enjoyed your tutorial, it was really insightful and well explained! Would you mind me using your scripts/prefabs as part of my bachelor thesis VR game that I'm developing?
just curious as i'm still learning C#, but wouldn't it have made the code run faster/cleaner if the code at 7:12 said as an example... mazeCells [r, c].eastWall.name = $"East Wall {r},{c}"; My understanding is that the concatenation like that causes the value in the heap to be replaced multiple times (4 times in this case) vs interpolation (a single change as I wrote it)... not necessarily always required but 'good practice' for anything in a loop?
+Daonitre sir you are right but I defy you to notice the difference! I went for readability and clarity (you may argue it's less clear! ). Totally up to you if you want to try this. With knowledge like that mate you are already c# guru I reckon :-)
I appreciate the high praise but I'm really not that good... (yet). I just do a lot of needless in-depth research behind everything I study so I just wanted to pass it through someone who does know about it to make sure I understood it correctly. And I totally get the readability part.. took me a while before I realized that $ was shorthand for string.Format() ... :P Once that part is known I'd argue that it's easier to gauge spaces and less typing is better. haha. Thanks for the reply!
I have altered your code to 2D and I am looking to instantiate different shapes of wall depending on what combination of walls a cell has (E.G. All walls gives a + shape, three walls a T shape...). My problem is that I can't work out how the Loader is checking to see if a wall is to be placed. I thought a check of the existence of mazeCells[x, y].northWall would work (as this is how it is done in the algorithm to destroy), but I am not getting any results. How does the loader know if a wall is to be instantiated?
I found my problem, I was trying to read objects before the CreateMaze() was called. I have fixed this by creating a DrawMaze() function declared after CreateMaze(), now I can read wall positions and place my connecting wall pieces.
If your code isnt generating random mazes then do this... go into proceduralnumbergenerator.cs and paste this: using UnityEngine; using System.Collections; public class ProceduralNumberGenerator { public static int currentPosition = 0; public const string key = "123424123342421432233144441212334432121223344"; public static int GetNextNumber() { string currentNum = key.Substring(currentPosition++ % key.Length, 1); //return int.Parse (currentNum); return Random.Range(1,5); } }
Dear Sir, mind if I ask of you, can you possibly make four holes from the left and right ends I am interested in making a game and wish to have 4 openings within the gate to let things in and out, also if there was a way to alter the arena mid-game that would be very much appricated.
Is there a way to do this in 2D with tile maps?! I've spent the last 48 hours trying to adapt your code to 2D with tile maps and I keep screwing it up. By the time I got something workable, it still had sections in it that are inaccessible. Do you still respond to this channel?? All other resources I found on maze generation in unity use 3D.
100% yes ! Hard to say what you're doing wrong mate, but if you actually think about it, what I'm doing "is" 2d, I'm just extending upwards as well. I wish I could deep dive, but maybe check out the 2d maze algorithm links to see if they can guide you.
@@richardhawkes hey thanks for your reply. I just literally a few minutes ago got it working!!! I tried adapting your code and I caused so many problems for myself. Once I wrote it from scratch (twice…) I finally got it! Thank you so much for sharing this with us. Keep making these videos!
Hi! This a brilliant tutorial. A friend recommended it to me when he created his game a while back. Would it be possible to make a level-based game that creates a new maze that gets harder as the level increases? If so, how would one achieve this? Thank you again for this tutorial, it really is bloody fantastic,
if i were to make an infinite maze using this how would i do that? i presume it would use chunks but im not very educated on programming i just kinda wing it and hope it works most of the time
the issue I have with this algorithm is that the maze doesn't randomize each different time you press te play button, you need to change the number of columns or rows before it randomizes again, otherwise it keeps making the same maze over and over. Unlike in your video. Was I doing something wrong?
Its seriously mesmurising thankyou so so much for this tuorial.. its very helfull for me understanding maze algo`s.... thmbs up for your work... :D Need More tutorials do update thank you :)
That's awesome, let me honest to you Sir. Hawkes; Recently on my mind, if I modified this project so can sell this at the unity assets store. But also you have credit. :D
joseph mark anthony Huelgas That would be very kind. But honestly, I'd be very happy to see somebody put it to good use. So you make sure you let me know when it's out there, ok?
Yes!, sir, as soon as possible and thank you for being kind. Can you send your email address to, josephmarkanthonyhuelgas@gmail.com, so that I can message you privately and show as a sample of the project. :)
Superb video. I am a beginner but watching this tutorial, I am being much more confident. Can you please suggest how to decrease the height of the walls in the maze.
I want to build this for mobile device but each generation of the maze gives different sizes. is there a way to have a fixed size based on the aspect ratio but the inner parts are divided evenly?
I mean if I have sort a like 20x10 vs a 3x10 then I want it to scale the size of the cells so that the entire map fills the screen area or whatever area i give it within the camera view. What I am getting at is something for mobile devices
Kien Vuong great question. Short answer is yes. Check out some maze solving algorithms. In theory it should be straightforward to apply. If you do try this, please let me know how you get on.
This is a really good tutorial but I cant seem to get it creating a random maze. Every time i start it, it will just create the same maze over and over again... Do you have any ideas how to fix this? I have tried both scripting it myself and using the package from the discription
Thankyou man,with your work i created a *no dead end maze genrator* github.com/Maghil/noDeadEndMazeGenerator/blob/master/no%20dead%20end%20maze%20generation.unitypackage
Moazzma Asif hey there. Do you mean assets? if so, you're going to have to work out which corridors can be visited. I would perhaps store an array of available positions based on the corridor type in each position.
no ... I am actully wanna say that .. i wanted to add a player in it... how can i call a player within this? and some collectable objects within it.... ?
how would one make this 3d? i thought i could just add a third dimension but it just didn't work. at least i thought i did everything right but none of the errors even made sense to me
@@richardhawkes i meant adding a third direction for the maze itself. but i sort of got it to work already, i just need to understand c# better in general to finish it
go into proceduralnumber generator and paste this: using UnityEngine; using System.Collections; public class ProceduralNumberGenerator { public static int currentPosition = 0; public const string key = "123424123342421432233144441212334432121223344"; public static int GetNextNumber() { string currentNum = key.Substring(currentPosition++ % key.Length, 1); //return int.Parse (currentNum); return Random.Range(1,5); } }
+Mr Chain Use the c# Date class to construct a numeric string like 20161121. Then use that as the seed. You might want to play around with that number if the mazes are too similar each day (eg double the value). Let me know how you get on.
Yep, Jamis Buck's book is amazing. I just wish it wasn't written in ruby. Yucky. Information and explanations are top notch though. Also something to consider. In the book Jamis sets up a system to link cells together using a hash table. You can keep track of the direction of connections that way. He says to remember that if a cell is linked at that point, then it has been visited. Instead of having an "isVisited" variable, he seems to suggest that just checking whether that hash table contains a value at all could replace that boolean. Maybe a boolean is faster for this, but having the direction of the connection is useful as well, and you can calculate for both use cases using one data structure. Just seems a bit more organized to me.
This is quality tutorial. We really need more advanced material like this
+Red Hood Thank you so much. I genuinely really appreciate kind feedback as it spurs me on to do more!
The good news is I'm planning a tutorial on implementing a simple algorithm where the resulting maze may well blow your mind... Stay tuned!
Richard Hawkes Cool, cool! I am enabling notifications on your channel :)
Red Hood Not sure what you mean mate?
Richard Hawkes It means, I will receive email when you upload new video
Go straight, every chance you get, go right (or left but pick one and stick with it) When you reach a dead end, turn around, start from the top. This is how you get out of a maze with a few lines of code. :)
This is great, just what I was searching for, thanks a lot!
Glad it was helpful!
@@richardhawkes how does the maze change by itself??
That's fascinating. I want to dive in deeper.
Hi everyone what i am trying to figure out is how to change the location of the maze, so if i wanted more mazes linked how can i spawn more than 1? i have 2 mazes now but there are intersecting with each other ?
Hey! Is it possible to make hexagon, triangle and circle mazes?
Yes! I recently found a website that showed examples of this.
Source: astrolog.org/labyrnth/algrithm.htm
You will find the answer to your question under Tessalation
THANK YOU. My 9yo wanted to do exactly this, now we are, super appreciated.
No problem. Really glad to hear it and hope you get on OK :-)
If I want there to be a collectable item at the end of the maze, how will I spawn one since the maze is generated there is no place for an object to be placed.
All the floor maze parts are named floor 1 , floor 2 ,etc till the last one so you can find the object that you want and spawn the collectable at it's last transform + a new vector 3 with a y offset
I'm working on a game, but I want the game to spawn the maze with doors, desks, shelves, books, e.t.c. is there a way to do it? I have prefabs, but is there a way to generate them randomly like the maze?
Hi there. Yeah, I reckon you could randomize some of the walls to have doors instead. Of course, that might make it too easy. You'd need to write an algorithm to check the path back.
@@richardhawkes I'm new at Unity and I don't know what I'm doing, but I'll fix it somehow. Thanks for answering heh.
@@flyingthundergod1233 mate, I would think about how you would do this logically. Forget Unity, and see if you can figure it out... Good luck!
@@richardhawkes I found it out. Basically, all I had to do was use your way and then make the prefabs spawn randomly in the map using another script. Thank you very much!
Amazing tutorial! Exactly what I was looking for. Had to convert it to 2D but that was quite simple. Thank you very much!
Glad it helped!
I've made *THICC* walls instead of those thin walls, but they always merge and overlap each other, and I don't seem to be able to find a way that makes it possible for them to fill in all corners, yet not merge and make weird flickering effects...
Could anybody help?
How could I change the texture for the floor? I don't really know c# so i just want some help with that. Maybe some code? I just want to change the floor texture from the wall texture so that it has some more detail.
hey man, awesome tutorial! Can I use this for a game i'm planning on making?
+Kristopher Laggan Absolutely! Please let me know how you get on. Good luck.
Hi Richard i am learning to use unity and came across this tutorial, really cool thanks for that, but i got an issue and have no clue why.
I did the scripts along the video and in the end i downloaded the pack to fill some code that was not visible, and after debugging all the flags i have some weird mazes that *sometimes have closed "chambers", sometimes we are inside the chambers so we could not reach the end and sometimes does not have a border to outside the maze.* otherwise its working some spawns are perfect. do you have an idea where should i look for a fix? i re-watched the tutorial a few times and compared all the code but i must have missed something.
And while i am here its possible to have an option to choose where i want the start and finish to be? because i idealised the finish in the middle but its very rare to have an optimal maze for that.
and again thanks a lot for the explanation!
I am VERY new to Unity and am still trying to grasp the basics. How are you getting your MazeLoader script to run? Is it attached to an object?
Hi, I am making a game for my college project and was wondering if it would be possible to use this code and your assets in my game, and would I be able to modify the code/assets accordingly? Also, is there a way to make an entrance and exit on the left and right of the maze?
Hi there. You are 100% allowed to use the code and assets 😀 Please make sure you understand it though before handing it eh?
On the entrance point. You could adjust the "for" loops on the surrounding walls logic.
Good luck.
@@richardhawkes Oh, my lecturer and I found your video and he said it's okay if I acquire permission to use it from the creator (you) and reference you, but watching the video is kind of helping me to understand. It's just... still really confusing :)
Okay, you mean the for loops in the HuntandKillMaze script? If so, how might I do it?
Thank you for being so quick to respond though. You're brilliant!
I've been trying to figure it out for a month now. I really cannot do it. How are you so good at coding? What would I have to do to kill just one entrance wall and an exit wall each?
@@Blinky From what I gathered when trying to make my own maze generation algorithm was that you should make an if statement that checks which position the wall is in and if true, continue.
@@Blinky idk if you still need it but you can search for name as floor 0,0 and then place the entrance there like transform.position to floor.transform.position same for the exit as floor maxrow-1,maxcol -1 ;
Hey I really enjoyed your tutorial, it was really insightful and well explained! Would you mind me using your scripts/prefabs as part of my bachelor thesis VR game that I'm developing?
Gent Rexha Absolutely no problem. I'd love to see your final results :-)
just curious as i'm still learning C#, but wouldn't it have made the code run faster/cleaner if the code at 7:12 said as an example...
mazeCells [r, c].eastWall.name = $"East Wall {r},{c}";
My understanding is that the concatenation like that causes the value in the heap to be replaced multiple times (4 times in this case) vs interpolation (a single change as I wrote it)... not necessarily always required but 'good practice' for anything in a loop?
+Daonitre sir you are right but I defy you to notice the difference! I went for readability and clarity (you may argue it's less clear! ). Totally up to you if you want to try this.
With knowledge like that mate you are already c# guru I reckon :-)
I appreciate the high praise but I'm really not that good... (yet). I just do a lot of needless in-depth research behind everything I study so I just wanted to pass it through someone who does know about it to make sure I understood it correctly.
And I totally get the readability part.. took me a while before I realized that $ was shorthand for string.Format() ... :P Once that part is known I'd argue that it's easier to gauge spaces and less typing is better. haha.
Thanks for the reply!
I have altered your code to 2D and I am looking to instantiate different shapes of wall depending on what combination of walls a cell has (E.G. All walls gives a + shape, three walls a T shape...). My problem is that I can't work out how the Loader is checking to see if a wall is to be placed. I thought a check of the existence of mazeCells[x, y].northWall would work (as this is how it is done in the algorithm to destroy), but I am not getting any results. How does the loader know if a wall is to be instantiated?
I found my problem, I was trying to read objects before the CreateMaze() was called. I have fixed this by creating a DrawMaze() function declared after CreateMaze(), now I can read wall positions and place my connecting wall pieces.
If your code isnt generating random mazes then do this...
go into proceduralnumbergenerator.cs and paste this:
using UnityEngine;
using System.Collections;
public class ProceduralNumberGenerator {
public static int currentPosition = 0;
public const string key = "123424123342421432233144441212334432121223344";
public static int GetNextNumber() {
string currentNum = key.Substring(currentPosition++ % key.Length, 1);
//return int.Parse (currentNum);
return Random.Range(1,5);
}
}
THANK YOU
Dear Sir, mind if I ask of you, can you possibly make four holes from the left and right ends I am interested in making a game and wish to have 4 openings within the gate to let things in and out, also if there was a way to alter the arena mid-game that would be very much appricated.
Is there a way to do this in 2D with tile maps?! I've spent the last 48 hours trying to adapt your code to 2D with tile maps and I keep screwing it up. By the time I got something workable, it still had sections in it that are inaccessible. Do you still respond to this channel?? All other resources I found on maze generation in unity use 3D.
100% yes ! Hard to say what you're doing wrong mate, but if you actually think about it, what I'm doing "is" 2d, I'm just extending upwards as well.
I wish I could deep dive, but maybe check out the 2d maze algorithm links to see if they can guide you.
@@richardhawkes hey thanks for your reply. I just literally a few minutes ago got it working!!! I tried adapting your code and I caused so many problems for myself. Once I wrote it from scratch (twice…) I finally got it! Thank you so much for sharing this with us. Keep making these videos!
very cool, thank you
Nice Video!
how can i add enemies and other elements(traps,power-ups,items etc.)in the maze generator script?
That's exactly the algorithm i was looking for ! Thanks mate good video.
this is awesome mate thanks
Hi! This a brilliant tutorial. A friend recommended it to me when he created his game a while back. Would it be possible to make a level-based game that creates a new maze that gets harder as the level increases? If so, how would one achieve this? Thank you again for this tutorial, it really is bloody fantastic,
AmazeING
if i were to make an infinite maze using this how would i do that? i presume it would use chunks but im not very educated on programming i just kinda wing it and hope it works most of the time
the issue I have with this algorithm is that the maze doesn't randomize each different time you press te play button, you need to change the number of columns or rows before it randomizes again, otherwise it keeps making the same maze over and over. Unlike in your video. Was I doing something wrong?
I think there is a seed involved.
Its seriously mesmurising thankyou so so much for this tuorial.. its very helfull for me understanding maze algo`s.... thmbs up for your work... :D Need More tutorials do update thank you :)
+Moazzma Asif thanks mate. Glad you enjoyed it.
its really awesome :) keep it up... and update more plz
Sir, thank you for this video. But where can I get a fps controller?
+Shem Padilla it's a standard Unity import. I' thought I'd put it in one of the tutorials but let me check.
thank you this helped me with my project.
Great to hear!
I though I was hearing Mumbo Jumbo at the start lol
hey you did an amazing job! can i use this and make this game in to AR Game! please let me know
Thanks! You are more than welcome to use this. Let me know how you get on :-)
Hi Richard Hawkes, this project is public use?; if yes, I can modify some part of your project.
joseph mark anthony Huelgas 100% yes! And please tell me how you get on :)
That's awesome, let me honest to you Sir. Hawkes; Recently on my mind, if I modified this project so can sell this at the unity assets store. But also you have credit. :D
joseph mark anthony Huelgas That would be very kind. But honestly, I'd be very happy to see somebody put it to good use. So you make sure you let me know when it's out there, ok?
Yes!, sir, as soon as possible and thank you for being kind. Can you send your email address to, josephmarkanthonyhuelgas@gmail.com, so that I can message you privately and show as a sample of the project. :)
Superb video. I am a beginner but watching this tutorial, I am being much more confident. Can you please suggest how to decrease the height of the walls in the maze.
priyabrata mohapatra Hi there. I would suggest simply using a lower prefab wall.
what am i supposed to do with the package!?
Thanks a lot. This is of great help!
this is so cool
Is there anyway to use this kinda algorithm but have multiple routes to get to the end instead of just one?
Your tutorial is awesome, I'm working on a memory maze game, is it okay if I use this?
Apologies for not responding sooner... of course you can use this. I wish you the best of luck !
Richard Hawkes No problem, thank you for responding at all. I will try and make you proud :D
I want to build this for mobile device but each generation of the maze gives different sizes. is there a way to have a fixed size based on the aspect ratio but the inner parts are divided evenly?
+Donald Walters when you say different sizes, what do you mean?
I mean if I have sort a like 20x10 vs a 3x10 then I want it to scale the size of the cells so that the entire map fills the screen area or whatever area i give it within the camera view. What I am getting at is something for mobile devices
Can you remove walls of the Maze?
can we make in 3d?
Great video!
thank you sir
Hi @Richard, can we draw way for generated maze?
Kien Vuong great question. Short answer is yes. Check out some maze solving algorithms. In theory it should be straightforward to apply. If you do try this, please let me know how you get on.
This is a really good tutorial but I cant seem to get it creating a random maze. Every time i start it, it will just create the same maze over and over again... Do you have any ideas how to fix this? I have tried both scripting it myself and using the package from the discription
Thankyou man,with your work i created a *no dead end maze genrator*
github.com/Maghil/noDeadEndMazeGenerator/blob/master/no%20dead%20end%20maze%20generation.unitypackage
that`s amazing mate!
what should i do if i wanted to aad some sprites within the maze?
Moazzma Asif hey there. Do you mean assets? if so, you're going to have to work out which corridors can be visited. I would perhaps store an array of available positions based on the corridor type in each position.
no ... I am actully wanna say that .. i wanted to add a player in it... how can i call a player within this? and some collectable objects within it.... ?
how would one make this 3d? i thought i could just add a third dimension but it just didn't work. at least i thought i did everything right but none of the errors even made sense to me
Hey mate.
This is 3d you know?
@@richardhawkes i meant adding a third direction for the maze itself. but i sort of got it to work already, i just need to understand c# better in general to finish it
Anyone had a problem where unity editor just crashes when they try and run the script?
hey. How can i run the game? I imported in unity. Thanks :)
You should try Wilsons Algorithm haha, hardly predictable that one. Awesome tutorial mate!
this is using a singleton?
I am sorry but that script is creating the exact same image everytime i stop and play, leave procedural
Its not even random
go into proceduralnumber generator and paste this:
using UnityEngine;
using System.Collections;
public class ProceduralNumberGenerator {
public static int currentPosition = 0;
public const string key = "123424123342421432233144441212334432121223344";
public static int GetNextNumber() {
string currentNum = key.Substring(currentPosition++ % key.Length, 1);
//return int.Parse (currentNum);
return Random.Range(1,5);
}
}
@@iDoStufff Wow thank you, that solved the problem!
@@iDoStufff +10 wickeds and ali g points my dude respect
Please crate a TH-cam video with scripts that show the maze being created "on the fly"
This tutorial is amazing. Could I use it in a game??
Sorry for the delay ! 100% yes!, please use it in your game.
Just please let me know when you've created something so I can take a look.
GOOD LUCK!
@@richardhawkes Niceeeee. Thanks.
cool tutorial , thank you :)
Thanks for that, it means a lot.
Why are you calling the base class in the abstract class constructor? I mean isn't the class itself the base class like
how do i make it generate a new maze every day?
+Mr Chain Use the c# Date class to construct a numeric string like 20161121. Then use that as the seed. You might want to play around with that number if the mazes are too similar each day (eg double the value).
Let me know how you get on.
when you wanted to change the getNextNumber 😂😂😂😂
Made my own version of the code, and it took 5 minutes to load a 500 by 500 maze on my gaming computer XD My pc is super laggy now...
haha!
is it possible to have a load and save in this?
Yep, Jamis Buck's book is amazing. I just wish it wasn't written in
ruby. Yucky. Information and explanations are top notch though.
Also something to consider. In the book Jamis sets up a system to link
cells together using a hash table. You can keep track of the direction
of connections that way. He says to remember that if a cell is linked at
that point, then it has been visited. Instead of having an "isVisited"
variable, he seems to suggest that just checking whether that hash table
contains a value at all could replace that boolean. Maybe a boolean is
faster for this, but having the direction of the connection is useful as
well, and you can calculate for both use cases using one data structure. Just seems a
bit more organized to me.
:D
loud intro ear bleed :|
Please crate a TH-cam video with scripts that show the maze being created "on the fly"