GameMaker Studio 2 Desktop comes with three export platforms: Windows, Mac and Ubuntu. In this article we give the required steps to get the Windows platform up and running on both the Windows and Mac IDEs.
General Information
After installing and running GameMaker Studio 2 on a PC you should be able to test projects immediately using the "Windows VM" target using the Targets Manager window, located in the top right of the main GMS2 workspace:
(If you previously had a free Trial license, then you will be used to seeing the "Test" target here, but this psuedo-target will no longer be listed once you have the Desktop module.)
For the Windows 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 (if you target the YYC and try to do a debug run, GameMakerStudio 2 will notify you that the build will be completed using VM instead). The YYC target gives much greater optimisation and a corresponding performance boost, especially with logic-heavy games, but be aware projects will take more time to compile.
When compiling for Windows VM on a PC, GameMaker Studio 2 requires no further setup, as VM builds do not require Visual Studio or any other external tools to be installed on your PC. However, if you wish to compile using Windows YYC, or if you are using the Mac IDE to do your builds, then you will need to do a couple of additional steps...
How Do I Enable 64bit Support?
Just as a quick note, starting with GMS 2.3.1, you can now toggle building a 64bit package in Game Options > Windows, as you can see here:
When we refer to 64bit builds in this FAQ, this is what we mean. Nothing about this Option changes whether you require Visual Studio or not.
Setting Up A Remote Worker (Mac IDE)
To compile your project from the macOS IDE to Windows you will need to use the GameMaker Studio 2 Remote Worker app.
This requires you to have a windows PC and have it visible to your Mac over a LAN. Unfortunately, without knowing your personal Windows/macOS/LAN/Router/Firewall setup, we can't give detailed advice on this bit (and our Helpdesk are unable to help with this also).
Once you have your Mac and PC connected and are able to transfer files between them, you need to open GameMaker Studio 2 and click on the Target Manager and then click the "eye" icon to find the Remote Worker Installer folder:
This will open Finder on the folder with the Remote Worker Installer executable, as shown below. Use Finder to now copy this Windows executable file to a location on your PC.
Once you have copied the remote worker setup file over, it needs to be installed on the PC (you do not need to install GameMaker Studio 2 itself, just the Remote Worker). When finished, it will run and in doign so open your default browser to the Remote Worker Welcome Page:
IMPORTANT! Your PC may give a firewall alert when you first start the Remote Worker and also when you do your first remote build. This is normal and you must permit the connection requests.
In the screenshot above you can see that we have highlighted the IP address and port of the Remote Worker. That is because you will need this for your Mac, so that it knows which PC to communicate with (you can set up more than one Remote Worker on different PCs if you require them).
Back on your Mac, you need to go back to the Target Manager and in the Worker column click the (+) sign to add your new PC remote worker:
You will then be prompted to give your Remote Worker a common name (this is what will be shown in the Worker list in the Target Manager) and then the Host Name. The Host Name is simply the IP:Port value that was shown in your PC browser when you installed/started the Remote Worker:
Clicking the "Add" button will test the connection and if all is okay it will add the Worker into your Target Manager list and when you select it you will see that the build targets change to show the different targets that this worker is capable of building for you.
You should now be able to select the Remote Worker from the Workers section of the Target Manager, ready to test a project. You can skip down to the Testing Your Projects section if you are happy to use the VM for testing and compilation, but if you wish to use the YYC then you need to continue on with the following steps.
Some Package Types Require Visual Studio
Before you can build any YYC versions of your projects you will be required to download and install Visual Studio for Windows (if you are using the Mac IDE then this will need to be downloaded and installed on the PC used as your remote worker).
You can find the specifics on which versions of Visual Studio are supported in which versions of GMS2 on the Required SDKs FAQ, but we currently recommend sticking with VS2017, as this is widely supported by most target platforms and in all current GMS2 releases - saves you having multiple large Visual Studio installs.
Please note that all versions of Visual Studio require you to be running at least Windows 7 with SP1. If you do not have SP1 installed, Visual Studio will refuse to install. (Win 7 + SP1 is the minimum required to run GMS2 anyway, so you should already have this.)
You can find information on how to get both Visual Studio Community 2015 and/or Visual Studio Community 2017 here (note that you may need to sign up for the free MS Dev Essentials package to access the download). Visual Studio Community 2019 can be found here.
Once downloaded, start the installation process, and then follow the steps outlined below for the version that you are installing.
Another reminder to check the the Required SDKs FAQ before you begin, so you know the version numbers of components required, etc.
Installing VS2017
When you run the installer for VS2107 you will be presented with a welcome screen where the products available for installation are listed. In this case you want to select Visual Studio Community 2017, which will then open a further window where you can select the components required and the install path for them. Here, click Desktop development with C++ and then ensure the components shown on the right are selected.
Note that install options shown in the image below differ from the defaults, and only show the required options for GameMaker Studio 2 to build Windows YYC packages.
Click Install to install the selected components, and then restart your PC to finalise the installation.
Installing VS2019
When you run the installer for VS2109 you will be presented with a welcome screen where the workloads available for installation are listed. Here, click Desktop development with C++ and then ensure the components shown on the right are selected.
Note that install options shown in the image below differ from the defaults, and only show the required options for GameMaker Studio 2 to build Windows YYC packages.
Click Install to install the selected components, and then restart your PC to finalise the installation.
Be aware that whilst we have not seen any such issues ourselves, a user has reported that the Just-In-Time Debugger and the C++ Profiling Tools may cause builds to fail for some reason. If you see this, and a reboot does not fix, then please uninstall those optional components.
Installing VS 2015
When you start the installation and have chosen an install location, you need to then then select the Custom option and click Next. This will take you to a window that shows the different components that you want to install, of which you should choose those marked in the image below. Note that these differ from the defaults, so ensure you do set these, otherwise GMS2 will fail to find your VS install in Preferences.
Additionally, in Visual Studio 2015, you need to install the MFC and ATL components, which are optional sub-components under Visual C++ (not shown in the screenshot above). If you do not select these components when you first install Visual Studio, you will not be able to compile using the YYC.
Click Next to see a summary of the components to install and then continue. Once the install process has finished, you can go back to GameMaker Studio 2.
Configure Your Platform Settings in Preferences (Windows IDE)
With Visual Studio now installed, we need to go back to GameMaker Studio 2 and open File > Preferences, then browse down to the section Platform Settings and finally the Windows section:
In here, your Visual Studio Location needs to be as below (assuming you installed Visual Studio at its default location):
- VS2015: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat
- VS2017: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat
- VS2019: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat
But if you customised your install, yours could look something like this:
You can also choose which type of package to compile the final executable to by default here. "Show message" means it will always ask you, or you can set it to always create an NSIS Installer or always create a Zip.
If your install of Visual Studio says it cannot be found, ensure that you have installed all of the correct VS components as shown in the relevant VS setup section above.
Configure Your Platform Settings in the Remote Worker (Mac IDE)
Open the remote worker system tray applet on your PC and then click the Settings button at the top of the browser page which has opened:
When the Settings page opens, scroll down to the section for Windows. In here, edit the value of Visual Studio Path to be as listed for Windows IDE users in the section above.
Testing Your Projects
You are now ready to test your project. Regardless of whether you are using the VM or YYC output, if you are using the Windows IDE then you can simply click the "Play" button on the menubar and the game will build and then run.
In the Mac IDE you will need to have started the Remote Worker app on your target PC and made sure you have selected the appropriate worker from the Target Manager (as shown below), and then you can click the "Play" button.
Using The Debugger
Note that when testing VM builds, you can also launch your game in the debugger by using the "Debug" button on the menubar near the top of the IDE.
The debugger allows 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.
Note that the YYC target is not supported by the GMS2 debugger. If you try to debug when YYC is selected in Target Manager then you will be asked if you instead want to do a VM build this time.
Once Testing Is Complete
When you are finished making your game and have tested everything, you are then ready to compile a final executable. This is explained in the following article: