Est. 1999 Beginner

Game Maker Language

A procedural scripting language built into the GameMaker engine, designed to make 2D game development accessible to non-programmers while still being powerful enough for commercial titles.

Created by Mark Overmars

Paradigm Procedural, Imperative, Event-driven
Typing Dynamic, Weak
First Appeared 1999
Latest Version GameMaker (GML) — versioned with the GameMaker IDE

Game Maker Language (GML) is the built-in scripting language of the GameMaker engine, a 2D-focused game development environment originally created by Mark Overmars and now developed by YoYo Games (a subsidiary of Opera). GML occupies an unusual position in the landscape of programming languages: it is proprietary, tied to a single IDE, and designed primarily to be approachable for beginners — yet it has been used to ship dozens of commercially successful, critically acclaimed indie games.

History & Origins

The roots of GML lie in the late 1990s at Utrecht University in the Netherlands, where Mark Overmars — a professor of computer science specialising in computational geometry — built a small tool to help students and hobbyists create games without first having to learn a systems programming language. The first public release appeared in 1999 under the name Animo, soon renamed Game Maker.

In its earliest form Game Maker was almost entirely drag-and-drop. Users assembled games by attaching predefined actions (move, create instance, play sound) to events on game objects. As the tool matured, Overmars added a textual scripting facility to let advanced users break out of the drag-and-drop sandbox. By Game Maker 4 and 5, this scripting facility had grown into a recognisable language with variables, control flow, and function calls — what would eventually be called Game Maker Language.

In 2007, Overmars partnered with the UK-based company YoYo Games, which assumed responsibility for the engine’s commercial development. Overmars has continued his academic career while YoYo Games has steered the engine through major rewrites: GameMaker: Studio in 2012, GameMaker Studio 2 in 2017, and the simply branded “GameMaker” of recent releases. In 2021 Opera acquired YoYo Games, and in 2022 the engine became free to use for non-commercial projects.

Design Philosophy

GML was designed to be the gentlest possible ramp from drag-and-drop event programming into “real” code. Its design choices reflect that goal:

  • Familiar C-like syntax — curly braces, semicolons (optional in most contexts), and if/while/for keywords reminiscent of C-family languages
  • Dynamic, weak typing — variables hold whatever you put in them, and the engine performs implicit conversions between numbers and strings
  • Heavy reliance on built-in functions — graphics, input, audio, networking, and physics are all exposed through hundreds of global functions rather than imported libraries
  • First-class engine concepts — instances, objects, rooms, sprites, and events are language-level citizens, not user-defined types layered on top of a general-purpose runtime
  • Event-driven structure — most GML code lives inside event handlers (Create, Step, Draw, Collision, etc.) attached to objects, not in a single linear program

The result is a language where a complete game can be written using only procedural constructs and global state, but where more disciplined developers can still build large, structured codebases.

Key Features

Event-driven object model

A GameMaker project is built from objects, each of which can define handlers for engine events. The Step event runs every frame, the Draw event runs when the object should render, the Create event fires when an instance is spawned, and so on. GML code typically lives inside these handlers:

// Create event
hp = 100;
speed = 4;
direction = 0;

// Step event
if (keyboard_check(vk_right)) x += speed;
if (keyboard_check(vk_left))  x -= speed;
if (hp <= 0) instance_destroy();

Variables like x, y, speed, and direction are built-in instance variables that the engine reads and writes automatically — assigning to them affects rendering and movement directly.

Instance and object scoping

Each instance of an object has its own variable scope, but GML allows code in one instance to read or write variables on another instance using a with block:

with (obj_enemy) {
    hp -= 10;
    if (hp <= 0) instance_destroy();
}

This construct iterates over every live instance of obj_enemy and runs the block with that instance as the implicit context — a powerful, if sometimes surprising, feature unique to GML.

Built-in data structures

Early versions of GML offered ds_lists, ds_maps, ds_grids, ds_queues, ds_stacks, and ds_priority queues — opaque handles managed via library calls (ds_list_add, ds_map_find_value, etc.). Modern GameMaker has supplemented these with native arrays and struct literals:

var inventory = {
    gold: 50,
    items: ["potion", "key", "torch"]
};

inventory.gold += 10;
array_push(inventory.items, "map");

Scripts and (more recently) functions and structs

In classic Game Maker, “scripts” were standalone files containing a single procedure invoked by name. GameMaker Studio 2 introduced first-class user-defined functions, structs, and constructor functions that bring GML closer to a conventional procedural language with lightweight object support:

