In this article we explain how to compile and distribute your game on the Ubuntu platform. If you have not already set up and tested an Ubuntu device to use with GameMaker Studio, please see the following article before continuing:
Note that to compile a final eexcutable for this target platform you MUST have an Ubuntu (Linux) machine for GameMaker Studio 2 to connect to.
Once you have finished your game project and have tested it to make sure that it all works as it should, you will likely want to distribute it as an executable package. To create this package for distribution is a case of simply hitting the Create Executable button at the top of the IDE and then give a save location and name for the package to be created (this saved package is simply a backup to be saved on your local machine, as GameMaker Studio 2 will also push the final executable to the Ubuntu machine):
The Ubuntu target will create a ZIP file that contains the main executable and a folder with the required assets in it.
IMPORTANT! It is worth noting that - as of GMS 2.3.1 - you can connect Linux devices with 32bit ARM processors and also compile/test games on those devices as long as they are correctly setup as per this guide. GameMaker Studio 2 will detect what kind of processor the device is using (ARM or x64) and create the required executable automatically.
You can find this ZIP file on your Ubuntu machine from the file explorer, in Home > GameMakerStudio2 > [AppName]:
The ZIP file can then be distributed and the contents extracted to where the user wants. Running the executable will run your game:
It's important to note that the executable will use the standard Ubuntu EXE icon, since it is impossible for an icon to be added automatically and work on all possible versions and distros. However, you can create your own desktop icon (the icon image is supplied as part of the Assets folder within the compiled ZIP so it will be available once installed) following the instructions found here:
How To Create Desktop Launchers
Playing The Game
It is important to note that - depending on the version of Ubuntu that the user has - additional dependencies may need to be installed to permit them to play the game and this should be mentioned when distributing your compiled projects. The dependencies are:
Users should install these packages on their machine otherwise the games won't run. Note that it is possible to create *.sh scripts to automate this process and include that with your final package.