Frequently Asked Questions β
This page contains answers to frequently asked questions about GMRoomLoader.
What platforms does GMRoomLoader support? β
| Platform | Status | Notes |
|---|---|---|
| Windows | β Yes | Tested |
| macOS | β Yes | Tested |
| GX.games | β Yes | Tested |
| Linux | β Yes | Tested |
| HTML5 | β No | Use WASM with GX.games |
| Android | π§ Likely | Untested |
| iOS | π§ Likely | Untested |
| PS5 | π§ Likely | Untested |
| Xbox | π§ Likely | Untested |
| Nintendo Switch | π§ Likely | Untested |
What versions of GameMaker does GMRoomLoader support? β
GMRoomLoader supports GameMaker version LTS 2026.0 and above.
How is GMRoomLoader licensed? Can I use it in commercial projects? β
GMRoomLoader is licensed under the MIT license, granting you full freedom to use it for any purpose, including commercial projects. The only requirement is to include the GMRoomLoader License.txt file that comes with the library package.
Mentioning my name (Gleb Tsereteli) in your game's credits would be greatly appreciated and would totally make my day, but it's entirely optional π
How is GMRoomLoader versioned? β
GMRoomLoader follows Semantic Versioning using the vMAJOR.MINOR.PATCH format, where:
- MAJOR increases when incompatible API changes are introduced. Updating to a new major version may require you to update your code.
- MINOR increases when new features are added in a backward-compatible way, so it's always safe to update.
- PATCH increases when backward-compatible bug fixes are made. These are also always safe to update to.
How do I update to the latest version of GMRoomLoader? β
- If you've made changes to the
RoomLoaderConfigscript, make a backup of the script before continuing. - Delete the
GMRoomLoaderfolder from your project. - Repeat the Installation process.
- If you've made changes to the
RoomLoaderConfigscript, paste the changes back from your backup.KEEP IN MIND
The config setup might change between versions, so make sure to pay attention to the release notes and adjust your pasted configs accordingly.
Can GMRoomLoader assist with procedural generation? β
No. GMRoomLoader is designed specifically for loading rooms. Procedural generation, along with any custom logic for determining which room to pick and where it should go, will need to be handled on your own.
When should I NOT use GMRoomLoader? β
If your game only ever shows a single room at a time, like a Binding of Isaac-style dungeon, regular room switching is all you need. Your procedural logic for deciding which room comes next can run entirely in the background without GMRoomLoader.
GMRoomLoader shines when multiple rooms need to coexist in the same space at runtime: chunked open worlds, Spelunky-style dungeons assembled from templates, and similar setups where room contents need to be combined without switching rooms.
Can GMRoomLoader be used with 3D, isometric, sprite stacking, or other non-standard rendering setups? β
Yes. GMRoomLoader has nothing to do with rendering; it loads room contents. As long as your rendering setup works in a regular room and you design your content in rooms, it will work just as well when loading them with GMRoomLoader.
Can GMRoomLoader be used for modding? Is live reloading supported? β
No. GMRoomLoader retrieves data from room_get_info(), which only provides access to room information initialized at compile time. This means that at runtime, you can only access rooms exactly as they existed when the game was compiled.
As a result, modding and live reloading aren't possible by design.
If any of this is essential for your project, consider buying GMRoomPack by YellowAfterlife, the OG library that inspired GMRoomLoader. It works directly with room .yy files, which allows for both modding and rather trivial live reloading.
I'm loading a room and I think it works, but I can't see some (or all) of the loaded elements. How can I fix that? β
Mind your depth! GMRoomLoader creates layers at the exact depths assigned in the Room Editor. If your host room has existing layers, make sure to manage depths so loaded layers appear either in front of or behind them, depending on your use case.
The good news is layer depths are easily adjustable and you're not stuck with the default depths from the loaded room. Check out the Payload Depth section to see how you can shift depths for loaded layers.
My rooms have instances with Variable Definitions and Creation Code. Does GMRoomLoader support those? β
It does! room_get_info() provides both as scripts for GMRoomLoader to use.
NOTE
The execution order follows GameMaker's default and is structured like this:
- Room-defined parameters + Variable Definitions (mixed in a single pre-create struct).
- Create event.
- Creation Code.
Can I unload or destroy a loaded room? β
Yes, and it's an essential part of the workflow! The way you do it depends on what was loaded: Full Rooms, Instances or Tilemaps. Each case is described below.
Full Rooms β
When loading full rooms with RoomLoader.Load(), it returns a Payload struct that has a .Cleanup() method for removing all loaded layers and their elements.
First store the struct in a variable when you load the room, and when it's time to destroy the room, call .Cleanup() on the returned struct:
// When you load a room
payload = RoomLoader.Load(rmExample, x, y);
// When you need to unload a room
payload.Cleanup(); WARNING
GMRoomLoader only tracks layers and elements it loads itself. Anything else you add afterwards must be cleaned up manually.
Instances β
When loading instances with RoomLoader.LoadInstances(), it returns an array of loaded Instance IDs.
First store the array in a variable when you load instances, and when it's time to destroy them, loop through the array and call instance_destroy() on each instance to destroy it:
// When you load instances
instances = RoomLoader.LoadInstances(rmExample, x, y, "Instances");
// When you need to destroy loaded instances
array_foreach(instances, function(_instance) {
instance_destroy(_instance);
}); Tilemaps β
When loading tilemaps with RoomLoader.LoadTilemap(), it returns an Id.Tilemap.
First store the ID in a variable, and when it's time to destroy it, call layer_tilemap_destroy().
// When you load the tilemap
tilemap = RoomLoader.LoadTilemap(rmExample, x, y, "Tiles");
// When you need to destroy the tilemap
layer_tilemap_destroy(tilemap); How can I collide with loaded tilemaps? β
Separate β
When you load a room with a tile layer (with ROOMLOADER_MERGE_LAYERS and ROOMLOADER_MERGE_TILEMAPS set to false), a new tilemap is created.
To collide with this newly loaded tilemap, you need to grab its ID and store it in some variable. If you're currently colliding with, say, a variable holding a tilemap ID, you'll need to change that to a dynamic setup using an array.
// In some script, initialize a global array of collision tilemaps
global.collisionTilemaps = [];
// On Room Start (or somewhere else, if relevant), fetch your baseline collision tilemap ID
global.collisionTilemaps = [layer_tilemap_get_id("CollisionTilemap")];
// When loading a room, grab the collision tilemap ID and push it to the global collision tilemaps array
payload = RoomLoader.Load(rmExample, x, y);
collisionTilemap = payload.GetTilemap("CollisionTilemap");
array_push(global.collisionTilemaps, collisionTilemap);
// When unloading a room, remove the collision tilemap from the global collision tilemaps array
var _index = array_get_index(global.collisionTilemaps, collisionTilemap);
array_delete(global.collisionTilemaps, _index, 1);
payload.Cleanup();Merged β
Alternatively, you can make use of ROOMLOADER_MERGE_LAYERS and ROOMLOADER_MERGE_TILEMAPS to merge loaded tilemaps into existing ones. That way you don't need to juggle multiple tilemap IDs and can keep using a single tilemap for collision, auto-tiling or any other needs where having a single tilemap is preferable.