How do you organize levels?

breakmt

Member
Hello, dear game developers! :)
I think about how to better organize level rooms in Game Maker... I make quest game, but this is not really important. For example, I have room with some controller objects, layers structure etc Now I need to create new level. What to do? Clone previous one and modify it? It seems to be not very good way.

I thought to use parent-child system, but sadly I found it very buggy and I just afraid to use it :(

I'm very curious how you do it!
 

Phil Strahl

Member
Depends on how many rooms you need. If it's around a dozen, the duplicate-then-modify method would be best because you have a fast turnaround and should something in your code change (it always will), then it's not too time consuming to manually change the affected rooms.

If you need more (or even much more) rooms, I'd have just one empty room that's already set up in terms of layers and create everything that's inside it from data. This is a lot of work, of course, essentially you'd code your own level editor, then write those levels to JSON files and then have your game interpret it an populate the levels accordingly.
 

breakmt

Member
Hi, thanks for answer! I think there will be 20-30 rooms, maybe a little more... To be honest, I decided to try parent-child room system, cause I like OOP organization. One side note - I can't make groups inside parent room (ex. "House" with rooms "Kitchen", "Hall" etc) and there will be just:
- Level
-- HouseKitchen
-- HouseHall
-- ShopSection1
-- ShopSection2
Which is not really great, but I guess I can live with it.
I really hope that there will be no serious bugs, cause I already found one (not very big one) after using this feature for 2 minutes :( It feels like nobody uses this room parent-child feature.... Why?
 

curato

Member
I usually have a persistent manager object that manages settings and makes sure any gui objects are created and anything else that would consistent between different rooms.
 

breakmt

Member
I usually have a persistent manager object that manages settings and makes sure any gui objects are created and anything else that would consistent between different rooms.
In that manager object do you also create all layers that you need?
 

c023-DeV

Member
I use the parent-child features but mainly to have the same layer set up in all rooms, works fine for me. If I want to add more layers then I do this in the parent room. I've also added a few objects added to the parent room for organizing additional level setup, backgrounds and FX.

Also I create additional FX layers via code (layer_create in the level setup object) and also create references to the existing layers to spawn things.
 

breakmt

Member
I don't, but I guess you could use layer_create to make the layers you want.
Yes, but I can't use this layers in room editor...

I use the parent-child features but mainly to have the same layer set up in all rooms, works fine for me. If I want to add more layers then I do this in the parent room. I've also added a few objects added to the parent room for organizing additional level setup, backgrounds and FX.

Also I create additional FX layers via code (layer_create in the level setup object) and also create references to the existing layers to spawn things.
I will go the same road. I guess one bug I saw was because I tried to make a room to be child of parent room and some data were mix or something like that...
 

c023-DeV

Member
Yeah, do some experimenting first to see in what order things work. I played around with a few workflows until I knew what I need and what works for me.
It takes a bit to get used to but it does work as long as you figured out the dependencies.
 
Top