VIDEO / 30 JUN 2017

(Unity) Random dungeon floor generator

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.


Ben S


Roody I - 7 months ago

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 - 7 months ago here's the for loop that does the basic decision making. Hope it makes enough sense lol


Ben S @Bob423 - 7 months ago

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 @Bob423 - 7 months ago

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. :/

You must login to comment.