-
Notifications
You must be signed in to change notification settings - Fork 10
GX.Games GMS2
GameMaker can build your projects and publish them on the free GX.Games game-hosting community website, so you can not only make your game very quickly and easily, but also release it quickly and easily on our free online game-hosting and sharing community where other people from all around the world can easily play your games.
Be aware that the game export file is actually a WASM package and therefore supports all major browsers, plus releasing your game on your own website or via Itch.io, Newgrounds, and other browser-based game-hosting platforms.
Note also that this is a high-performance, compiled package with in-game functionality and behaviours more similar to Windows, macOS, etc., than it is to the HTML5 target, despite being a "browser" platform.
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
The VM target doesn't require you to install any other SDKs/tools on your computer, but if you want to use the YYC target 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.
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.
*Emscripten: Emscripten SDK v3.1.47
Python: Python v3.10.2 (if required, you can instead use the Python downloads archive to get this)
Be aware Emscripten itself currently has a minimum requirement of Python 3.6.
Note that before following this guide, you will need to have installed the Opera GX browser itself and run it at least once to set it up however you would like. You can test your games later on using other browsers, but you will need Opera GX to be installed and this will be the default browser used by GameMaker.
The GameMaker installer actually includes the Opera GX installer, so you can easily install this when setting up GameMaker itself - but you can also download it at any time from here.
It's important that you keep the browser version up-to-date, as GameMaker and the browser may rely on something the other one has just introduced in a new version.
Emscripten is supported on Windows, macOS and Ubuntu OS, so it doesn't matter which GameMaker IDE version you're using. We show an example of how to install everything on Windows further down this page, but the full documentation and the download links for the Emscripten SDK can be found here - so if you do have any issues following the rest of this guide, please refer to that link to the Emscripten docs in the first instance.
Mac IDE and Ubuntu IDE users, there are very similar steps you will take, but enough differences in how to get the packages that you should refer to the Emscripten guide we linked above.
Caution
When doing GX.games YYC builds using the Windows IDE, GameMaker will always automatically disable the use of subst for that build, as the Emscripten tools do not like these temporary drives and short file paths being used - you must take care with the length of your project's name, save location, and all asset names in your project, so that you stay within Windows' 260 character path limit
Download the version of Python that we said from its official page, using the link in the Required Tools Versions section above, then install it using these settings:


For this, you will need a Git client installed and set up to your liking. We generally recommend the free Github Desktop, but other clients are available.
Simply clone the URL which the Emscripten guide says to use into an empty folder of your choice on your computer:
https://github.com/emscripten-core/emsdk.git
You can set the "Local path" to be whatever you want, but we would of course recommend a short path (e.g., C:\EmcriptenSDK) and somewhere easy to remember and locate later on.
For example:

Once the clone operation is complete you can close your git client.
Now, open a regular Command Prompt in Windows (the cmd application), change into the directory we cloned the repository into in the section above, and then perform the actual installation. So, for our example location of "C:\EmscriptenSDK", that would be the two commands:
c:
cd EmscriptenSDK
Then, when you're in the correct location for your install, run the two commands Emscripten uses to set up your installation:
emsdk install 3.1.47
emsdk activate 3.1.47 --permanent
This results in a working installation on Windows.
Tip
Android developers: One thing to note is that your cmd will say that the Emscripten SDK modifies your JAVA_HOME variable - we have never seen any issues, but your Android setup might need you to change this back to some other path once the Emscripten SDK install is complete
This is a completely optional step, but one which makes your first GX YYC build much faster - so if your setup is one where your machine often resets itself to a fixed snapshot and so you lose the GX cache, you may want to do this before making your snapshot. Note that any speed gains only affect your very first build, so in most cases there is little need to do this and so you can just skip to the next section.
Assuming you're still using the cmd window from the last section, you now need to change into the folder which contains the embuilder.py script - this is most likely the following commands:
cd upstream
cd emscripten
Once you're in the correct folder, you then need to call the Python script and tell it to do a minimal build, so that this writes out your SDK cache ("MINIMAL" does need to be all-caps):
embuilder.py build MINIMAL
So, altogether, this would look something like this:
Once you press Enter there will be a short delay and then you will start seeing lots of output, much of it green (this is just a very small sample of the first lines):
Before eventually you will be told a certain number of targets were built in a certain amount of time and you're back at the command prompt again.
If, either when warming the cache in the step above or when trying to do your first build inside GameMaker later on, you see this message (or one very similar that also talks about app aliases):
This is that Windows 10/11 has overridden the PATH value with a new section of its Settings app. If you click your Windows start button and search for that "App Execution Aliases" panel you can turn off all overrides for your various Python executables there, close and restart GameMaker if it was open already, then try running the build command again and it should work fine.
When you now return to GameMaker, you need to set your values in Preferences > Platform Settings > GX.Games before you will be able to build YYC games (again, none of this is used for GX.games VM builds and you have nothing to configure for VM builds.)
| Preference | What You Set It To |
|---|---|
| Emscripten SDK Location | The path to the folder you cloned the SDK into |
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.
Note that you may get a Firewall warning the first time you run for the GX.games target, as GameMaker uses a micro web server (see this section in the the permissions guide for more information) to serve the game to the browser and this will require access to your network.
If all goes well, you should soon see your game project running on your computer! Again, if the first build fails and blames Python app aliases, see the troubleshooting section higher up this page.
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!
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.
Once you have finished testing and are happy with the project, then you'll want to look at creating a final executable package and publishing it to a web hosting service. This process is explained in the following Helpdesk articles:
How to Publish Your Game to GX.games
How to Publish A Mobile Game to GX.games
Again, do not use versions other than the one(s) we state in the Required Tools Versions section higher up this page, but obviously at some point you will need to update your Emscripten installation. So here's how to do that...
Open cmd and change directory into your Emscripten install folder, then run the command to list everything your Git folder currently knows about:
emsdk list
If the new version you need is already in that list, then you can simply use the install and activate commands to switch your version straight away and then you're done with this guide; however, if the version you need is not in that list, then this is because you need to update your Git folder's contents so it gets the current list of Emscripten releases before you can proceed.
You can see this is mentioned at the very bottom of the "list" command's output when you ran it:
To actually do this, open your Git client and fetch the origin for the Emscripten repository, then pull the changes it found. Now, go back to your cmd window and run the emsdk list command again, and this time your required version should be shown.
You can now install and activate the version we say above is the one to be used.