Took me way too long to get this working.
It uses 3 sprites: A floor (white square), a wall (gray square distorted to be a rectangle), and an L shape for the coridors (3 gray squares). My biggest problem was figuring out that I had to account for every possibility before using RNG and only use RNG if it's absolutely sure it doesn't matter if there is a wall or coridor.
Comments (4)
Leave a Reply
You must be logged in to post a comment.
Roody I
RNG…we meet again. But this is cool. I dn't tell much people this but I like probability/math/RNG stuff. This is very cool.
How did you have to account for every possibility? How much possibilities are there in total?
Ben S
https://pastebin.com/Y0gPDQDQ here's the for loop that does the basic decision making. Hope it makes enough sense lol
Ben S
The "Must go through a second time later to close previously made coridors" is actually wrong. I got it working without that and forgot to remove the comment lol.
Roody I
Nothing makes sense to me anymore…
Seriously though, I understand a tidbit of it. Enough for me to know what's going on. Very cool. I wish I could code. :/