A few years ago, I read in the news that Microsoft stopped allowing games in UWP format in Xbox’s Microsoft Store. UWP is a very convenient and simple format to port Windows applications and videogames to Xbox: The same APIs that work on Windows will work right away on Xbox!
I haven’t had an Xbox until now, so I couldn’t tell if this was true, but the truth is that Microsoft still accepts games for Xbox Store and Windows Store in UWP format, they only stopped accepting 32-bit executables.
So… Can we export a Godot game to Xbox directly by simply pressing Export to UWP?
Well… Yes**! And it will work like a charm***!
** mostly 😅.
*** at least all the 2D video games I have ported so far work flawlessly.
This doesn’t mean that the game is ready to be published on consoles, but it’s a big step forward. We will still need to solve out many TRCs related to Xbox Live, achievements, Xbox application life-cycle, gamepad management, users, etc…
But if you just want to play your Godot 3.x games on your Xbox, just follow these steps!
- Download Godot 3.x and make a game. (Take your time, I’ll wait here)
- In Godot, go to the Project tab and click on Export.
- Press “Add…” and select UWP.
- If you don’t have the export templates installed, a red message will appear below with a link: “Manage export templates“. If so, click on it and press “Download and install“.
- After that, get again to the Export window and fill those fields.
Target architecture should be x64 and the publisher name must be the same as the one in the certificate you’ll create later. Those fields have many restrictions, so, for just testing, I would recommend just filling “test” in them and “CN=TEST” in the Publisher field.
For Product/Publisher GUIDs, just use “3159a24f-700c-4c29-8c5b-27c962dba839“. It’s a random generated one. - Click Export Project, uncheck “Export With Debug” and save the appx file wherever you prefer!
“Congrats!!! You just exported your game for UWP, which is compatible with Windows 10/11 and Xbox!”
That’s what I would say if the exporter wasn’t currently broken… 😅
(PS: A fix is on the way! 😀 https://github.com/godotengine/godot/pull/79544 )
In order to fix the exported APPX package, it must be repackaged and signed.
How to do that? Well. First, you will need to install:
· Visual Studio Community 2019
· Windows 10 SDK
· A lot of stuff
Nevermind. I just made a PowerShell script to make the process a lot easier! 😎
Download it from here 👉 https://github.com/panreyes/godot-appx-repackager
It will take care of everything for you:
· Download the required tools (MS Build Tools, Angle DLLs).
· Create a self-signed certificate.
· Repackage and sign the APPX file.
Enjoy! 🙌🥳
Send a video if you export something, feel free to hit me in Twitter “X” (@rawrlabgames)!
PS: I totally forgot that you’ll also need to enable the Developer Mode in your Xbox 😅
Sorry, I don’t have a PowerShell script for that, but here are some instructions:
https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/devkit-activation