Random Room Generation

Just a quick stab at random room generation. Instantiates the rooms, randomly picks connections to previous rooms, and ensures that no rooms take over the same grid position.

I've got it working with upwards of 1000 rooms on my machine.

Update 1 : Added different sized rooms. Changed the algorithm to check if the new room overlaps with an old one. Still working with upwards of 1000 rooms. I'm really having fun with this!

Update 2 : Wall rendering fixed. Okay I think I'm done with this until next week.

Comments5

randomvideo.com12 Aug 2014, 14:47
cool! i am curius to see your actual ld entrie , good luck mate.
Knowledge12 Aug 2014, 16:10
Really great.
It works on 2000 rooms too (but it's a bit of slow).
HoboMechanistic12 Aug 2014, 19:08
Very cool, I loaded 3000 :D

Do you mind if I ask what you used to make the rooms? Are they quads? I really like how the doors match up with one another.
shatley12312 Aug 2014, 19:48
Managed 5000. Then I decided to do 10000 and my browser crashed :D
mactinite
mactiniteauthor13 Aug 2014, 03:02
Hey guys, thanks for the interest.

@Hobo I just used prefab quads, since they're all the same size I matched them up pretty rigidly. I'm still messing with this, right now I've added different sized rooms, but the doors don't match up :(. So I'm gonna have to change my rendering to a tilebased method.

Other games by @mactinite

Found a bug?
Tell us on Discord