Dogwithswords
Member
Right now I am dabbling with a few theoretical game maker projects and one thing that really piques my curiosity is array-based room generation. I intend to make a sort of dungeon-crawler game that has randomly generated maps that change every 7 hours of in-game time.
First I am interested in a script that when used at the beginning of the game, it automatically generates rooms on a 26 x 26 grid. So we have room1_1, room1_2, room1_3... room26_24, room26_25, room26_26.
And a script would detect based off which room the player came from and set the player on the next room.
Example: If I go to the north-most point on one room, the player should teleport to the next room on its south-most point.
But if a player tried to go north or east in room1_1, they would be blocked off.
room1_1 - room1_26 do not allow north movements
room1_1 - room26_1 do not allow west movements
room26_1 - room26_26 do not allow south movments
room1_26 - room26_26 do not allow east movements
If I have to manually make 676 rooms, that's fine but tedious. But I would be grateful if anyone has a decent idea on how to accomplish this. Thank you!
First I am interested in a script that when used at the beginning of the game, it automatically generates rooms on a 26 x 26 grid. So we have room1_1, room1_2, room1_3... room26_24, room26_25, room26_26.
And a script would detect based off which room the player came from and set the player on the next room.
Example: If I go to the north-most point on one room, the player should teleport to the next room on its south-most point.
But if a player tried to go north or east in room1_1, they would be blocked off.
room1_1 - room1_26 do not allow north movements
room1_1 - room26_1 do not allow west movements
room26_1 - room26_26 do not allow south movments
room1_26 - room26_26 do not allow east movements
If I have to manually make 676 rooms, that's fine but tedious. But I would be grateful if anyone has a decent idea on how to accomplish this. Thank you!