If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Help:Contents/Finding Content/Game Engines/GameMaker: Studio

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Help:Contents/Finding Content/Game Engines.

Hmmm...
To do:
GMRT is on the horizon
  • VM mode still exists (meaning code editing is not completely dead), better machine code mode using LLVM
  • WAD writing and compiling completely revamped
  • WAD format got more use outside of main data file and audio groups, can be created by a game at runtime

GameMaker: Studio is a game engine developed by YoYo Games. Released in May 2012[1], it brought a new game data format and a PSP C++ runner to the GameMaker world.

This page covers extracting GameMaker: Studio 1.4-2022.x game data. GameMaker Studio 2 was rebranded to GameMaker in 2022, but this article will still refer to the software by its former name.

GameMaker: Studio inherits its HTML5 runner from the oddball GameMaker:HTML5 (all the way to 2024, ridiculously, though it's at risk of being replaced by the WebAssembly/GX.games runner), so this page also contains some relevant information for HTML5 games built with the latter.

Game data

Elementary, my dear Cactus.
This needs some investigation.
Discuss ideas and findings on the talk page.
Specifically:
  • Filenames' usage are guessed, based on few sources.
  • PSP extension from an ancient version of GMAC, check correctness
  • Check UWP, Windows Phone and Tizen games. Old GMAC says Tizen uses HTML5 runtime, and indeed Tizen runtime module is nearly empty in 1.4.9999, so...

Typically, most game data is stored in a WAD file, also known as an IFF file; though WAD is how YoYo Games CEO Russell Kay refers to it. Depending on the platform, it has the following file names:

  • data.win (Windows) (confirmed with most commercial GM game releases like Undertale, Deltarune, Pizza Tower, etc. as well as fangames)
  • game.win (Nintendo Switch, PlayStation 3, PlayStation 4, PlayStation Vita, PlayStation 5, Xbox One, Xbox Series X/S) (confirmed on Nintendo Switch with Deltarune)
  • game.unx (Linux, GX.games/WebAssembly) (confirmed with the Linux release of Undertale and the GX.games release of Archaeogem)
  • game.ios (macOS, iOS, tvOS) (macOS confirmed with the Mac packaging of Undertale and Deltarune)
  • game.droid (Android) (confirmed with several GM games put on Google Play)
  • game.psp (PlayStation Portable?)
  • game.3ds (Nintendo 3DS, though corresponding build tools were never released)
  • game.symbian (Symbian, saw few commercial releases)
(Source: UndertaleModTool source code)
Elementary, my dear Cactus.
This needs some investigation.
Discuss ideas and findings on the talk page.
Specifically: The OGX part is guessing.

It is usually in the game directory on Windows, in the Contents/Resources directory of the game app on macOS, in the assets folder on Linux, or in the romfs on Nintendo Switch. The file should have most game assets, such as sprites, rooms, sounds, and code; However, for games compiled with YYC (YoYo Compiler), the game code is in the game's main executable, and the game data may be embedded into the executable (for example, the .exe for Windows games, or the .wasm file for GX.games games).

New games made with GameMaker Studio 2 may also have audiogroup*.dat files. These use the same WAD file format, except that there are only embedded audio in them. They are referenced by the main game data file, and are files created by the GMS compiler to store sounds put in audio groups in the game project.

For some Studio 1.4 games, such as Undertale v1.00 and its Microsoft Store version, the game directory only has an executable file, and the actual data files and game runner are archived inside the executable file (in a CAB with IExpress, Windows' self-extracting executable packager). The packaged files can be viewed and extracted by opening the executable with a tool such as 7-Zip.

For non-GX.games HTML5 games, the game data is in the game directory, and the code is in the main JS file. For GX.games games, external data files (other than game.unx and audiogroup*.dat's) are contained in a binary blob named runner.data, and its offset table can be found in runner.js by searching for {"files":[{.

WAD file format

The WAD format used to store game data and the bytecode format inside it is documented by various sources, such as:

The source code of decompilation tools such as UndertaleModTool may be also a good reference.

(Source: UnderminersTeam/UndertaleModTool)

Tools

Among all game data extraction tools for GMS, UndertaleModTool supports most games, has a extensive feature set, and is strongly recommended today; however, its support of games compiled with versions of GameMaker Studio after 2.1 is particularly incomplete. It's also Windows-only, albeit a significantly harder-to-use CLI version is available for other platforms.

To get started:

  • Download a version from the Releases page;
    • For general uses, the single file build (UndertaleModTool_vx.x.x.x-SingleFile.zip, or GUI-windows-latest-Debug-isBundled-true-isSingleFile-true.zip for the "Bleeding Edge" build) will suffice. For incompatible systems, the non-single file build (UndertaleModTool_vx.x.x.x.zip, or GUI-windows-latest-Debug-isBundled-true-isSingleFile-false.zip for the "Bleeding Edge" build) can be used.
    • The automated "Bleeding Edge" build is based on the latest source code of the tool, and tends to be more compatible with newer games.
    • In addition, there is an experimental but more compatible flavor featuring an improved decompiler available here. UndertaleModTool Community Edition is another fork specialized for Pizza Tower modding needs.
  • Open UndertaleModTool.exe;
    • Note that each startup the program associates .win files etc. with it. You can disable this in File -> Settings later, or by creating dna.txt in the same folder as the executable.
  • Click File -> Open and choose the game data file you want to view;
  • Start browsing. Double-click an asset in the sidebar to open it, and use scripts or the interface to extract assets.

Other tools (generally considered legacy today) include:

(Source: u/krzys_h)

References