In this article we give the required steps to get the Windows platform up and running in the Windows IDE.
General Information
After installing and running GameMaker 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 GM workspace:
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 your 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 YYC and try to do a debug run, GameMaker 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 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...
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. To do that, first of all, you MUST check which versions of Visual Studio are supported in your versions of GameMaker by checking the Required SDKs FAQ.
- Visual Studio Community 2022 can be found here.
- Visual Studio Community 2019 can be found here.
- For older versions, see near the bottom of this page.
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 older versions of GameMaker that support Windows 7 anyway, so you should already have at least this.)
Once downloaded, start the installation process, and then follow the steps outlined below for the version that you are installing.
Installing VS2022 / VS2019
When you run the installer for Visual Studio 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 VS2022 install options shown in the image below differ from the defaults, and only show the required options for current versions of GameMaker to build Windows YYC packages. Also be aware that it will pick the Win 11 SDK even if you're using Win 10 - this is fine, you do not need to deselect it and choose an older SDK.
Note that VS2019 install options shown in the image below differ from the defaults, and only show the required options for older GameMaker versions to build Windows YYC and also all Windows UWP packages.
Be aware we never saw any such issue ourselves, but a user reported that the Just-In-Time Debugger and the C++ Profiling Tools caused VS2019 builds to fail for them in old versions. If you see build errors using 2019 and a reboot does not fix, then please uninstall those optional components and try again.
Regardless of 2022/2019, click Install to install the selected components, which will take a little while.
If you are asked to reboot your PC at any point, please do so and then launch Visual Studio again yourself when your PC has restarted.
If you are not asked to reboot your PC, Visual Studio should launch automatically. You do not need to create an account in Visual Studio if you're only ever going to use it with GameMaker, so you can skip that. Pick a theme and allow Visual Studio to reach the New Project screen (2022 shown below as an example), then you can simply close Visual Studio.
You can now open GameMaker itself.
Configure Your Platform Settings in Preferences
With Visual Studio now installed, we need to start GameMaker 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 Community and at its default location - if you installed VS Professional, simply swap the word "Community" with "Professional" in all of the paths below):
- 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\Common7\Tools\VsDevCmd.bat
- VS2022: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.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.
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 GameMaker's 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. For YYC you can instead use Visual Studio's debugger by following this guide.
How Do I Enable 64bit Support in Older GM Versions?
As of 2022.8.0, GameMaker only makes 64bit game packages, so you won't see these options in current GM versions.
In old GameMaker releases, starting with GMS 2.3.1, you could toggle building a 32bit or 64bit (x64 only) package in Game Options > Windows as you can see here:
Nothing about this Option changes whether you require Visual Studio or not.
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:
Should you require these older versions, you can find information on how to get Visual Studio Community 2015/2017/2019 here (note that you may need to sign up for the free MS Dev Essentials package to access the download).
Installing VS2017
Some users in the past reported issues with x64 builds on YYC when using Visual Studio Community 2017, as such we recommend only compiling to x86 (VM or YYC) if you're going to stick with these older versions of Visual Studio and GameMaker.
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 old GameMaker versions to build Windows YYC packages.
Click Install to install the selected components, and then restart your PC to finalise the installation. Once the install process has finished, you can go back to GameMaker.
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 GM 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 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.