gamemaker-gml
Installation
SKILL.md
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
- Design the object — Decide what Create, Step, Draw, Collision, and Alarm events the object needs, and what data it owns.
- Initialize in Create — Set default variable values, instantiate data structures (
ds_map,ds_list, structs), and cache references (layer IDs, other instance IDs) in the Create event. - Simulate in Step — Put input handling, physics/movement, state machine transitions, and collision response in Step (or Step-adjacent events like Begin/End Step).
- Render in Draw — Keep Draw events limited to rendering; never mutate gameplay state there.
- 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.
- Clean up on Destroy/Room End — Destroy any manually created data structures (
ds_list_destroy, etc.) and free surfaces to avoid memory leaks. - Profile before optimizing — Use GameMaker's built-in profiler or manual timing (
get_timer()) to find actual hot paths before restructuring for performance.