The Room Manager

The Room ManagerWhen using the Asset Browser, you can create your rooms and move them between the different folder groups to organise the project in a way that best suits you. However, games in GameMaker generally have rooms that follow a certain order, and at the very least must have a specific start room (after the game starts in this room you can use code or actions to go to any room in the game if you wish), which is where the Room Manager comes into play.

You can open the room manager by clicking the "Extras" button Extras Menu Icon at the top of the Asset Browser and selecting it from the menu that opens, or you can simply click LMB Icon the icon to the left of a room in the asset browser:

Opening The Room ManagerOnce open, the Room Manager presents you with two different tabs, one for Room Order and one for Room Inheritance. The room order defines the order in which rooms will be accessed if you are traversing the game literally, using the function room_goto_next() at the end of each room, and the very top room listed will always be flagged by the "home" icon Room Manager Home Room Icon, which shows you that this room is the designated start room for the game. This icon will also be shown in the Asset Browser so you can see clearly which room it is, regardless of the how you have filtered or set up your assets.

NOTE The IDs of your room assets will not be in the same order as defined in this list, and so you should not supply a number value directly to change the room at runtime. Always use the room constant for the asset you want to reference (which is simply its name) or retrieve it through a function.

You can change the order of rooms by simply clicking LMB Icon and dragging the room you want to move up or down the list, and you can use Shift Icon and/or Control Icon / CMD Icon to select multiple rooms then click and drag them to move them altogether:

Moving Rooms Within The Room ManagerThe Room Inheritance tab is for setting up "child" rooms. A child room is one that has been copied from a "parent" room and set to inherit all of its properties. If you do nothing to this room, then this room will indeed be a copy of the original room, but you can then go into the Room Editor and toggle inheritance on or off for specific things like layers, or instances, as well as add new layers, instances and properties to the room.

The Room Inheritance TabAs with the Room Order tab, you can click LMB Icon and drag to reorder the rooms, but note that selecting a child room and moving it to a different parent will break the room inheritance with the original parent and it will instead inherit the properties of the new room. Note too that you can convert a child into a "full" room with no inheritance by dragging it to the left of the list (the list border will become highlighted), at which point it will simply become a room in its own right.

Rooms can have multiple children, and each child can also be a parent and have their own children, for example:

Example Of Room Inheritance With Multiple ChildrenHere we have a parent room, "rm_Level_1_Day", which has two children "rm_Level_1_Day_AfterBattle" and "rm_Level_1_Night". We have also assigned another child room to "rm_Level_1_Night" called " rm_Level_1_Night_AfterBattle". In this way you can re-use resources and level design from one parent room, and then only change what is required to make it slightly different in the child room or rooms.

NOTE For more information on room inheritance, please see here.

Finally, the room manager has some extra tools to help you navigate and organise your rooms. At the top you have a Search Bar which enables you to add a search term and then quickly go to the rooms that have the search term in their names. Rooms that have the search term in them will be highlighted, and then you can navigate to them instantly using the up/down buttons on the side:

Searching rooms in the Room ManagerThere are also some helpful buttons at the bottom of the Room Manager that permit you to move rooms up or down the room order list:

Moving rooms up or down in the Room ManagerBeside these buttons you also have a Create Group button which can be used to create a group folder. These folders can be used to better organise the rooms in your game (room order will still be respected), and you can click and drag rooms onto the folder to add them. You can also select multiple rooms by clicking while holding down Shift Icon and/or Control Icon / CMD Icon, then click the Create Group button and all the selected rooms will be added to the group. Note that this will change the order of the rooms in your game, and also note that if you choose to delete the group folder later, any rooms within the folder will be deleted too (by default GameMaker will warn you about this).

You should also note that you can right click on any room in the Room Manager to bring up the following menu:

Room Manager RMB menuThis menu gives you the following options: