• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker [Help] Using room in another room

N

Noah J

Guest
Hi,

I'm making a rogue like based around a maze generation, I'm generating a maze in a grid using a recursive backtracker algorithm. My plan is to then "transform" the grid cell into pre-created room inside a bigger room (if that make sense). So here's my question, how can I use pre-generated room as "objects" inside another one ?

Thanks you and sorry for my broken english, but I'm french so ... ;P

N
 

Simon Gust

Member
Since rooms are just indexes you can just put the room index in the grid entries. If that is what you're asking.
You just need to know which room should go where.
 
X

XirmiX

Guest
From what I'm understanding, to my knowledge this is impossible. If you want to generate each section of the maze procedurally, I would suggest having multiple ds_lists, arrays, or better yet ds_grids to each hold a chunk of the maze information.

Then in the room, you would be able to place the object of the grid chunks to generate the sections and their respective... tiles/walls(?) in allocated positions (remember that you will need to assign chunk positions as well as individual tile wall positions within the arrays. For better handling, I would suggest having the first top left tile of each chunk help with the positioning of the chunk itself).
 
Top