When creating rooms in GameMaker Studio 2 you can choose to use the dedicated Room Editor or you can create dynamic room content using code, or perhaps a bit of both. Most aspects of a room can be changed, created or removed at run time meaning that you could create procedural dungeons, or dynamic destruction easily when making your game.

You can find an overview of all the available functions from the different sections below:

An important thing to note when creating room layers is that you can have multiple different element types on one layer. So, for example, you may have a layer for enemies, and on that layer have the enemy instances as well as certain sprite assets that are only related to that enemy. Or you could have a background element with a tilemap element to create the look of a room. This is not permitted in the room editor, but when creating things dynamically you can do this, which is why functions like layer_get_all_elements exist.