What is GMRoomLoader?
GMRoomLoader is a pure GML open source (FOSS) GameMaker library for making room prefabs and loading room contents at runtime. Also known as "loading other rooms into the current room".
It provides tools to process the data returned by room_get_info(), use it to load rooms contents efficiently during gameplay, and clean up created elements when needed.
Use Cases
- Procedural Generation. Create custom level templates and place them procedurally throughout your levels (e.g. dungeon rooms, NPCs or randomized props).
- Chunking. Divide large rooms into smaller sections, loading or unloading them dynamically as the player moves closer or farther away.
- Room Thumbnails. Take screenshots of your rooms and use them in level selection menus, seamless room transitions or loading previews.
- UI. Design your interfaces directly in the Room Editor and load them on the fly in-game (as of 2024.13, this is mostly superseded by GM's UI Layers).
DISCLAIMER
GMRoomLoader is designed specifically for loading room contents.
It does NOT provide tools for procedural generation or level layout creation of any kind (like deciding which room to load and where to place it). You'll need to handle that yourself.
Features
- Pure GML library with no external tools required.
- Multiple ways to handle room data: Single or Multiple, Array, Prefix, Tag, All.
- Loading Full Rooms including all layers and elements, or just Instances or Tilemaps (with optional scale/mirror/flip and rotation transformations) at any position and origin.
- Element type filtering using Bitwise Flags.
- Layer filtering using Whitelisting and Blacklisting.
- Full control over loaded contents: Payload tracking, fetching element IDs and cleanup - unloading/destroying loaded elements.
- Room Screenshotting.
How does it work?
@TODO
GameMaker Awards 2024
GMRoomLoader was nominated for Best Tool in the 2024 GameMaker Awards!