GitHub - groverburger/instance: Open source, clean room implementation of Game Maker 8.1 in pure Rust.
An open-source game development environment: a visual editor and a game engine for `.gmk` and `.gm81` projects.
**Try it in your browser** · Download · Manual


Instance is a classic 2D game creation tool, written from scratch in Rust. You build games from sprites, objects, events and rooms, with drag-and-drop actions or the GML scripting language. It opens existing `.gmk` and `.gm81` projects and plays them the way you remember, on Windows, macOS and in the browser.
Older games rely on all kinds of engine quirks: the order events run in, the exact random number generator, how `sound_isplaying` lags behind the audio. Instance reproduces them faithfully, checked with black-box tests.
Try it in your browser
[](https://github.com/groverburger/instance#try-it-in-your-browser) The web version is the whole IDE and player, compiled to WebAssembly. It opens with three example games: pick one, change it, and press Run. Click a screenshot to play that game.

- **Spelunky Classic**, Derek Yu's 2008 game, from the source he released in 2009.
- **Emberwood**, a walk through an autumn forest in 3D, built from `d3d` models in GML.
- **Gravity Grade**, a falling-block game written in GML.
Your work is autosaved in the browser; File > Save downloads it as a `.gm81`.
Features
[](https://github.com/groverburger/instance#features)
- **The full IDE**: sprite, sound, background, path, script, font, timeline, object and room editors, plus an image editor, a debug mode and an Output Log.
- **The full runtime**: GML, drag-and-drop actions, views, paths, particles, surfaces, 3D (`d3d_*`), MIDI and sound effects, joysticks, extension packages and DLLs.
- **Hardware-accelerated** OpenGL rendering, with a software renderer as a fallback.
- **Create Executable** builds a standalone game, and **Export Web Page** saves it as one `.html` file that plays in any browser.
- **Multiplayer** (`mplay_*`) over TCP/IP.
- **Runs in the browser**: the whole IDE and player, compiled to WebAssembly.
- **Project folders**: a project can be kept as plain text and PNG files, ready for git, and converted back to a `.gm81` without losing anything.
- **Imports `.gmx` / `.gmz` projects** from later engine versions with `gmx2gm81`.
Getting started
[](https://github.com/groverburger/instance#getting-started) Grab a build from the releases page, or use the web version without installing anything.
To build from source, install Rust and run:
git clone https://github.com/groverburger/instance cd instance cargo build --release
Then start the IDE, or play a game directly:
target/release/instance-ide # the editor target/release/instance-runner game.gm81 # play a game target/release/instance-runner game.gm81 --debug
Linux isn't supported yet, but it should work when built from source: you'll need the ALSA, udev, X11/Wayland and GL development packages first. The manual explains how to make games, from a first tutorial to the full function reference; it is also built into the IDE (Help > Contents, or F1). The reference covers the rest: command-line tools, the headless test harness, the web build, DLLs and platform notes.
Clean-room implementation
[](https://github.com/groverburger/instance#clean-room-implementation)
Instance is an independent implementation. Its behaviour is written up in `specs/` from documentation, project file data and black-box observation, and the code is written from those specs; no existing engine code was disassembled, decompiled or copied. CLEANROOM.md describes the process.
Project layout
[](https://github.com/groverburger/instance#project-layout) | Crate | What it does | | --- | --- | | `gml` | GML lexer, parser, compiler and interpreter | | `instance-runner` | the game engine | | `instance-ide` | the editor | | `instance-format` | reading and writing `.gmk` / `.gm81` files and project folders | | `instance-check` | `gmk-check`, a static checker for projects | | `instance-gmx` | the `.gmx` / `.gmz` project converter | | `instance-net` | multiplayer | | `instance-dllcall`, `instance-dllhost32` | calling native DLLs, including 32-bit ones | | `instance-blackbox` | black-box test projects for checking compatibility |
License
[](https://github.com/groverburger/instance#license) Instance is released under the MIT License. The bundled fonts keep their own licenses (Liberation Sans: SIL Open Font License; Roboto: Apache 2.0).
The example games are in `web/examples`. Emberwood and Gravity Grade were made with Instance and are shared under the MIT License. Spelunky Classic is not covered by Instance's license: it is © 2008, 2009 Derek Yu and Mossmouth, LLC, shared under the Spelunky User License v1.1b. The copy here is a mod of the original source: its sound goes through GameMaker's built-in sound functions instead of `supersound.dll`, so it runs without a DLL and in the browser (`scripts/build-spelunky-mod.py` makes it). Instance is not affiliated with Mossmouth or with YoYo Games.