Gamemaker Studio 2 Decompiler _hot_

Creating a decompiler for GameMaker Studio 2 (GMS2) games involves understanding the compilation process of GMS2 and how its game files are structured. GameMaker Studio 2 uses a proprietary format for its compiled game files, which are not easily readable or editable directly. A decompiler would need to reverse-engineer this process to translate machine code or bytecode back into a form of GML (GameMaker Language) or a similar high-level representation.

This is a complex task that requires in-depth knowledge of programming, reverse engineering, and specifically, the GameMaker Studio 2 engine. Here's a simplified overview of steps you might consider if you were to attempt putting together a piece of a decompiler: gamemaker studio 2 decompiler

Typical technical approaches (high-level)

  • Package extraction: Many GMS2 games ship with resource/archive files (e.g., .win, .apk, or custom pak files). Tools or simple archive utilities can sometimes list and extract contained files.
  • Asset scanning: Search binary blobs for common file signatures (PNG, OGG, WAV, JSON) and carve them out.
  • Bytecode analysis: GMS2 may compile GML to bytecode or an intermediate format. Reverse engineers analyze bytecode to produce readable pseudocode; this requires specialized tooling and skill.
  • Runtime inspection: Attach a debugger or instrument the running game to dump memory, resources, or log code paths (legal only with permission).
  • Community tools: There are third-party utilities and scripts that automate parts of the extraction process for specific engine versions. Their reliability varies across GMS2 versions and target platforms.

Introduction

For years, GameMaker Studio (GMS) has been the entry point for indie developers, spawning hits like Undertale, Hyper Light Drifter, and Pizza Tower. With such popularity comes an inevitable side effect: curiosity. Whether it’s a developer who lost their source code or a modder wanting to peek under the hood of their favorite game, the demand for a GMS2 decompiler is constant. Creating a decompiler for GameMaker Studio 2 (GMS2)

However, unlike engines like Unity or Unreal, where asset extraction is relatively standardized, the GMS2 decompiler landscape is a fragmented, community-driven effort. Introduction For years, GameMaker Studio (GMS) has been

1. Understand GameMaker Studio 2's Compilation and File Structure

  • Research: Start by studying how GMS2 compiles games. Look into the file formats used by GMS2 for its projects and compiled games. Understand the differences between .gmk (GameMaker project files), .gms2 (GameMaker Studio 2 project files), and compiled game files.

Part 7: The Future – GMS2.3 and Beyond

GameMaker's evolution affects decompilation:

  • GMS2.3+ introduced: Functions as first-class citizens, chained accessors, new array syntax. Older decompilers (pre-2021) crash on these.
  • UndertaleModTool actively updates to support new bytecode versions. However, each YoYo Compiler update potentially breaks existing decompilers for weeks.
  • Opera GX export (new runtime): The upcoming GMS2 runtime (Opera GX) uses WebAssembly for browser games, which is more secure than raw JS but still reversible to WASM text format.

Prediction: Decompilation will become harder but not impossible. The cat-and-mouse game between engine security and reverse engineers will continue.


What you can typically recover

  • Assets: sprites, textures, audio files, fonts and sometimes raw image/animation frames are frequently extractable.
  • Data files: levels, room layouts, and configuration files may be readable in plain or semi-structured formats.
  • Scripts/logic: higher-level GML source is often not fully reconstructible; you might recover bytecode, intermediate representations, or pseudocode that requires manual reconstruction.