RoomLoader β
RoomLoader
is the main interface of GMRoomLoader. It handles most library operations and is organized into the following modules:
- Data manages room data required for Loading and Screenshotting.
- Loading handles loading Full Rooms, separate Instances and Tilemaps.
- Screenshotting captures screenshots of rooms.
- Origin explains the Origin system used in all Loading and Screenshotting methods.
- State goes over an alternative way to preconfigure Loading and Screenshotting parameters using a Builder pattern with a Fluent Interface.
- Asset Type and Layer Name filtering allow filtering layers by asset type and name respectively when using RoomLoader.Load() and Screenshotting methods.
RoomLoader
is a global script function containing static data variables and methods, effectively acting as a makeshift namespace-like construct. It's initialized internally and requires no extra setup.
All methods are accessed using the RoomLoader.MethodName(arguments...)
syntax:
- Initialize data:
RoomLoader.DataInit(rmDungeon);
. - Load a room:
RoomLoader.Load(rmDungeon, x, y);
.
Note the lack of parentheses after RoomLoader
. Unlike the classic function_name()
calls youβre used to in GML, this accesses static methods within the RoomLoader
interface.
This design offers a single, clean entry point for the entire library, with all internal data and public methods contained within a single "namespace".