Controllers - Grisgram/gml-raptor GitHub Wiki

Controller objects are an important part when developing with GameMaker. They are mostly invisible instances lurking around in the current room or are even persistent for the entire game and do things in the background or provide methods to do global things.

raptor provides some of these controllers which can be used out-of-the-box or can be modified to your needs.

Macros of the controller objects

There is one thing, all controllers of raptor have in common:
They provide a macro pointing to self, so you can access them without knowing their instance name in the room (or without even knowing in which room they were created, if they are persistent).

The name of the macro is always the name of the object, but in upper case:

Controller Persistent Macro What it does for you
GameStarter Yes GAMESTARTER Game Boot, settings load, call onGameStart and onGameEnd, async startup functionality
GameController &
BrowserGameController
Yes GAMECONTROLLER Global message Broadcasting, reacts on F12 for debug overlay (in Default configuration only).
The BrowserGameController also controls the canvas size and reacts on browser window size change and controls the click event for links so you can open links in a new tab. BrowserGameController is a child of GameController
RoomController No ROOMCONTROLLER Run Animation and StateMachine, debug frames, mouse coordinate translation to UI Layer, Camera actions like Screenshake, Lookat, controls UI focus for InputBox, clear pools on room change and perform Room Transitions
⚠️ **GitHub.com Fallback** ⚠️