In this article we give the required steps to get the Ubuntu platform up and running for all of the Windows, Mac and Ubuntu (Beta) IDEs.
Please see the Ubuntu section of our Required SDKs FAQ for current information on which version(s) of Ubuntu you should be using, 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.
General Information
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
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 with 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:
- build-essential
- openssh-server
- clang
- libssl-dev
- libxrandr-dev
- libxxf86vm-dev
- libopenal-dev
- libgl1-mesa-dev
- libglu1-mesa-dev
- zlib1g-dev
- libcurl4-openssl-dev
- ffmpeg
- libfuse2
- curl
- nproc (pre-installed as part of GNU CoreUtils in recent distros)
- pulseaudio (required as of GameMaker 2024.800+)
Ubuntu 24 Specifics:
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
To make the change persistent, add kernel.apparmor_restrict_unprivileged_userns = 0 to /etc/sysctl.conf.
NOTE: This is removing a security restriction which was added to Ubuntu, so you do this at your own risk.
Ubuntu 22 Specifics:
If you try to use any GameMaker version 2024.8 or newer on Ubuntu 22 LTS, then be aware you will need to follow this guide for updating your machine's FFmpeg library installation before you try to do anything regarding audio assets in your projects/doing any builds of your project.
Ubuntu 18/20 Specifics:
These old Ubuntu LTS releases are no longer supported (including, in the case of 18, by Ubuntu themselves) - however, be aware you would need to follow the FFmpeg instructions given above for 22.
Install The Tools For Building AppImage Packages
All versions of GameMaker starting with the 2022.3 release also 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:
Steam Runtimes
$ 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:
linuxdeploy
$ 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
AppImage
$ 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):
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: