This guide covers the obsolete UWP target for Windows 10 Desktops, which was available in all versions of GameMaker prior to 2022.8, assuming you have a GameMaker Indie subscription and above. As of 2022.8 you should use our GDK extension in your project and instead create a regular Windows build, as this can then be sent to the Microsoft Store just the same as you would have done with UWP.
In this article we give the required steps to get the UWP target up an running on a Windows 10 Desktop PC.
Note that you must follow these steps and set up the export to desktop first before attempting to set up the other possible UWP platforms.
It's important to note that you must be using a PC with Windows 10 or 11 installed for the UWP target to work! If you are not running Windows 10 or 11, this guide will not work for you.
UWP Requires Visual Studio
Before you can build any projects you will be required to download and install Visual Studio for Windows.
You can find the specifics on which versions of Visual Studio are supported in which versions of GameMaker on the Required SDKs FAQ.
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 GameMaker anyway, so you should already have this.)
Visual Studio Community 2019 can be found here. Should you require the older versions, 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).
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 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 Universal Windows Platform Development and then ensure the "v142 tools" component shown on the right is selected also.
Note that install options shown in the image below differ from the defaults, and only show the required options for GameMaker to build Windows UWP 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 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.
Select the Universal Windows Platform development workload and Desktop development with C++ as shown below (note that your version numbers may be higher than shown):
And then switch to the Individual Components page and ensure that you also select Windows 10 SDK 14393:
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.
Enabling Windows 10 Developer Mode
With Visual Studio installed, you now need to enable Developer Mode for your Windows 10 PC as well as set up the Device Portal. If you do not do this, GameMaker will not be able to communicate with the PC and create your UWP apps.
The easiest way to enable Developer Mode is simply to type "Developer Mode" into Windows Search and then click the "Settings" entry that will be shown. This will open the following window:
You need to select the Developer Mode option (which may itself require that Windows downloads and installs some additional packages before it will let you) and then select the option beneath that: Enable Device Portal.
For more information on the Device Portal please see this Microsoft Article: Device Portal For Desktop.
Enabling Device Portal Authentication
Once the device portal is enabled you will have the option to give a username and password in order to limit who can connect to your PC from external computers. GameMaker itself does not require this, as all compiling will be done on the local machine, but you may want to enable it if you're on a network and want multiple team members to target this PC.
EDIT 27 May 2020: A recent Windows Update change to the tool "dpdeploy" does seemingly now want you to enable authentication, even though the developer settings panel and device portal still allow you to leave it disabled. If you find you get the "Handshake Failed" or "dpdeploy returns a HTML page" errors detailed at the bottom of this FAQ, then you need to come back here and follow this section.
Note that the username and password should be unique to the portal and must not be those used by your Microsoft Account or other Windows credentials.
Once you have given this information, click the button labelled Apply and then click either of the "Connect using" links to ensure that you can open your device portal properly (it should open in your default web browser).
If you have any prompts about having enabled authentication but not included a SSL certificate for your device portal, then GameMaker itself does not require https and you can click "Continue with an unsecured connection". However, if your organisational policies require the use of a SSL certificate before you can connect to the server, then you will of course need to set this up.
Once you have clicked the "continue" button (clicking the "Don't show again" checkbox if you want to stop this dialog being shown again) or you have provided an SSL certificate to use, your device portal will ask you to log in once using your authentication details, so please do this.
Ensure you can log in to your device portal at least once and then go back to GameMaker Studio 2. You can close the Settings app and the browser tab for the device portal at this time if you wish.
GameMaker Preferences
We now need to go back to GameMaker and open Preferences (File > Preferences), then browse down to the section Platform Settings and finally Windows UWP:
Your "Visual Studio Location" value 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 Community: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat
- VS2017 Pro: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars32.bat
- VS2019 Community: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat
- VS2019 Pro: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat
Again, assuming you left it at the default location inside Visual Studio, the tools location you need is going to be in the format: C:\Program Files (x86)\Windows Kits\10\bin\[the SDK version you installed]\x86
E.g., the example shown in the screenshot above of:
C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86
Setting Up Your Windows 10 Desktop Device
The final stage for setting up the UWP target for Windows 10 Desktop requires you to add the Windows 10 PC as a device to your Target Manager. In the Target Manager Window you can see that there is a section marked Devices with a small "pencil" icon beside it:
Clicking this will open up the UWP Device Manager where you can add one or more UWP devices to target when running and building your projects for the UWP platform. Here you should click the Add New Device button to create a new Device and then fill out the details.
The top field, Display Name is simply a name that you can give to the device so that it is easy to identify in the devices list.
The Host Name is the IP address of the Windows 10 PC on the network that is to host the game (or the word "localhost" if you're just using your local PC) and must be suffixed by a colon and then the port number Device Portal advised you to use.
After that, if you have enabled authentication details in your device portal settings you now need to add the User Name and Password. We show this in the screenshot above, but it is technically optional.
You can leave the PIN blank as it is not required for UWP Windows 10 Desktop.
You're Good To Go
You have now set up a Windows 10 UWP Desktop PC and can go ahead and select it and then click the "Play" button at the top of the IDE. This will compile the game and run it on the Windows 10 PC.
IMPORTANT! If the project has been imported from a previous version of GameMaker, it will not have a temporary PFX key assigned to it. This is required for testing and compiling, so you can re-add the default one by going into Game Options > Packaging and then replacing your current path value with the default of: ${base_options_dir}\windowsuap\keys\WinUWPRunner_TemporaryKey.pfx
When you have tested your project and are ready to upload it to the Windows Store, you need to create a final executable package, which is explained in the following article:
(Optional) Targeting Other UWP Devices
Now you have set up Windows 10 UWP for Desktop, you can set up the other UWP platforms if you have access to those devices and wish to develop for them. See the following guides for more information:
Troubleshooting
Builds complain about missing files
If you are having problems creating or testing a project with the Windows UWP target, you may need to have created some blank projects in Visual Studio 2015 Community first, as this will generate certain app dependency files that may be required.
To do this, open Visual Studio 2015/2017 and create a new C++ Blank UWP Project.
After choosing the minimum and target versions of Windows 10 that you want to use for the app, you need to test the app in Debug and Release for each of the CPU architectures available. So, select the targets from the top of the VS interface like this:
- Debug > x86 > Local Machine
and then:
- Release > x86 > Local Machine
Do this for each of the CPU architectures, then close VS and try running your projects again in GameMaker.
"Handshake Failed" errors when building projects
If you have the below error when building all projects, then this is due to you being on a recent version of Windows 10 or having a group policy which means your Device Portal is insisting on you providing authentication details when using the tool dpdeploy.
Unable to decode the returned string from dpdeploy:System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. --->
System.IO.IOException: The handshake failed due to an unexpected packet format.
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async) --- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at dpdeploy.Program.HttpGetExpect200(String _uri)
See the Enabling Authentication section above and follow through the steps there in order to fix this issue.
dpdeploy connection attempts return a HTML page about SSL errors
Related to the above error, you may find that rather than dpdeploy connecting to your device, you get this output in your compiler window:
Unable to decode the returned string from dpdeploy:?<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Windows Device Portal</title>
<link rel="Stylesheet" href="css/common.css" />
<link rel="shortcut icon" href="favicon.ico" />
<script src="js/jquery.js"></script>
<script type="text/javascript">
function setSslState(sslState) {
var params = { sslState: sslState, remember: document.getElementById("rememberSslState").checked };
var sslStateUri = "/api/authorize/setSslState?" + $.param(params);
document.location.href = sslStateUri;
}
</script>
</head>
<body id="root">
<div class="wdp-error">
<h1>Confirm security settings</h1>
<br />
You've enabled a password for Windows Device Portal but have not set up a secure (HTTPS) connection. Be aware that an Http-only connection to Windows Device Portal sends your username and password over the network unencrypted.
<br />
<br />
<a href="https://aka.ms/WDPSecureConnection">Configure a secure connection</a>
<br />
<br />
<button class="commonButton" id="continueButton" onclick="setSslState('http');">Continue with an unsecured connection</button>
<br />
<input type="checkbox" id="rememberSslState" /><label for="rememberSslState">Don't show again</label>
</div>
</body>
</html>
This is that you have not visited the device portal and clicked the relevant SSL option for your needs, as mentioned in the Enabling Authentication section above. Follow through the steps there in order to fix this issue.