Agent skill · mindrally

gamemaker-gml

Best practices for GameMaker Language (GML) development, covering scripts, object events, rooms, data structures, and performance-minded game code. Use when writing GML scripts or object event code in GameMaker Studio, structuring create/step/draw events, managing rooms and instances, building state machines for gameplay, or optimizing GML for performance.

What it needs

About 5k tokens when loaded.

What this skill does

GameMaker Language (GML) Development This skill covers writing maintainable, performant game code in GameMaker Language (GML), including code organization, style conventions, gameplay architecture, and performance patterns specific to GameMaker Studio. Workflow for Building GML Gameplay Features 1. Design the object — Decide what Create, Step, Draw, Collision, and Alarm events the object needs, and what data it owns. 2. Initialize in Create — Set default variable values, instantiate data structures (dsmap, dslist, structs), and cache references (layer IDs, other instance IDs) in the Create event. 3. Simulate in Step — Put input handling, physics/movement, state machine transitions, and collision response in Step (or Step-adjacent events like Begin/End Step). 4. Render in Draw — Keep Draw events limited to rendering; never mutate gameplay state there. 5. Extract reusable logic into scripts — Move any behavior used by more than one object, or any event body that's grown complex, into a named script/function. 6. Clean up on Destroy/Room End — Destroy any manually created data structures (dslistdestroy, etc.) and free surfaces to avoid memory leaks. 7. Profile before optimizing — Use GameMaker's built-in profiler or manual timing (gettimer()) to find actual hot paths before restructuring for performance. Code Organization Keep object event code short; move any reusable behavior into scripts or named functions instead of duplicating logic across events or objects. Use clear, consistent prefixes or naming conventions for scripts (scr), objects (obj), sprites (spr), rooms (rm), and global variables/macros, matching whatever convention the project has already established. Prefer functions over copy-pasted event blocks — if the same five lines appear in two objects' Step events, it belongs in a script. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills mindrally/gamemaker-gml

View the source on GitHub

Browse the @skills marketplace