function Vector2(_x, _y) constructor {
    x = _x;
    y = _y;

    static add = function(other) {
        return new Vector2(x + other.x, y + other.y);
    }
}

Evolution

GML has changed substantially across the engine’s major versions. Game Maker 8 and earlier used a runtime interpreter and shipped Windows-only executables. GameMaker: Studio (2012) added cross-platform export and a transitional compiler. GameMaker Studio 2 (2017) and subsequent versions introduced significant syntactic and semantic changes: locally scoped var declarations, struct literals, anonymous functions, method binding, and a JIT-style compiler for some platforms.

Because of this evolution, older GML code — particularly tutorials from the Game Maker 7 or 8 era — often does not run unchanged in modern GameMaker without adjustments. YoYo Games has provided migration guides and project converters, but the language’s history of incremental, sometimes breaking changes is a recurring topic in the community.

Current Relevance

GameMaker remains one of the most popular engines for solo and small-team indie 2D game development. Its appeal continues to rest on a few core strengths:

  • A tightly integrated editor where sprites, rooms, sounds, and code live in one project
  • A short path from “blank project” to “something moving on screen”
  • A track record of commercially successful games shipped by very small teams
  • Free non-commercial licensing since 2022, with paid tiers gated by export target and revenue

Because GML is tied to the GameMaker IDE and runtime, it has no independent implementations, no formal standard, and no real presence outside of game development. Its influence on other languages is therefore narrow — but within its niche, it has helped shape what a generation of indie developers consider a “first language.”

Why It Matters

GML is interesting less as a language design artefact than as a case study in lowering the barrier to entry. The combination of a friendly IDE, an event-driven object model, and a permissive C-like syntax has allowed people who never thought of themselves as programmers to ship games that reach millions of players. Undertale, Hotline Miami, Spelunky, Nuclear Throne, and Nidhogg are not just successful games — they are existence proofs that a deliberately approachable, proprietary scripting language can produce work of lasting cultural importance.

Timeline

1999
Mark Overmars, a professor of computer science at Utrecht University in the Netherlands, releases the first version of Animo / Game Maker as a tool for teaching game development concepts
2001
Game Maker 4.0 introduces a more developed scripting language, the precursor to modern GML, allowing users to move beyond drag-and-drop events
2004
Game Maker 6.0 released with Direct3D support, expanding the engine beyond purely 2D rendering
2007
Mark Overmars partners with UK-based YoYo Games, which takes over development and distribution of Game Maker
2011
Game Maker 8.1 released, the last version under the classic 'Game Maker' branding before the Studio rewrite
2012
GameMaker: Studio launches, adding cross-platform export targets (Windows, macOS, HTML5, iOS, Android) and a modernised IDE
2015
Undertale, written by Toby Fox in GameMaker, releases to widespread acclaim and becomes one of the most prominent commercial games built with GML
2017
GameMaker Studio 2 released with a substantially rewritten IDE, an updated GML, and new editing workflows
2021
Opera acquires YoYo Games, bringing GameMaker under the same corporate umbrella as the Opera browser
2022
GameMaker becomes free to use for non-commercial projects, with paid tiers for console export and commercial publishing

Notable Uses & Legacy

Undertale

Toby Fox's role-playing game, released in 2015, was written almost entirely in GameMaker Studio using GML and became a cultural phenomenon, demonstrating that a single developer could produce a hit commercial game in the engine.

Hotline Miami

Dennaton Games used Game Maker to build the 2012 top-down action game, whose violent, neon-soaked style helped popularise GameMaker as a serious tool for indie developers.

Spelunky (original)

Derek Yu's original 2008 freeware version of Spelunky was built in Game Maker, pioneering the modern roguelite platformer genre before later ports rewrote the engine.

Nuclear Throne

Vlambeer's fast-paced post-apocalyptic roguelike shooter was developed in GameMaker: Studio and is frequently cited as a high-profile example of action-oriented GML development.

Risk of Rain (original)

Hopoo Games' original 2013 Risk of Rain, a side-scrolling roguelike, was built in GameMaker before the sequel moved to Unity.

Nidhogg

Messhof's competitive fencing game, released in 2014, was created in GameMaker and became a fixture of indie game tournaments and showcases.

Language Influence

Influenced By

Running Today

Run examples using the official Docker image:

docker pull
Last updated: