The GameMaker Studio 2 UWP target permits you to test three different UWP export platforms: Windows 10 Desktop, Windows 10 Mobile and the XBox One. In this article we give the required steps to get the UWP target up and running on an Xbox One Developer device. If you have an Xbox One Retail device, please see this Microsoft article: Xbox One Developer Mode Activation and then come back here and skip down to the section titled "The Device Portal".
IMPORTANT! This article assumes that you have gone through all the steps outlined in the article Setting Up UWP For Windows 10 Desktop and that you have correctly installed VS 2015 and the UWP build tools.
NOTE: Creating a UWP package for the XBox One platform does not require you to submit for Concept Approval, and instead you need to register your application from the MS Developer portal. See here for more information: Setup UWP and XBox Live.
NOTE: UWP apps on XBox One are subject to certain resource limitations. You can find full details here: System Resources For UWP Apps On Xbox One
Setting Up The Xbox One
Before you can build and test on your Xbox One DevKit with GameMaker Studio 2, you need to have enabled Developer Mode on the device as well as set up the Device Portal. Enabling Developer Mode lets you sideload apps, and also run apps from Visual Studio, which is important as that's what GameMaker Studio 2 will use to build your final UWP package.
To enable Developer Mode on the Xbox One DevKit, you must first power on the machine and go to the Settings and then go to the System tab. Within the System tab look for the button labelled Console Info & Updates, and click on it. This button is shown in the image below:
When you are in this window, you need to press the following buttons on your XBox One controller in the order specified:
LB > RB > LT > RT
This will enable the Developer Settings option, which you should now select:
Here you need to click the Developer Mode checkbox which will then prompt you to restart your Xbox One. Do this now before continuing.
The Device Portal
With the Developer Mode now active, we need to direct our attention to setting up the Device Portal. This is where we will get the information required for GameMaker Studio 2 to communicate over the local network with your Xbox One.
To start with you have to go to Dev Home and then find the section titled "Remote Management". Click the button under this labelled Manage Xbox Device Portal:
Once the Device Portal is opened, tick the Enable Xbox Device Portal tick box, then tick the Require authentication to access Xbox Device Portal tick box. This will make the Set Username and Password button appear, which you should click and set a unique username (not your Xbox username) and password:
You'll need this username and password combination later so take note of it, and also note down the IP address that is given under where you enabled the Device Portal. We'll need all that data for the next step...
Setting Up Your Windows 10 Desktop Device
The final stage for setting up the UWP target for Xbox One requires you to add the Xbox One 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 (below you can see an example of what information is expected):
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 (like UWP Xbox, for example). After filling that out you need to give the Host Name - this is the IP address of the Xbox One on the network that is to host the game and, must be suffixed by ":11443" to set the port number. After that add the User Name and Password that you set up for the Device Portal in the previous steps. You can leave the PIN blank as it is not required for Xbox One development.
XBox Live Functionality
Your game will have to have a minimum of functionality using the XBox Live interface. Specifically, it will need to have a user signed in and permit the user to be changed and sign in/out. This section explains how to set up a "listener" object to control this process in your games, and all UWP apps that are destined for the Xbox One must have this functionality.
Enabling Xbox Live functionality requires a few you things, not least of which is a listing to be made on the MS Developer Portal for the app, and to make things easier we've outlined each of the steps to be taken in this article here:
Once you have set this up you can continue and move on to testing and compiling your app.
Testing And Compiling Your Project
You should have now set up a Windows 10 UWP XBox device and can go ahead and select it (as using either the VM or YYC compiler options) from the Target Manager. Clicking the "Play" button at the top of the IDE will compile the game and run it on the device. Note that you may get a Firewall warning the first time you run the target as GameMaker Studio 2 uses a micro web server (see here for more information) to serve the game to the browser and this will require access to your network.
Once you have set up the Windows 10 UWP for Xbox One and Desktop, you can then go on to setup UWP for Mobile - if you have access to that platform. See the following guides for more information:
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: