Prototype By: Priyesh Dixit (ScreenObject) and Hunter Hale (HUD)
Engineering By: Amanda Chaffin
Code Review By: Jason Hardman
DLL and Docs By: Amanda Chaffin and Jason Hardman
Summary:
The HUD DLL is an extensible heads up display for XNA platform games that can be used for any type of single player game. Self contained, users merely add the DLL, a couple of references, some method calls and the HUD appears on the screen, ready to go. Of course, you will still need to change the graphics, the text, and build in math for things like the health bar but this system is easily integrated into any XNA game of any type.
Download:
The zip files for the HUD
The Demo project: Requires XNA, Visual Studios, and DirectX SDK to run
Installation:
1. Open your existing XNA project (can be a 2.0 or a 3.0 project as the HUD works with both) or create a new project.
2. Download and extract the files into a temp directory on the desktop.
3. Drag the file DWHeadsUpDisplay.dll into root folder of your game (it’s the one with the .sln file).
4. Right-click References (in Project Explorer) and click Add, then click on the Browse Tag.
5. Locate the DWHeadsUpDisplay.dll and select the file.
6. Remember to include using DarkWynter.Engine.UserInterface; to any class that needs to use the HUD (game1.cs, human, engine, etc). Refer to Figure 3.
7. Go back to your temp folder, grab the ArtAssets file and copy that to your project’s Content directory on your local machine.
8. Add the folder to your project (you can drag and drop the folder into the directory).
9. Find the Arial.spritefont file and do steps 7 and 8 with it.
10. Find the HUD.xml file in the temp folder, copy it to your project folder, and drag it into your project. Note: The XML file needs to go into the root of your main class as shown in the figure and NOT in the Content folder (it will not work there). Please refer to Figure 1 to make sure that your solution explorer matches the instruction set.
11. Set the property of the XML file to “copy if newer.” Refer to Figure 2.
12. Right click on your main solution file and add a reference to System.XML in your game (refer to figure 4 for how to do this).

- Figure 1: Solution Explorer

Figure 3: Using Statement

Figure 2: Setting the XML Properties

Figure 4: Adding an XML ReferenceFigure 5: Solution Explorer with XML Reference
{ 1 } Trackback
[...] HUD Tutorial [...]
Post a Comment