XAML DirectX 3D shooting game sample

This sample demonstrates the basic end-to-end implementation of a simple first person 3-D game using DirectX (Direct3D 11.1, Direct2D, XInput, and XAudio2) and XAML in a C++ app. XAML is used for the heads-up display and game state messages.

C++ (1.0 MB)
4.2 Star
47,283 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • 3D Stereo Question
    1 Posts | Last post April 07, 2013
    • I am working on university thesis about 3D stereo applied to the cure of the disease called Amblyopia. Usually in the hospitals it is applied a bandage on the healthy eye and so that the lazy eye is strained. We use the 3D stereo with the glasses. In particular as soon as the game starts, the user sees all of targets of the scene and with the passing of the time the healthy eye doesn't see the most of the targets and so that the lazy eye is strained. That is possible with OpenGL (in particular I saw it with JOGL) using different buffers. Is there a possibility to do the same things with Directx 11.1 and C++/cx? Thanks.
  • Blank c# screen
    1 Posts | Last post March 21, 2013
    • I tried this code in c#, separating C++ renderer to a c++ windows runtime component, I end up with a blank screen. Any solution to this ?
  • How to set the applicaiton to MTA mode
    2 Posts | Last post February 08, 2013
    • How do I set the application to run in MTA? the main method is automatically generated by App.xaml in STA. Yet for DirectX, I believe I need to run the application in MTA mode. 
    • I have to run in MTA in XNA but not DirectX, if I remember correctly DirectX will pick the best mode to run in for your hardware. Although XNA can develop Windows Games, it is focused on Windows Phone and XBox360 where the hardware requirements are more nailed down and respected.
  • Error in application when running on VS2012 RC
    1 Posts | Last post August 15, 2012
    • Hi, 
      Just comment out the line:
          DisplayProperties::DisplayContentsInvalidated += ref new DisplayPropertiesEventHandlethis,
  • The samples should have been written in c++
    2 Posts | Last post August 15, 2012
    • These samples is all written c++/cx. Having the samples in c++ whould have been great and not your own new c++ language extensions with ref class and all kinds of stuff that is non-standard!!
    • You did notice that the C++ was tied to the XAML?  This means that C# programmers are able to make the transition to C++ easier.
      You have to make those changes to be able to implement the XAML and other changes needed for Win8.  Think Objective C
  • Error building project
    2 Posts | Last post July 25, 2012
    • I downloaded the sample and at first build try I get this: 
      Error	101	error MSB4186: Invalid static method invocation syntax: "[MSBuild]::MakeRelative($(TargetDir), C:\Users\alex\Downloads\Windows 8 Release Preview Metro style app samples - C#, VB.NET, C++, JavaScript\XAML DirectX  3D shooting game sample\C++\Debug\Simple3DGameXaml\PixelShader.cso)". Method '[MSBuild]::MakeRelative' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). 	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets	464	10	Simple3DGameXaml
      There is this unrecognized element in FXC targets FxcOutputs.
      Am I missing some references?
    • Ok so my bad, I was opening the project directly from /Downloads... I moved the project to a more common location /Projects and works correctly...oops
  • Which Game Engine was used for this game ?
    1 Posts | Last post July 14, 2012
    • I have downloaded this 3D game sample because I aim to make a 3D game for Windows 8 too and I am looking for a 3D Game Engine which already works with Visual Studio 2012, and I want to know which one did you use for this game.
  • works great!
    1 Posts | Last post May 20, 2012
    • You asked for feedback.  The code works fine with an AMD HD3D video card and displays in 3D on the Sony HMZ-T1 stereoscopic headset.  No problems at all.
  • input issue
    1 Posts | Last post April 25, 2012
    • I downloaded this app and am running it on Win8 Consumer Preview on an HP Pavilion.  The input from keyboard & mouse works only when the screen with directions is up.  Then I can click to continue.  Once that goes away, clicking on the mouse anywhere in the game doesn't do anything.  I enabled MOVELOOKCONTROLLER_TRACE, and there is no input from the mouse getting to any of those methods.  Any reason why??