Skip to content

Ubuntu GMS2

Daniel Cleaton edited this page Mar 26, 2026 · 6 revisions

GameMaker supports Ubuntu (which includes several Ubuntu versions and allows releasing your game via Steam, Itch.io, and others).

Target Manager (near the top-right corner of GameMaker) contains two export options for this platform:

  • VM - slower in-game performance, but quick to build each time and supports debugger builds
  • YYC - faster in-game performance, especially with logic-heavy games, but much slower to build each time and does not allow debugger builds

Regardless of the output that you select, you will need to add some extra build tools to your development computer before you can continue. In this article we give the required steps to set everything up.

Important

Other Linux distros can generally be used for building projects and should run games made with GameMaker just fine, but this is not officially supported and you may need to investigate the setup of your machine yourself if you have any problems.



Required Tools Versions

Caution

You must always use the specific tools version(s) advised in this section and do not assume newer versions than we list here "will be even better", as using newer tools than GameMaker knows how to support might introduce build failures you would have easily avoided if you had followed this guide correctly.

Package Any Notes
build-essential
clang
curl
ffmpeg
libcurl4-openssl-dev
libfuse2
libgl1-mesa-dev
libglu1-mesa-dev
libopenal-dev
libssl-dev
libxfixes-dev  May be required on some non-Ubuntu distros, such as Raspberry Pi
libxrandr-dev
libxxf86vm-dev
nproc Pre-installed as part of GNU CoreUtils in recent distros, so you may find you have this already
openssh-server
pulseaudio
zlib1g-dev


Setting Up The OS

Tip

You should install the OS on a separate physical computer for use when building your game projects. You can compile your games with Ubuntu running as a virtual machine under Windows, 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.

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. Then we need to use the command apt to get all of the various packages which are required on that machine before you will be able to compile and run games inside GameMaker.

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 with each of the following (individually) and run the apt command repeatedly until you have installed all of the packages listed in the table higher up this page.


Disable Ubuntu 24 Security Restrictions If Using Older Versions Of The Ubuntu IDE

If you are using 2024.1400.3 or older you might need to perform this section. Generally, we would say to continue with the rest of this guide first and see if you can build projects okay on your machine - and if you can't, then return here and follow this section and confirm this fixes your setup.

Caution

This is removing a security restriction which is part of Ubuntu 24, so you do this at your own risk.

A security restriction introduced in an update of the Ubuntu 24 OS causes projects to not build on some people's machines if they're using versions of the Ubuntu IDE before a matching change was made in 2024.1400.4 beta releases.

This restriction can be disabled system-wide with the following command:

sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0

To make the change persistent, edit the file /etc/sysctl.conf and add a new line with the following:

kernel.apparmor_restrict_unprivileged_userns = 0


Install The Tools For Building AppImage Packages

GameMaker also requires you to install the Steam Runtime, linuxdeploy and AppImage tools in order to run or build for Ubuntu.

Important

Be aware that at the time of writing these tools were not yet available for ARM architectures and accordingly creating an AppImage is not 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 the path in GameMaker's Preferences > Platform Settings > Ubuntu so that you point to your chosen location.

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 Remote Access To Your Machine

If you use the Ubuntu IDE to do your builds, then you can skip this section.

Windows IDE and Mac IDE users need to set up communications between your Ubuntu machine and your remote PC/Mac if you wish to trigger your game builds on the remote Windows/macOS machine.

Please see Ubuntu's settings app for configuring this according to your needs.

Tip

It's recommend the Ubuntu machine uses Ethernet to connect to the PC/Mac, rather than WiFi, as this can result in issues when building large projects with Ubuntu YYC.



Adding Your Ubuntu Device(s)

If you use the Ubuntu IDE to do your builds you will already have a "Default" device added automatically by GameMaker, which represents the Ubuntu machine you're using to run GameMaker, so unless you have a second Ubuntu machine you want to build on instead you can skip this section.

Windows IDE and Mac IDE users next need to set up a Ubuntu device to build on if you wish to trigger your game builds on the remote Windows/macOS machine.

Inside Target Manager, click first on Ubuntu in the left column. Next, there is a column marked Devices and this has a small pencil button at the top. Clicking this button opens Device Manager on its Ubuntu page, where you can add your device(s) to deploy to when building your projects. Click the Add New Device button and then supply the requested details.

Preference What You Set It To
Display Name A friendly name of your choosing so that this device is easy to identify in Target Manager
Host Name The IP address or device name of the Ubuntu system on the network - to find these, open System Settings on the Ubuntu machine and then open its Network section
User Name and Password The details for the Ubuntu user account that will be used to log in to that Ubuntu machine
Install Folder We would recommend that you leave the value as the default whenever possible, but if you have to pick a different destination for your games you can set this here

When that is setup, 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 all was successful. Now ensure you click the Apply or OK button in Device Manager to save this new device.



Testing Your Projects

Once the above sections are completed and you have a project ready for testing, you can open Target Manager and select the Target, Output and Device options that you want to use. You can then click the Run button on the menubar to compile the project.

If all goes well, you should soon see your game project running on your computer!

Tip

If any build ever fails, please read ALL of the Output Window log to determine why the build failed - do not only look at the two lines at the end, as you're missing the important information which will help you fix the issue right away!


Using The Debugger

When testing VM builds, you can also launch your game in the debugger by using the Debug button on GameMaker's menubar. The debugger allows you to see in detail how your game is performing, as well as set breakpoints and watch variables which will allow you to check for bugs in your code. For more information on how to use the debugger, see the manual by pressing F1 inside GameMaker or opening the Help menu.

Note that YYC runs do not support GameMaker's debugger - if you try to debug when YYC is selected in Target Manager then this will instead show a dialog saying GameMaker will do a VM build this time.

Be aware that running the debugger may require some extra permissions from the OS in terms of allowing firewall access, etc.



Creating Your Store Packages

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:

image

The Ubuntu target will create a ZIP file that contains the main executable and a folder with the required assets in it.

IMPORTANT! GameMaker 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]:

image

The ZIP file can then be distributed and the contents extracted to where the user wants. Running the executable will run your game:

image

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 Games

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:

libcurl4
libopenal1

Users should install these packages on their machine otherwise the games won't run. Note that it is possible to create *.sh scripts for you to automate this process for your players and include that script with your final package.

Home

GameMaker Info

Required SDKs


Clone this wiki locally