How to generate a maze with recursive backtracking method. github.com/fer...
Пікірлер: 40
@PunmasterSTP Жыл бұрын
This would have been an amazing screen saver in the 90s. Anyway, it’s still really cool now 👍
@tentyp2 Жыл бұрын
you do know how screen savers worked right
@PunmasterSTP Жыл бұрын
@@tentyp2 Yeah, you need either blackness or changing colors to avoid burning colors into the CRT. Just saying, it looks a bit similar…
@tentyp2 Жыл бұрын
@@PunmasterSTP yeah, would have worked if it went on forever and if the white spaces would fade after like 10 seconds
@christopherherdinqromex6369 Жыл бұрын
This one has the best results of all the ones you've uploaded, I think
@CorrinWyndryder Жыл бұрын
I once wrote an ios app that used this algorithm to generate mazes. Unfortunately I was too inexperienced to put the recursive method in a parallel thread so it would make the game seem like it crashed as it loaded more and more complicated levels. I'm experienced enough now to know how to run it recursively with the frame rendering output and assign it a task bar. I just don't have the time to make it.
@tripslord9029 Жыл бұрын
2:11 amogus generator
@bentosboringlife893 Жыл бұрын
Hell yeah
@upchessbyabzolute7 ай бұрын
💀
@asdfghyter Жыл бұрын
i believe this algorithm guarantees that there are no four way intersections, but i may be mistaken *Edit:* I was mistaken!
@jamalak3472 Жыл бұрын
Foud one four way intersection
@coppertones7093 Жыл бұрын
it generates one at 2:28
@asdfghyter Жыл бұрын
@@coppertones7093 I see, I was mistaken, thank you! It does seem to make them very rare though.
@mspeir Жыл бұрын
It's guaranteed to make what is known as a "perfect maze". It will not have loops or unreachable cells.
@asdfghyter Жыл бұрын
@@mspeir well that’s a pretty low bar and even the “binary tree” algorithm that produces super ugly mazes satisfies that kzbin.info/www/bejne/goG3Xqp_idF-o80
@bottlekruiser Жыл бұрын
0:58 amogus ඞඞඞඞ
@lillyroths3944 Жыл бұрын
It's not funny it's just a cool game, it's getting old too.
@ridvangonca Жыл бұрын
@@lillyroths3944 it still sus ඞ
@bottlekruiser Жыл бұрын
@@lillyroths3944 cope ඞ
@kaan8964 Жыл бұрын
ඞ
@ReallyFeelingIt8888quads Жыл бұрын
2:11 baby amogus :D
@goldsaturn1436 Жыл бұрын
0:56 sus
@minhphantrannhat9081 Жыл бұрын
GET OUT OF MY HEAD
@letronix6243 Жыл бұрын
amazeing
@thezouave7636 Жыл бұрын
youtube what's with the sudden promotion of these videos?
@joansparky4439 Жыл бұрын
I'm 2 weeks behind you 🥴
@sailor5853 Жыл бұрын
That's a good maze, took me more than 10 seconds
@furiouspusher17569 ай бұрын
Imagine solving this with the right-hand rule.
@nerdy8644 Жыл бұрын
How does this work? I don’t understand the algorithm
@xXFluffers Жыл бұрын
The red line goes in random directions until it hits a wall, then backtracks until it can branch off again, going in random directions until it hits another wall.
@nerdy8644 Жыл бұрын
@@xXFluffers how are the walls created?
@christopherherdinqromex6369 Жыл бұрын
@@nerdy8644 Rather, the red line goes in any random directions as long as it doesn't hit a wall or itself or until it hits a dead end, a dead end being three walls, one to the left, one to the right and one to the front of the red lines head. The walls can be either a line made previously by the red line or the edge of the area the maze is to be made in. Once it hits a dead end, it backtracks along the red path it just made, turning it white, until it finds to the left or the right of the path an empty square, and then it goes there, branching off into another red path. Continuing the cycle, you fill up the whole screen without loops in the maze or paths that cannot be accessed. It is quite clever!
@overratedprogrammer Жыл бұрын
@@christopherherdinqromex6369 Unfortunately I don't understand how walls work. I made it so that it goes through every cell and marks it as visited, and backtracks if it has no valid move, but I have no idea how I'm supposed to make the walls. I saw a youtube video where a guy just draws over the wall with the path color but I think I kinda need more than that since this is going to be a game
@shalevforfor555015 күн бұрын
This algorithm has the best result but it's too slow like try to generate a maze of 200x200 in JS it's taking time in python that will take ages
@Louis_Marcotte Жыл бұрын
My brain is broken. At 0:55 an amogus forms on the left, it remains until 2:07