Generate random map with some rooms ( with a twist )

0 favourites
  • 2 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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