microsoft / Xbox-GDK-Samples

Game development samples published by the Xbox Advanced Technology Group using the Microsoft GDK.
http://aka.ms/gamedevdocs
MIT License
218 stars 32 forks source link

How to run the samples? #39

Closed ClementDreptin closed 3 months ago

ClementDreptin commented 4 months ago

Hi,

I've been interested in developing for the Xbox consoles recently and after reading A LOT of documentation, I still struggle to understand the tools I'm supposed to use.

I started with UWP on Xbox One by following this guide, which made me register a partner account on the Partner Center. I managed to run the Visual Studio template projects that come with the UWP workload on my console and was pretty happy with it.

After reading more, I heard about the GDK, which seemed like yet another way to create games for the Xbox consoles. The introduction page of the documentation explains the story behind the creation of the GDK and suggests it is the new way of creating Xbox games because others (The ERA App Model and UWP) were seen as too restrictive by developers.

I installed the GDK on my computer and it only installed the Desktop Visual Studio templates, not the Xbox ones. I tried to run the samples from this repository but it says Platform 'Gaming.Xbox.Scarlett.x64' referenced in the project file 'DirectXTK12' cannot be found.. And when I open the project properties, it says the platform toolset v143 isn't installed, but my Visual Studio Installer says it is.

To my understanding, the GDK is the "public" development kit for making games for Windows and making games for Xbox requires the GDK with Xbox Extensions (GDKX), which is only available to licensed partners. But I did register a partner account (which add a registration fee), is that something completely different?

Is GDK the recommended way to develop for the Xbox consoles and UWP deprecated? Or is UWP the "free" way and GDK the "premium" way?

I am extremely confused about all of this, so any clarification would be very appreciated!

I'm aware the issue section of this repo might not be the ideal place to ask these types of questions, but I don't where else to ask.

EDIT: The description of the Xbox Dev Mode in the Microsoft Store says "Activate your Xbox One for development and get started writing UWP games and apps targeting the console." so I'm guessing the Dev Center account only allows you to run UWP games and GDK games require something else.

goofyseeker311 commented 3 months ago

You can get the empty uwp project to run on XBOX and on local windows by the steps in the guide. I can get DXRTriangle sample project to run locally on windows (with gaming.desktop.x64), but getting it running on XBOX (with gaming.xbox.scarlett.x64 assumed) does not match with the blank uwp project. To my understanding you can make games for all/both platforms with the free kit, but the X-kit contains some extra stuff for the partners.

I get error: EXEC : error : CompileShaders gxdk requires the Microsoft Gaming SDK when trying to compile/run basic DXR example on xbox. even if the GDK (Microsoft Gaming SDK) is installed and is in the extension manager list, but for PC only.

I assumed getting the developer account with xbox unlock would be enough. If its multi-tiered, then getting the xbox unlock developer account does not do anything by its own. but it lets deploy and develop UWP apps. but seems like the GDK for xbox is locked.

walbourn commented 3 months ago

The open development model for Xbox One and Xbox Series X|S today is running a Universal Windows Platform (UWP) application on Xbox. This requires using "Dev Mode" on your retail Xbox, and allows you to target and run x64 UWPs. This development model supports both a 'shared app' model and as an 'exclusive app' model which provides more CPU/GPU and features. Details on this are covered in this blog post and this update. They can use DirectX 11 or DirectX 12, but only have access to a subset of features of the console hardware. The functionality is sufficient for many games--a version of Minecraft ran as a UWP on Xbox for example. They can be 'self-published' to the Microsoft Store.

UWP samples are available from Xbox-ATG_Samples and are not hosted in this repository.

For developers in the ID@Xbox or "managed" developer ecosystem (i.e. have a signed Xbox Publisher Licensing Agreement), they make use of the Microsoft GDK with Xbox Extensions to target Xbox One and Xbox Series X|S. This model provides full access to all hardware features, but is an NDA-only developer ecosystem at this time. This repository hosts samples with Gaming.Xbox.XboxOnex.64 and Gaming.Xbox.Scarlett.x64 platforms which use the GDKX. This development model does not work on retail Xbox console hardware, and requires an Xbox DevKit--these titles can only run on Xbox retail hardware after certification and counter-signing by Microsoft.

Some samples in the repository ALSO support Gaming.Desktop.x64 or x64 which is used to target Windows PCs using the Microsoft GDK. This public GDK is available on GitHub and is used to support PC Game Pass titles in the Microsoft Store. Note that the GDKX includes both the content of the public GDK and NDA additional content/tools.

If you are new to DirectX 12 and code in C++, then you may want to take a look at DirectX Tool Kit for DX12. This library works on desktop, UWP, Xbox on UWP, and GDKX.

goofyseeker311 commented 3 months ago

As an opinion, even if you do not provide access to release a game (might require ID@XBOX), you should provide full free access to the GDKX for free for those that have the xbox developer access. Yes a full local developer access. You will have to allow side-loading full feature software by EU laws in the future on XBOX, all features not only subset features.

It's not a real xbox developer account if you cannot access all xbox features, both uwp and gdkx. it's not a real xbox developer account if you cannot publish for xbox with only the xbox developer account unlock.

ClementDreptin commented 3 months ago

@walbourn Thanks you very much for taking the time to write such a thorough reply!

I don't plan to ship a game on Xbox anytime soon, I just find it fun to experiment with my console on my spare time.

I now have a better understanding of what my options are depending on what I want to do, and it's exactly what I was looking for!

Thanks!