Compiling
Compiling your game can mean one of two things: compiling it for testing, or compiling it to create a final executable package for a specific target platform. This page aims to explain both of those options in detail.
Compiling for Testing
Compiling your game for testing can be done by simply pressing the Play button
at the top of the IDE, which will launch the game for testing using the specified target. You can also run the game in Debug Mode by testing using the Debug button
. This will run the game, but also open up the Debug Window, where you can monitor how your game performs and see any issues (see the section on Debugging for more information).
Target Settings
By default GameMaker will run and debug using the built-in Virtual Machine (VM), which is more or less the same as running on the desktop OS being used. However, GameMaker is a cross-platform engine and you can test, debug and compile executable packages of your projects on a number of different target platforms (the exact platforms available will depend on the details of your licence). To change the current target platform you can click
on the Targets button
to open the Targets Window, which will look something like this (exact details will vary based on your licence type):
At the top, beside the Targets button, you have the current settings which tells you the platform and the specific settings actually being used, and then the rest of the window is taken up with the details and options for all the available targets which you can select to use instead. Each section of this window is explained below:
PlatformPlatform
This section lists all the available target platforms, which depends on the licence you have.
To select a target, simply click
on it; this will then update the rest of the options windows to show different details depending on the platform selected. If you don't have the required module installed in the current runtime then GameMaker will ask you to download and install it when you click
the target:

If you select "No" here then the target will be reset to the previous target you had selected.
If you select "Yes" then the modules for the target will be downloaded and installed.
NOTE See the Runtime Feeds Preferences page for more info on how to change which modules are included.
Specific details on compiling for each platform are given below in Creating A Final Executable Package.
OutputOutput
Each target platform can have one or more output formats, the main ones being:
- VM: The VM (Virtual Machine) target uses a generic runner for each platform and then interprets the code for your game. In general this option is used for testing due to its faster build times, but it does not offer the same performance boost that using the YYC option (if available) offers. You can use this to compile executable packages for smaller games or games where performance is not ever going to be an issue.
- YYC: The YYC (YoYo Compiler) generates C++ code from your GML code, before using the target's C++ compiler to compile it into native code for the target platform. It strips out unneeded functions and performs a host of other optimisation techniques to create a smaller and performance-enhanced executable package.
This can increase your game's performance by at least two or three times, especially on logic-heavy games, and is ideal for those larger or CPU-intensive projects. Compile times may take longer and you should always clear the compiler cache before building any final complete asset package for a target platform. Note that the YYC target may require extra tools to be installed for the platform selected, otherwise it will not work - you can find further information about this from the YoYo Games Help Center as well as on the individual target Preferences pages detailed in this manual. - JavaScript: The JavaScript target will only be available for specific targets, like the HTML5 target, and sets the game to be compiled to pure JavaScript. This uses ECMAScript 2015 (or ES6) for the JS it outputs.
DeviceDevice
Certain platforms (like iOS or Android) permit you to associate one or more devices with GameMaker so that games can selectively compile to them. Initially, the device list will be empty and you need to click
on the Pencil icon
to open the Device Editor:
Here you can add new devices as well as have GameMaker test for a connection to any device(s) that may be connected. The exact contents of this window will depend on the platform specifics (see the section on the Device Manager for exact details for any given platform). Once a device has been found or added, it will then be shown in this window, like in this example image for Android:
The exact procedure and requirements for setting up devices and troubleshooting issues can be found in the appropriate section of the GameMaker Knowledge Base.
ConfigConfig
As explained in the section on Configurations, you can store certain details for compiling your game as Configs. This section of the Targets window permits you to have GameMaker automatically select a specific configuration for a specific target platform.
There are also a number or preferences that can be set to modify and customise the compile workflow, explained on the following page:
Creating A Final Executable Package
You can click the Create Executable button
in the IDE to start the compiler build or select Create Executable from The Build Menu. Either process will start the build process which will depend on the target platform selected.
On the GX.games target, it will open a special window allowing you to compile and upload your game to GX.games; on all other targets it will open a file explorer window where you can give the final name that you wish to use for your game executable, before clicking Save to start the compile and build process. Once you have done this, the necessary files will be generated so that you can distribute it as you wish.
You Should Know
Here are some things to keep in mind when creating executables:
- You will not be able to create an executable if you're not logged in. Use the
Account Menu menu to log in before creating an executable. - For certain platforms, compiling your game project will require that you have set up the correct build tools (see Required SDKs) and also filled in the appropriate Platform Preferences.
- Depending on your licence, you may have the option to build your game via command line, allowing you to set up continuous integration for your project and streamline your building and testing process. See Building via Command Line for more information on command line building.
- The maximum size of the final game package is 4GB (not including streamed sounds, dynamic textures and Included Files). See tips for reducing the final game size.
- Before doing a final build of your project for release, you should always clear the Asset Compiler cache (using the "broom" icon
at the top of the IDE). GameMaker will cache many of your game files to keep compilation speed to a minimum and these can sometimes get corrupted, so it is safer to clear that cache before doing a release build.
Compiler Optimisations
You can optimise how the compiler compiles (parts of) your game's code by providing it optimisations with the "optimise" (or "optimize") pragma. These may apply to multiple targets or be specific to some build targets. Using them in the right places in your code can lead to great performance improvements in your game.
See gml_pragma for the full list of optimisations you can use and how to use them.
How Different Targets Build
Each target option saves to a platform specific format, listed below:
- GX.games - When compiling for the "GX.games" target, you will see the "GX.games Packaging" window which will first ask you to sign in using your Opera account:
You won't need to sign in here if you've already signed into GameMaker using Opera Single Sign-In.
Next you will be asked the packaging option to use:

