Giter Club home page Giter Club logo

xbox-gdk-samples's Introduction

Xbox-GDK-Samples

This repo contains game development samples written by the Microsoft Xbox Advanced Technology Group using the Microsoft Game Development Kit (GDK).

Requirements

  • Visual Studio 2019 (16.9 update or later) or Visual Studio 2022
  • Microsoft Game Development Kit (GDK)
  • -or- Microsoft Game Development Kit with Xbox Extensions (GDKX)

Privacy Statement

When compiling and running a sample, the file name of the sample executable will be sent to Microsoft to help track sample usage. To opt-out of this data collection, you can remove the block of code in Main.cpp labeled Sample Usage Telemetry.

For more information about Microsoft's privacy policies in general, see the Microsoft Privacy Statement.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Other Samples

For more ATG samples, see DirectML Samples, PlayFab-Samples, Xbox-ATG-Samples, and Xbox-LIVE-Samples.

Samples list by category

Samples List Wiki

xbox-gdk-samples's People

Contributors

anhillier-xbox avatar jonmartinms avatar matthyman avatar microsoft-github-policy-service[bot] avatar scm-xbox avatar walbourn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xbox-gdk-samples's Issues

why GDK samples(console) exclude so many libs?

$(IgnoreSpecificDefaultLibraries);advapi32.lib;comctl32.lib;comsupp.lib;dbghelp.lib;gdi32.lib;gdiplus.lib;guardcfw.lib;kernel32.lib;mmc.lib;msimg32.lib;msvcole.lib;msvcoled.lib;mswsock.lib;ntstrsafe.lib;ole2.lib;ole2autd.lib;ole2auto.lib;ole2d.lib;ole2ui.lib;ole2uid.lib;ole32.lib;oleacc.lib;oleaut32.lib;oledlg.lib;oledlgd.lib;oldnames.lib;runtimeobject.lib;shell32.lib;shlwapi.lib;strsafe.lib;urlmon.lib;user32.lib;userenv.lib;wlmole.lib;wlmoled.lib;onecore.lib;

they can not be used in Xbox console game development?

[Sample - Gamepad] m_reading->GetGamepadState always returns empty state

I was running the sample project: Samples\System\Gamepad. It didn't work as expected.
I'm sure I've connected a Xbox Series X/S console to my Win11 PC, and "GameInput Service" is running.

But no matter which key I press on the gamepad, m_reading->GetGamepadState always returns empty state and state.buttons equals to 0 all the time. A bit weird...
Any clue?

ACTION REQUIRED: Microsoft needs this private repository to complete compliance info

There are open compliance tasks that need to be reviewed for your Xbox-GDK-Samples repo.

Action required: 4 compliance tasks

To bring this repository to the standard required for 2021, we require administrators of this and all Microsoft GitHub repositories to complete a small set of tasks within the next 60 days. This is critical work to ensure the compliance and security of your microsoft GitHub organization.

Please take a few minutes to complete the tasks at: https://repos.opensource.microsoft.com/orgs/microsoft/repos/Xbox-GDK-Samples/compliance

  • The GitHub AE (GitHub inside Microsoft) migration survey has not been completed for this private repository
  • No Service Tree mapping has been set for this repo. If this team does not use Service Tree, they can also opt-out of providing Service Tree data in the Compliance tab.
  • No repository maintainers are set. The Open Source Maintainers are the decision-makers and actionable owners of the repository, irrespective of administrator permission grants on GitHub.
  • Classification of the repository as production/non-production is missing in the Compliance tab.

You can close this work item once you have completed the compliance tasks, or it will automatically close within a day of taking action.

If you no longer need this repository, it might be quickest to delete the repo, too.

GitHub inside Microsoft program information

More information about GitHub inside Microsoft and the new GitHub AE product can be found at https://aka.ms/gim or by contacting [email protected]

FYI: current admins at Microsoft include @scm-xbox, @walbourn, @FLY1NGSQU1RR3L

A sample project about using IGameInputDevice::CreateForceFeedbackEffect

Is there any sample project for demonstrating the using the following APIs?
IGameInputDevice::CreateForceFeedbackEffect
IGameInputForceFeedbackEffect::SetState
IGameInputForceFeedbackEffect::SetGain
IGameInputForceFeedbackEffect::SetParams

If yes, let me know. If not, any plan to make one?
Thanks.

A 3rd-party gamepad to work with GameInput APIs?

As a gamepad device maker, I'm testing with GamepadVibration. How can I make our gamepad work with GameInput calls, specifically SetRumbleState() to make 4 motors vibrate? Do I need to go through some certification process with Microsoft? Thanks.

Documentation for CMakeGDKExample is incorrect

The sample appears to be written for a sample that uses Scarlett and XboxOne hardware too.
The presets for CMake have also changed.
The correct instructions to build this sample are as follows:

How to configure for VS2022:
Set generator to VS2022:
In CmakePresets.Json:
"generator": "Visual Studio 17 2022",
"XdkEditionTarget": "220602", (or whatever version you have installed)

