How do I create a generation of rooms similar to Roblox Doors?

0 favourites
  • 4 posts
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • I want to create a Roblox Doors FanGame, but I'm having problems with how I can create a more efficient room generation.

    Firstly, I thought about creating a generation of rooms that use tilemaps (for optimization reasons and better handling when creating rooms), and then I should clone these tilemaps objects and create the room design in them and save them in another layout.

    When a room is generated, a door is created along with it, and when we open the door, the next room is generated, and the rooms that are generated may or may not contain drawers, and these drawers may contain items or coins, or may not contain anything.

    Obviously the rooms that are generated NEED to be connected to each other for a better design, here I have images of my logic.

  • Never played that game and probably never will. Guess its just a bunch of rooms connected by doors? And you don't see the new rooms till you enter the door?

    Easiest would be to just make all the rooms manually, and just reveal new rooms as you open doors.

    Tilemaps and sprites are just tools, I'd be more concerned at making something that works before making something that's super efficient.

    Random generation can get rather involved. One general idea with your rooms is to have each room fit within a grid with the doors on the edges. With the prefab rooms you should be able to hide that it is a grid. Then there's the matter of making all the rooms connect. One idea could be to utilize something like WFC (waveform function collapse) to let you generate the rooms on the fly. Basically start with a random room, then for each door place a room that has matching doors with the surrounding rooms, and if there are any sides with no rooms it can randomly have a door or not.

    Here's a test of the room linking idea where it generates more as it goes with a wfc like algo. I got bored before doing rooms over it.

    dropbox.com/scl/fi/z5uzt5vf20t0hiccp6keu/maze_expand.capx

    Another idea involves just defining each room, and saving it to some kind of text format to be able to load again on the fly. This literally just picks the next room at random at the doorway and removes the previous when leaving. Side effect is if you try backtracking the rooms will be different behind you, although I suppose this could be made persistent. Only supports a door per side of the room but with some tweaks you could support multiple doors per side.

    dropbox.com/scl/fi/6olz5ar4dk5ma7l2jtz81/crazyPathFromRooms.capx

    Anyways, all this is just to give ideas and was me trying some things out. You can probably find other similar examples. Maybe search for binding of issac examples. Those generate maps from room templates.

  • crazyPathRooms is interesting, but the previous door (which we entered) cannot exist, since in Roblox Doors when we open a door, it cannot be "opened" again or even generate again a new room.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I see, like I said I’ve no idea about that game. Guess you could make the player move through the doorway when they hit it, delete those doors and seal up that way. But that’s something to fiddle with another day.

    In general it’s possible to do anything. You just have to break the problem up into multiple simpler doable steps.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)