Generate random map with some rooms ( with a twist )

Get help using Construct 2

Post » Sat Mar 14, 2015 8:24 pm

Hello & thank you for finding some time for reading my question. It has probably been done & there is something written about it somewhere, or perhaps there might be a tutorial, but frankly I did not find any.

- I would like to generate a map with 32x32 ( 1024 ) rooms in it
- Each room would be blacked out until I the player would enter inside, then it would be visible
- Each room would would be different, the game would pick up something from a random set of pregenerated rooms.
- The rooms would shuffle every 1 minute for an example, whilst keeping the room with a player present in it in the same position.
- There would be one room that will be marked as exit, when player manages to reach that room, player wins.
- Each room would have 4 exits, if the player would try to exit to a room that is on the edge of the map, there would be a chance to bring the player to another random room, room exactly the opposite of the current room or let player die.
I cannot offer you money, I am stuck ill in a bed for last 5 months, but if you know how to do those things & got some time to spare, it would be brilliant if you could help me out a little more & perhaps jump on Skype with me ( unique-22, Cologne) & if that is too much to ask, then at least leave a reply here.
Posts: 6
Reputation: 187

Post » Sun Mar 15, 2015 6:34 pm

I'd start with creating a hallway sprite. Set it's collision mask so that it can be either walked through or not, depending on which frame it is on. This lets you randomly set a hallway to open or closed.

Next, set up a double loop, one for x and one for y, so that you go through each room on your 32x32 grid. For each room, create two hallways: one to the right and one downward. Your upward and rightward hallways are created by the rooms in that direction. When you create a hallway, randomly decide whether it is to be closed or open. After each shuffle, pick two number 0-31, and use them as the coordinates for the exit room.

This doesn't cover everything you asked for, but it should get you started, thinking along the right lines.
Posts: 189
Reputation: 1,536

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 69 guests