GameMaker Indie subscription and above come with the three PC export platforms: Windows, Mac and Ubuntu. In this article we give the required steps to get the Ubuntu platform up and running in both the Windows and Mac IDEs.
Please see the Ubuntu section of our Required SDKs FAQ for current information on which version(s) of Ubuntu you should be using when making your game builds, as this can vary according to the version of GameMaker you're using.
We do not recommend trying to use newer versions of Ubuntu than we claim support for on that page, as the install instructions could differ from what this guide contains. Other distros may also differ in their setup.
After installing and running GameMaker on your PC or Mac you can specifically target building for Ubuntu using the Target Manager window opened by clicking the target button in the top right of the main window:
For the Ubuntu target platform you can see that there are two output options:
- VM - This will build your game using interpreted code.
- YYC - This will build you game using compiled native code.
The VM option will build your game and use interpreted code within a special YoYo Runner. The performance of this target is less optimised than YYC, but it is faster to compile and offers the ability to run in debug mode (when using YYC the debugger will not start). The YYC target however, gives a much greater optimisation (and corresponding performance boost) especially with logic-heavy games, but large projects can take some time to compile.
To compile your game using either the VM or YYC however, you will first need to set up your Devices so that GameMaker can communicate with your Ubuntu machine.
Set Up Ubuntu Itself
Ubuntu 20.04 LTS: https://old-releases.ubuntu.com/releases/focal/
If you still need Ubuntu 18.04 LTS (please consider just updating your GM instead!): https://old-releases.ubuntu.com/releases/bionic/
You should install the OS on a separate physical computer for use when building your game projects. You can compile with Ubuntu running on a Virtual Machine, but this is not officially supported and may not give great performance anyway, so if you have any issues you will need to investigate your setup yourself.
NOTE: Other distros can be used for building projects and running games made with GameMaker, but, again, this is not officially supported.
Once you have a Ubuntu installation ready, you will need to install the development libraries/tools required during builds. To do this, you should open Terminal, which can be found by clicking on the Dashboard icon and then simply searching for the "Terminal" application. Click on it to open it and you should see a command prompt something like the one shown below:
Then we need to use the command apt to get the packages which are required to compile and run games.
First, you should update the records of the repositories so you can get access to the latest versions of the packages. This is done by using:
sudo apt-get update
Following this, you can now install the packages listed by the following command:
sudo apt-get install <packagename>
where you replace <packagename> with each of the following (individually) and run the apt command repeatedly until you have installed all of them:
Ubuntu 18 users: One very important step is to confirm which version of ffmpeg you have just installed - late 2021 and into 2022 releases onwards of GMS2 require a v4.x package. If you're on the older ffmpeg, then you won't hear any audio in your games after you have built them.
If running the command "ffmpeg -version" returns "ffmpeg version 3.x.x", then use the command "sudo add-apt-repository ppa:savoury1/ffmpeg4" followed by "sudo apt-get install ffmpeg" once more.
Extra note: GameMaker versions 2.2.3 and above also require the "nproc" package to be installed. This is installed by default in Ubuntu 18, but might not be there if you have customised your install (or may not be installed by default in other distros), so be aware you might need to install this manually also.
Similarly, if you had selected "3rd Party Components" when prompted during installing Ubuntu itself, you may already have the OpenAL libraries installed.
Install The Required Tools For GM 2022.3 Onwards
All versions of GameMaker starting with 2022.300 (March 22) Betas / 2022.3.0 March Stable will additionally require you to install the Steam Runtime, linuxdeploy and AppImage tools in order to run or build for Ubuntu.
Be aware that these tools are not yet available for ARM architectures, and accordingly creating an AppImage will not be possible on Linux ARM targets - you should change your "Create Exe" type back to the .zip option GM has always offered.
To install the required tools, please run the following commands:
$ sudo mkdir /opt/steam-runtime/
$ curl https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.tar.gz | sudo tar -xzf - -C /opt/steam-runtime/
You can control where the runtime is installed by modifying the final path at the end of that command; however, if you do so, you must also change your Ubuntu settings within GameMaker's preferences:
$ wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
$ sudo install -m 0755 linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy
$ wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
$ sudo install -m 0755 appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
Set Up Your Devices
Back in GameMaker, in Target Manager you can see that there is a section marked Devices with a small "pencil" icon beside it:
Clicking this will open up the Ubuntu Device Manager where you can add one or more Ubuntu machines to target when running and building your projects for the Ubuntu platform. Here you should click the Add New Device button to create a new Device and then fill out the details (below you can see an image with an example of the information required):
Display Name is simply a name that you can give to the device so that it is easy to identify in the devices list.
Host Name is the IP address or Device Name of the Ubuntu system on the network that is to host the game. To get the IP address of the Ubuntu system (whether a physical machine or a virtual machine) you simply have to go to the Settings menu and click on the Network icon and you can see the IP address there.
User Name and Password are for the the Ubuntu user account that will be used for testing/creating your game. Note: The username in most versions of Ubuntu is not the same as the display name and usually contains no capital letters.
Install Folder is where GameMaker will install the necessary components required to run your game.
With that all done you can then click the Test Connection button, and if you have installed all the required packages and the Ubuntu machine is visible over the network then it should say "Connection Successful!" (this may take a few moments to show up):
It is worth noting that as of GameMaker 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 will detect what kind of processor the device is using (ARM or x64) and create the required executable automatically.
Testing Your Projects
You are now ready to test your projects using the either the VM or YYC output target, so select whichever one you require from the Platform Targets window and then press the Play button. If all has gone correctly your project should now run on the Ubuntu machine.
Note that you can also test play your game using the "Debug" option at the top of the IDE. When clicked using the VM output it will run the game and enable the Debug Module to run too (this may require some extra permissions from the OS). This module permits you to see in detail how your game is performing as well as set breakpoints and check for issues or bugs. For more information, see the manual.
Once you have everything working and a game ready to publish, you'll want to compile and distribute it to other Ubuntu users. This is covered in the following article: