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.
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.
- 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
- Developing Marble Maze, a UWP game in C++ and DirectX
- Create a simple UWP game with DirectX
- Game programming
- DirectX programming
- Direct3D Graphics Learning Guide
- XAudio2 APIs
Universal Windows Platform development
This sample requires Visual Studio 2017 and the latest version of the Windows 10 SDK. 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
- Unzip the archive.
- Start Microsoft Visual Studio 2017 and select File > Open > Project/Solution...
- Starting in the folder where you unzipped the sample, go to the C++ subfolder. Double-click MarbleMaze_VS2017.sln.
- 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.