How to make a map generation system?

Hello! I’m making a randomly generated, backrooms-style survival game. Every time you make it to the exit door, the game progresses and a new map is generated. There’s a few aspects I would like to implement like a room that’s very large and open per floor, and many rooms small of size per floor. I’m using a tile system, 8x8 studs.

Is there a way I can generate levels that has a specific amount of small rooms per level? And can anyone give a push on how to do it?

Edit: Check reply 2 for more info.

Hey, this video is maybe the guide that you need : https://youtu.be/0xQQPq23MrY?si=uqGQu8atJS7F075c

This is close, but not what I’m looking for. I’ve probably should have said this in the post, but maybe something similar to how Baldi’s Basics+ handles it. Where there are rooms of different sizes and types, and it feels less maze-y.

I want there to be the exit room, a large office room, supply closet, etc. while still using the tiles.

build smaller 8x8 chunks of your desired rooms and have it “randomly” generate your specialised room by chance if there’s the space for one.

Then you can modify the code from that tutorial to your liking and see what you can make before you get completely stuck. It seems fairly versatile to fit your need.

Hello, in many situations, perlin noise and things like that are useful, but since this is a backrooms-styled map, you could try Wave Function Collapse (if you want to go there). This might be a bit more than you want to do, but it would be a super cool way of implementing this ‘randomized’ map generation, and it could make for a cool way to design maps as well.

You could try here: Generating Worlds With Wave Function Collapse - PROCJAM Tutorials – This one uses images, but not all do.

https://excaliburjs.com/blog/Wave%20Function%20Collapse/

There should be plenty of articles and videos online. If you don’t want to do this, I understand completely though, lol.

Good luck, and let me know if you have any questions.

1 Like

Hello! I’ve tried to create my own generation system. Thank you all for the help though!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.