/TopDownMapGenerator

This is a Game Maker Studio top down map generator.

Primary LanguageGame Maker Language

TopDownMapGenerator

First things first. If you're like me you want to see the end result so you know you're not wasting your time.
Example Video Here

This is a Game Maker Studio top down map generator.

The map that will be generated by default is a 4 x 4 grid, I call this the level. A room is what makes up each one of the level tiles. A room is 20 x 15.

There are 16 different paths a room can have

  1. no path
  2. straight line openings on left and right
  3. T shape with openings on left, right, and bottom
  4. upside down T with openings on left, right, and top
  5. crose with openings on all sides
  6. vertical line with openings on top and bottom
  7. right angle with openings on right and bottom
  8. right angle with openings on left and bottom
  9. right angle with openings on right and top
  10. right angle with openings on left and top
  11. T turned 90 degrees with openings on top, bottom, and right
  12. like 10 but flipped with openings on top, bottom, and left
  13. one opening on right
  14. one opening on top
  15. one opening on left
  16. one opening on bottom
NOTE: in code these paths are 0 indexed so subtract one from each of these to recogize it in code

Each level tile has its own rule for which type of path can be generated for the room which lives in that tile. This is so you dont have paths going off level.