A 3D DirectX game for the Universal Windows Platform.
Перейти к файлу
microsoft-github-policy-service[bot] 4ef53a634c
Auto merge mandatory file pr
This pr is auto merged as it contains a mandatory file and is opened for more than 10 days.
2023-06-13 17:54:03 +00:00
C++ retargeting 2020-05-12 08:05:33 -07:00
.gitattributes Initial commit 2015-09-02 12:03:36 -07:00
.gitignore retargeting 2020-03-05 11:54:27 -08:00
CONTRIBUTING.md updated boilerplate 2017-07-28 08:19:07 -07:00
LICENSE Initial commit 2015-09-02 11:58:21 -07:00
MarbleMaze.png fixed link; added screenshot 2016-12-02 09:14:35 -08:00
README.md Update README.md 2020-06-04 19:48:18 -07:00
SECURITY.md Microsoft mandatory file 2023-06-02 21:28:51 +00:00

README.md

page_type languages products statusNotificationTargets
sample
cpp
windows
windows-uwp
codefirst@microsoft.com

DirectX marble maze game sample

This is a mini-app that shows how to build a basic 3D game using DirectX on the Universal Windows Platform (UWP). It's a simple labyrinth game where the player is challenged to roll a marble through a maze of pitfalls using tilt, mouse, or gamepad controls.

Note - This sample is targeted and tested for Windows 10, version 2004 (10.0; Build 19041, also known as the Windows 10 May 2020 Update), and Visual Studio 2019. If you prefer, you can use project properties to retarget the project(s) to Windows 10, version 1903 (10.0; Build 18362, also known as the Windows 10 May 2019 Update).

MarbleMaze app in action

This sample is written in C++ and requires some experience with graphics programming and DirectX. Complete content that examines this code can be found at Developing Marble Maze, a UWP game in C++ and DirectX.

Features

  • Incorporating the Windows Runtime into your DirectX game
  • Using DirectX to render 3D graphics for display in a game
  • Implementing simple vertex and pixel shaders with HLSL
  • Developing simple physics and collision behaviors in a DirectX game
  • Handling input from accelerometer, touch, mouse, and game controller with the Windows Runtime
  • Playing and mixing sound effects and background music with XAudio2

Universal Windows Platform development

Prerequisites

  • Windows 10. Minimum: Windows 10, version 1809 (10.0; Build 17763, also known as the Windows 10 October 2018 Update).
  • Windows 10 SDK. Minimum: Windows SDK version 10.0.17763.0 (Windows 10, version 1809).
  • Visual Studio 2019 (or Visual Studio 2017). You can use the free Visual Studio Community Edition to build and run Windows Universal Platform (UWP) apps.

To get the latest updates to Windows and the development tools, and to help shape their development, join the Windows Insider Program.

Build the sample

  1. Unzip the archive.
  2. Start Microsoft Visual Studio 2017 and select File > Open > Project/Solution...
  3. Starting in the folder where you unzipped the sample, go to the C++ subfolder. Double-click MarbleMaze_VS2017.sln.
  4. Press Ctrl+Shift+B, or select Build > Build Solution.

Run the sample

The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.

Deploying the sample

Select Build > Deploy Solution.

Deploying and running the sample

To run the sample with debugging, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or select Debug > Start Without Debugging.