How to build:
cd (Xbox-GDK-Samples)\Samples\Tools\CMakeGDKExample
cmake --preset=x64-Desktop
cmake --build out\build\x64-Desktop

The Visual Studio solution for the sample is now in (Xbox-GDK-Samples)\Samples\Tools\CMakeGDKExample\out\build\x64-Desktop !

How to run the samples?

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.

Broken libs list when using XdkEditionTarget > 220600

list(APPEND Console_Libs "gameinput.lib")

  • CMake 3.24.2
  • VS2019
  • GDK 221001

This yields an error:
LINK : fatal error LNK1181: cannot open input file 'xgameruntime.lib gameinput.lib'

Do notice that it wrapped those libs in quotes in the generated linker command:

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe 
/ERRORREPORT:QUEUE 
/OUT:"C:\ZEH\GDK\2022.10--GDKX--SamplesOnly\GDKSamples\Tools\CMakeExample\Desktop\out\bin\Gaming.Desktop.x64\Debug\CMakeExampleDesktop.exe" 
/INCREMENTAL 
/ILK:"CMakeExampleDesktop.dir\Debug\CMakeExampleDesktop.ilk" 
/NOLOGO 
/LIBPATH:"C:/ZEH/GDK/221001/Microsoft GDK/221001/GRDK/gameKit/Lib/amd64" 
/LIBPATH:"C:/ZEH/GDK/221001/Microsoft GDK/221001/GRDK/gameKit/Lib/amd64/Debug" 
/LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/ucrt/x64"
/LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/ucrt/x64/Debug"
/LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64"
/LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64/Debug" 
/LIBPATH:"C:/ZEH/GDK/221001/Microsoft GDK/221001/GRDK/ExtensionLibraries/Xbox.Services.API.C/DesignTime/CommonConfiguration/Neutral/Lib/Release/v142" 
/LIBPATH:"C:/ZEH/GDK/221001/Microsoft GDK/221001/GRDK/ExtensionLibraries/Xbox.Services.API.C/DesignTime/CommonConfiguration/Neutral/Lib/Release/v142/Debug"
dxguid.lib d3d12.lib dxgi.lib "xgameruntime.lib gameinput.lib" libHttpClient.142.GDK.C.lib Microsoft.Xbox.Services.142.GDK.C.lib appnotify.lib winhttp.lib crypt32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib 
/MANIFEST 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" 
/manifest:embed /DEBUG /PDB:"C:/ZEH/GDK/2022.10--GDKX--SamplesOnly/GDKSamples/Tools/CMakeExample/Desktop/out/bin/Gaming.Desktop.x64/Debug/CMakeExampleDesktop.pdb"
/SUBSYSTEM:WINDOWS 
/LTCG 
/LTCGOUT:"CMakeExampleDesktop.dir\Debug\CMakeExampleDesktop.iobj" 
/TLBID:1 
/DYNAMICBASE 
/NXCOMPAT 
/IMPLIB:"C:/ZEH/GDK/2022.10--GDKX--SamplesOnly/GDKSamples/Tools/CMakeExample/Desktop/out/bin/Gaming.Desktop.x64/Debug/CMakeExampleDesktop.lib" 
/MACHINE:X64  
/machine:x64 
/CETCOMPAT 
/IGNORE:4075 CMakeExampleDesktop.dir\Debug\cmake_pch.obj
CMakeExampleDesktop.dir\Debug\Game.obj
CMakeExampleDesktop.dir\Debug\DeviceResources.obj
CMakeExampleDesktop.dir\Debug\Main.obj

Replacing it with this, fixed the issue for me:
list(APPEND Console_Libs gameinput.lib)

m_gameInput->GetCurrentReading always returns 0x838a0003

Sample project: Gamepad or GamepadVibration
m_gameInput->GetCurrentReading always returns 0x838a0003. WHAT DOES IT MEAN?

There's no definition for this code in XGameErr.h.

I've connected a Xbox Controller Series X to my Win 11 PC for sure.

no_controller_connected

InGameStore.cpp UI samples

I'm in the middle of porting a game from the XDK to the GDK, and while working on the store functionality I noticed that the UIManager is included within the InGameStore samples. I also see XR-039 states "All purchases must use the Xbox console common purchase UI.".

Does the GDK handle the UI functionality in the use of the Xbox Series X store, or is this something that will actually need to be included within our own InGameStore files? Specifically, in UpdateProductList() I see some calls that use the UIManager, but in the MakePurchase() function there is the call to XStoreShowPurchaseUIResult, and ShowPopup. Which of these two are the aforementioned "Xbox console common purchase UI"?

Can I build GamepadVibration with C/C++ runtime compiler option /MT?

As we can see, the original configuration is /MD.
After I changed DirectXTK12 and GamepadVibration to use /MT, I got the following linker errors:

2>libHttpClient.142.GDK.C.lib(global_publics.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MT_StaticRelease”(GamepadVibration.obj 中)
2>libHttpClient.142.GDK.C.lib(httpcall_publics.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MT_StaticRelease”(GamepadVibration.obj 中)

Does GDK have MT_StaticRelease version of libs?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.