After you have signed in, it will start compiling your game and proceed to upload it to GX.games. You can then click on "Edit Game on Opera" to edit it on GX.create and publish it:
Please refer to this page to learn more about the GX.games upload process, and this page for setting up the various exports, such as YYC and Mobile. - Windows - Compiling for the general Windows OS will first request that you choose between creating an Installer or a Zip package, where the installer will be a single executable that will install your game, and the Zip file will be a single *.zip format compressed file with all your game files stored within (the files will need extracted for the game to run).
If you check the box marked Remember Packaging Option then GameMaker will remember the choice for all future compiles (this can be reset or changed from the Windows Preferences). You can find out more from the YoYo Games Help Center.
The Windows target only compiles 64-bit executables. - Ubuntu (Linux) - Compiling for Ubuntu will ask you to choose between creating an .AppImage or a .zip file, containing either an x64 or an ARM executable (however AppImage does not support ARM). You can find out more from the YoYo Games Help Center.
.AppImage is used for sharing as a package via any distributor except Steam, while .zip is used only for uploading to Steam (as it uses the Steam Runtime specifically). Because of this, the created .zip cannot be opened as a regular zip file. - HTML5 - If you have chosen to build HTML5, then an index.html file (this is the default name, but you can give your own name too in the Platform Preferences) along with a folder containing your game files will be created and saved to the specified location. For your game to work you will need both of these to be uploaded to a server. The index.html can also be customised to show your game with a different background colour, or at a different position etc... but a knowledge of HTML is necessary for this, and you can also specify your own custom index file when you build the package (see the HTML5 Game Options). You can find out more from the YoYo Games Help Center.
- Android - For Android devices, you can choose to build an *.apk or an *.aab (Android App Bundle) file from the window that is shown for saving the game:
The type of file you choose will depend on the store that you wish to target, with the *.aab file being required for Google Play, while the *.apk file can be used on other stores. You can find out more from the YoYo Games Help Center. - iOS - Compiling to iOS will create an xarchive file which is then used in Xtools to create the final iOS package. Note that to compile for iOS you will require an Apple Mac computer running OSX or higher as well as the relevant certificates and permissions. You can find out more from the YoYo Games Help Center.
- macOS - Compiling for the macOS target will first request that you choose between creating a DMG or a Zip file:
"Package as DMG" will build a .dmg installer package which can be used to install the game on a Mac computer. Note that during this build process you will see the installer appear on the Mac, which will disappear once the build process is complete.
"Package as Zip" will build either an *.app file or a *.pkg file, depending on whether you want to later upload it to the Mac App Store or not. As with iOS you will require an Apple Mac computer running OSX or higher as well as the relevant certificates and permissions. You can find out more from the YoYo Games Help Center.
Distributing your Game
Once you have created your executable asset package you can then give the file to other people or place it on your website to download, or upload these files to the different hosting services for individual distribution or even to online stores (like Google Play, Apple App Store or the Microsoft Store) for general distribution and retail.
Note that you are free to distribute the games you create with GameMaker in any way you like, including selling them. Of course, this assumes that the sprites, images, and sounds you used to make it can be distributed or sold as well and that you have the legal rights to all assets, and it also assumes that the game complies with the YoYo Games EULA for GameMaker.