<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>WulfKat</title>
	<atom:link href="http://wulfkat.darkwynter.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://wulfkat.darkwynter.com/blog</link>
	<description>Game Design and Development Weblog</description>
	<pubDate>Thu, 25 Jun 2009 19:29:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>EventSystem[2].Tutorial(XMLExplanation)</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=169</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=169#comments</comments>
		<pubDate>Wed, 17 Jun 2009 21:01:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Event System]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=169</guid>
		<description><![CDATA[Prototype By: Andrew Hicks and Katelyn Doran (Wicked Fly Games)
Engineering By: Amanda Chaffin, Andrew Hicks, and Jason Hardman
Code Review By: Jason Hardman and Amanda Chaffin
DLL and Docs By: Amanda Chaffin and Jason Hardman
 Summary:
The Event System project is an example (and dev’ed code) of data driven events that run at a pre determined time after a [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Prototype By</span></em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">: Andrew Hicks and Katelyn Doran</span><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"> (Wicked Fly Games)</span></em><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"><br />
</span></em><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Engineering By:</span></em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"> Amanda Chaffin, Andrew Hicks, and Jason Hardman<br />
</span><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Code Review By</span></em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">: Jason Hardman and Amanda Chaffin<br />
</span><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">DLL and Docs By</span></em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">:</span><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"> </span></em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Amanda Chaffin and Jason Hardman</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-line-height-alt: 14.25pt; mso-outline-level: 2;"><strong><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 15pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"> Summary:</span></strong></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">The Event System project is an example (and dev’ed code) of data driven events that run at a pre determined time after a pre determined condition has been met. Okay, so what the hell does that mean, anyway? It means that you can quickly and easily add RPG elements to your game (dialogue, HUD changes, and programmatic cutscenes) with minimal code changes needed. The way the Event System works is through events that run off triggers. You set the trigger, meet the trigger conditions, and the event that matches those conditions will fire.</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 3;"><strong><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 11.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Download:</span></strong></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">The </span><a href="http://wulfkat.darkwynter.com/Code/EventSystemFiles.zip"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: #2f6eb9; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">zip files </span></a><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">for the EventSystem</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">The </span><a href="http://wulfkat.darkwynter.com/Code/EventSystemDemo.zip"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: #2f6eb9; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Demo project</span></a><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">: Requires XNA, Visual Studios, and DirectX SDK to run</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><strong><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Installation</span></em></strong><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">: All instructions are written with the assumption that you have downloaded the</span></em><em style="mso-bidi-font-style: normal;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"> </span></em><a href="http://wulfkat.darkwynter.com/Code/EventSystemFiles.zip"><em style="mso-bidi-font-style: normal;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: #2f6eb9; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">zip files</span></em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: #2f6eb9; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"> </span></a><span style="mso-spacerun: yes;"><span style="font-family: Calibri; font-size: small;"> </span></span><em><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">for the EventSystem.</span></em></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">So now that you have a basis for understanding what the code is actually doing (I hope!), the next part we need to discuss is the <em style="mso-bidi-font-style: normal;">data driven</em> aspects of the Event System.<span style="mso-spacerun: yes;">  </span>In other words, I am going to walk you through the xml file in the game and explain what each part does so that you can modify/add/delete/ whatever you want to customize the Events in your game.</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> <span style="mso-spacerun: yes;"> </span>Please keep in mind, however, that this was dev’ed to work with the DarkWynter HUD so, if you want to use this code <em style="mso-bidi-font-style: normal;">as is</em> with your own HUD, you will need to add in some functionality, especially for the <span style="mso-spacerun: yes;"> </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">HUDEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> and </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">DialogueEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.<span style="mso-spacerun: yes;">  </span>Otherwise, you will need to change the events to match your HUD.</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">If you open your EventSettings.xml file, you will see there are four entries in the file; a </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">HUDEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, a </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">DialogueEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, an </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">AIEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, and a </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">LevelChangeEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.<span style="mso-spacerun: yes;">  </span>You will also note that there are four common elements in the XML for all - </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">typeID</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">node</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">coins</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, and </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">sanity</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.<span style="mso-spacerun: yes;">  </span>The </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">typeID</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;"> </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">is the name of the Event class that you want to use so they need to match the name of the class, even if you make a new class.<span style="mso-spacerun: yes;">  </span>The rest of the common elements are the <em style="mso-bidi-font-style: normal;">trigger for the event in question</em>.<span style="mso-spacerun: yes;">  </span>This is what the CurrentGameConditions checks to see if it matches the event – the rest of the data is what the event does.</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">So, we are going to go over the </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">DialogueEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> first.<span style="mso-spacerun: yes;">  </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">DialogueEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> is a very specialized piece of code that works directly with our DarkWynter engine HUD to allow us to draw actual game dialogue on the HUD, run it for a preset amount of time, and then remove it from the HUD when finished.</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> </p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">DialogueEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> has four parts that are unique to the Event - </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">speaker</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">message</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">texturePath</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, and </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">time</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">speaker</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> (</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">string</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">)– This is the person speaking the message.<span style="mso-spacerun: yes;">  </span>Since our game’s Dialogue was all text based and we wanted to at least have the ability to show other people talking, we added in a name variable for the message so that our players would see who was speaking to them.</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">message </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">(</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">string</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) - <span style="mso-spacerun: yes;"> </span>This is the actual message that will be printed on the screen.<span style="mso-spacerun: yes;">  </span>Please note, because this is in XML, if you want to do special characters or insert new line characters, you will have to use the XML syntax.<span style="mso-spacerun: yes;">  </span></span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">Some of the more common ones include…</span></p>
<table class="MsoNormalTable" style="width: 50%; border-collapse: collapse; mso-border-alt: solid #C3C3C3 .75pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in;" border="1" cellspacing="0" cellpadding="0" width="50%">
<tbody>
<tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="background-color: transparent; mso-border-alt: solid #C3C3C3 .75pt; border: #c3c3c3 1pt solid; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&amp;lt;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #c3c3c3 1pt solid; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&lt; </span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #c3c3c3 1pt solid; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">less than</span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #c3c3c3 1pt solid; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&amp;gt;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&gt; </span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">greater than</span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #c3c3c3 1pt solid; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&amp;amp;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&amp;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">ampersand </span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 3;">
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #c3c3c3 1pt solid; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&amp;apos;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&#8216;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">apostrophe</span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 4;">
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #c3c3c3 1pt solid; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&amp;quot;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">&#8220;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">quotation mark</span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 5; mso-yfti-lastrow: yes;">
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #c3c3c3 1pt solid; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; font-size: 8pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">&amp;#xA;</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">\r\n</span></p>
</td>
<td style="border-bottom: #c3c3c3 1pt solid; border-left: #f0f0f0; background-color: transparent; border-top: #f0f0f0; border-right: #c3c3c3 1pt solid; mso-border-alt: solid #C3C3C3 .75pt; mso-border-left-alt: solid #C3C3C3 .75pt; mso-border-top-alt: solid #C3C3C3 .75pt; padding: 2.25pt;">
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black; font-size: 8.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">New line</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> </p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">For a better explanation, refer to <a href="http://www.w3schools.com/Xml/xml_syntax.asp">http://www.w3schools.com/Xml/xml_syntax.asp</a>.<span style="mso-spacerun: yes;">  </span></span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">texturePath</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> (</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">string</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">)- <span style="mso-spacerun: yes;"> </span>The texture path is the location of the image.<span style="mso-spacerun: yes;">  </span>Please note that you do not have to specify the entire path as the game takes care of that for you.<span style="mso-spacerun: yes;">  </span>All that you need to provide is the location of the texture in the Content directory, in this case, the texture is in Content/textures.</span></p>
<p class="MsoNormal" style="line-height: 14.25pt; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">time</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> (</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">)- <span style="mso-spacerun: yes;"> </span>This is the time that you want the dialogue to be displayed on the screen.<span style="mso-spacerun: yes;">  </span>Note that it takes an </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> and that the time is in milliseconds (1000 milliseconds = 1 second).</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">Next, we are going to cover the </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">HUDEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.<span style="mso-spacerun: yes;">  </span>Also a specialized piece of code, the </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">HUDEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> allows us to run other images on the HUD that are not timer based.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"> </p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">HUDEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> has five distinct parts that are unique to the Event - </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">name</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">texture</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">texX</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">texY</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, and </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">draw</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.<span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;"> </span></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">name </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">(</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">string</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">)</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> <span style="mso-spacerun: yes;"> </span>–</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> The name of the </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">HUDEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> is what allows us to use the same Event to change different pieces of the HUD.<span style="mso-spacerun: yes;">  </span>If you look in the FireEvent() method of the <span style="mso-spacerun: yes;"> </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">HUDEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, you will see there is an if statement that checks which </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">name </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">we are using and fires the code depending on the name.<span style="mso-spacerun: yes;">  </span>Seeing as how we show a mini map and also a stack as separate images on the HUD, this allows us to reuse code with just a simple switch to know which one we are changing.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">texture</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">(</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">string</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">–</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes;"> </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">The texture path is the location of the image.<span style="mso-spacerun: yes;">  </span>Please note that you do not have to specify the entire path as the game takes care of that for you.<span style="mso-spacerun: yes;">  </span>All that you need to provide is the location of the texture in the Content directory, in this case, the texture is in Content/textures.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">texX</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">(</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">– The X coordinate (position) of the image to be drawn on the HUD.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">texY</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">(</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">– The Y coordinate (position) of the image to be drawn on the HUD.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">draw</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">(</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">bool</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">– This is what you use to control whether or not you want to display the image on the HUD (so you can flip images on and off at will). </span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">Next, we are going to cover the </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">AIEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.<span style="mso-spacerun: yes;">  </span>In the case of our game, the </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">AIEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> was designed to work with some of our customized AI code in which we have a method called goToDestination(</span><span style="font-family: &quot;Courier New&quot;; color: #2b91af; font-size: 10pt; mso-no-proof: yes;">Vector3 </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">position) .<span style="mso-spacerun: yes;">  </span>As you might guess from the name, the method tells the AI to go (in a straight line) to the position that we pass in.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"> </p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">AIEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> has five distinct parts that are unique to the Event - </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">ID</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">drawable</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">destX</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">destY</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, and </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">destZ</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.<span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;"> </span></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">ID</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> (</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">)</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> <span style="mso-spacerun: yes;"> </span>–</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> The numeric ID of the AI that controls this event.<span style="mso-spacerun: yes;">  </span>Okay, so that is a little confusing, even to me.<span style="mso-spacerun: yes;">  </span>So, let’s pretend like you have 5 AI in your game and they are numbered 0-4.<span style="mso-spacerun: yes;">  </span>This allows you to associate the event with, in this case, AI[0] and the event will only work on AI[0].</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">drawable </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">(</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">bool</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">– Another piece of customization – we use this to determine whether or not to draw the AI’s position when in level editing mode.<span style="mso-spacerun: yes;">  </span>However, you can change or ignore this at will as it will not affect your code one way or another currently.</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">destX</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> (</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">– The X coordinate (position) for the AI.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">destY</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> (</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">– The Y coordinate (position) for the AI.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">destZ</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> (</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">– The Y coordinate (position) for the AI.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">Obviously, if you are going to use this particular event <em style="mso-bidi-font-style: normal;">as it is currently designed</em>, you will have to add your own code to your AI classes that control how the AI walks when given a vector destination.<span style="mso-spacerun: yes;">  </span>However, this can also be modified to spawn new AI upon reaching a trigger point in your game (triggered based off collision or time), give the AI a health bonus, or whatever else that you need have the code to do.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"> </p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">Our final event is the </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">LevelChangeEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">, which was designed to send a signal to the engine either swap the game to the next level or to write out the game logs and end the game.<span style="mso-spacerun: yes;">  </span>This can also be used to kill the event list, wipe your graphics from memory, whatever you need it to do.<span style="mso-spacerun: yes;">  </span>Notice, there is only one part to the </span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">LevelChangeEvent</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;"> that is unique and that is the </span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">nextLevel</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes;">nextLevel</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">(</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes;">int</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt;">) </span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; font-size: 10pt; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes;">–Tells the game which level to load next.<span style="mso-spacerun: yes;">  </span>Can also be used (by negating the number, or however you want to do it) to end the game.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=169</wfw:commentRss>
		</item>
		<item>
		<title>EventSystem[1].Tutorial(CodeTheory)</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=148</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=148#comments</comments>
		<pubDate>Wed, 17 Jun 2009 14:59:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Event System]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=148</guid>
		<description><![CDATA[ 

Prototype By: Andrew Hicks and Katelyn Doran (Wicked Fly Games)
Engineering By: Amanda Chaffin, Andrew Hicks, and Jason Hardman
Code Review By: Jason Hardman and Amanda Chaffin
DLL and Docs By: Amanda Chaffin and Jason Hardman
Summary:
The Event System project is an example (and dev’ed code) of data driven events that run at a pre determined time after a pre [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p><em></em></p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">Prototype By:</span></em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"> Andrew Hicks and Katelyn Doran</span><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"> (Wicked Fly Games)</span></em><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"><br />
</span></em><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">Engineering By:</span></em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"> Amanda Chaffin, Andrew Hicks, and Jason Hardman<br />
</span><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">Code Review By</span></em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">: Jason Hardman and Amanda Chaffin<br />
</span><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">DLL and Docs By</span></em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">:</span><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"> </span></em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">Amanda Chaffin and Jason Hardman</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-line-height-alt: 14.25pt; mso-outline-level: 2"><strong><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 15pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">Summary:</span></strong></p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">The Event System project is an example (and dev’ed code) of data driven events that run at a pre determined time after a pre determined condition has been met. Okay, so what the hell does that mean, anyway? It means that you can quickly and easily add RPG elements to your game (dialogue, HUD changes, and programmatic cutscenes) with minimal code changes needed. The way the Event System works is through events that run off triggers. You set the trigger, meet the trigger conditions, and the event that matches those conditions will fire.</span></p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 3"><strong><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 11.5pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">Download:</span></strong></p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">The </span><a href="http://wulfkat.darkwynter.com/Code/EventSystemFiles.zip"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: #2f6eb9; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">zip files </span></a><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">for the EventSystem</span></p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">The </span><a href="http://wulfkat.darkwynter.com/Code/EventSystemDemo.zip"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: #2f6eb9; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">Demo project</span></a><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">: Requires XNA, Visual Studios, and DirectX SDK to run</span></p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><strong><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">Installation</span></em></strong><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">: All instructions are written with the assumption that you have downloaded the</span></em><em style="mso-bidi-font-style: normal"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"> </span></em><a href="http://wulfkat.darkwynter.com/Code/EventSystemFiles.zip"><em style="mso-bidi-font-style: normal"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: #2f6eb9; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">zip files</span></em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: #2f6eb9; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"> </span></a><em><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">for the EventSystem.</span></em></p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">So, now that you have the EventSystem installed into your game and you are not receiving any errors (i.e. you set the xml file to copy always, you included all the images, etc), I bet you are wondering what in the world you are supposed to do now. I mean, it still just shows a blue screen, right? Well, before we can get into how to make it work, we need to go over how it actually works (trust me on this one - the theory is totally important for understanding how to make it work later).<span style="mso-spacerun: yes"> </span>In this part of the explanation, which will be in two parts, we will discuss what the code does that makes all this work.</span></p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p><div id="attachment_152" class="wp-caption alignleft" style="width: 570px"><img class="size-full wp-image-152" title="es9" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/06/es9.png" alt="Figure 1: EventSystem Flow Control" width="560" height="285" /><p class="wp-caption-text">Figure 1: EventSystem Flow Control</p></div></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: 14.25pt; MARGIN: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'">In the EventSystem folder, there are two classes – </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler</span><span style="font-family: Georgia; FONT-SIZE: 10pt;">.cs and </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEvent</span><span style="font-family: Georgia; FONT-SIZE: 10pt;">.cs.<span style="mso-spacerun: yes"> </span>There is also a folder called EventTypes which holds four classes – </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">AIEvent</span><span style="font-family: Georgia; FONT-SIZE: 10pt;">.cs, </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">DialogueEvent</span><span style="font-family: Georgia; FONT-SIZE: 10pt;">.cs, </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">HUDEvent</span><span style="font-family: Georgia; FONT-SIZE: 10pt;">.cs, and </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">LevelChangeEvent</span><span style="font-family: Georgia; FONT-SIZE: 10pt;">.cs.<span style="mso-spacerun: yes"> </span>The first class that we are going to discuss is the </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler</span><span style="font-family: Georgia; FONT-SIZE: 10pt;">.cs.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-family: Georgia; FONT-SIZE: 10pt;">The first thing that you should notice upon opening the </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler</span><span style="font-family: Georgia; FONT-SIZE: 10pt;"> (GEH) is that it is a public static class with a public static list of type </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEvent </span><span style="font-family: Georgia; FONT-SIZE: 10pt;">and a public static </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEvent </span><span style="font-family: Georgia; FONT-SIZE: 10pt;">called CurrentGameConditions.<span style="mso-spacerun: yes"> </span>The </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEvent </span><span style="font-family: Georgia; FONT-SIZE: 10pt;">list, as you might guess, contains all of the </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEvent </span><span style="font-size: small;"><span style="font-family: Georgia;">of the current level (or the entire game, that part is up to you).<span style="mso-spacerun: yes"> </span></span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-family: Georgia; FONT-SIZE: 10pt;">The most important concept, the CurrentGameConditions (CGC), is the <em style="mso-bidi-font-style: normal">global and current condition of the game, </em>in other words, it holds the state of the game triggers as you play it<em style="mso-bidi-font-style: normal">.<span style="mso-spacerun: yes"> </span></em>At its most basic, the CGC is a collection of triggers, in this case we are using two </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes">int</span><span style="font-family: Georgia; FONT-SIZE: 10pt;">s (triggerNode<span style="mso-spacerun: yes"> </span>and triggerCoins) but this is completely expandable to be based on health conditions of the player or the AI, elapsed game time, etc. You will notice in the </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler </span><span style="font-family: Georgia; FONT-SIZE: 10pt;">class, we create the CGC as a new </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEvent </span><span style="font-family: Georgia; FONT-SIZE: 10pt;">without passing in any parameters (there are two constructors in </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEvent </span><span style="font-family: Georgia; FONT-SIZE: 10pt;">– one for the CGC and one for the rest of the events which takes an XML node).<span style="mso-spacerun: yes"> </span>Basically, that constructor sets up the CGC as a game Event with the four preset triggers.</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 30px; mso-layout-grid-align: none;"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;summary&gt;</span></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 30px; mso-layout-grid-align: none;"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><span style="COLOR: gray">///</span><span style="COLOR: green"> CurrentGameConditions Constructor</span></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 30px; mso-layout-grid-align: none;"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><span style="COLOR: gray">///</span><span style="COLOR: green"> </span><span style="COLOR: gray">&lt;/summary&gt;</span></span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 30px; mso-layout-grid-align: none;"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><span style="COLOR: blue">public</span> GameEvent()</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 30px; mso-layout-grid-align: none;"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes">{</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 60px; mso-layout-grid-align: none;"> <span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes">_trigger_ID = -1;</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 60px; mso-layout-grid-align: none;"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes">_lastNodeVisited = 0;</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 60px; mso-layout-grid-align: none;"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes">_triggerCoins = -1;</span></p>
<p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; padding-left: 60px; mso-layout-grid-align: none;"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes">_triggerSanity = -1;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt; padding-left: 30px;"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes">}</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-family: Georgia; FONT-SIZE: 10pt;">There are four methods in the </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler </span><span style="font-size: small;"><span style="font-family: Georgia; FONT-SIZE: 10pt;">class – <span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes">LoadEventsXml</span>, UpdateEvents, isEventTriggered, and killEventList.<span style="mso-spacerun: yes"> </span></span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-size: small;"><span style="font-family: Georgia; FONT-SIZE: 10pt;"><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes">LoadEventsXml </span>(please note that you have to pass in content to run this part) goes through the level xml file that you specify when you call it (remember, it was </span></span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler</span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes">.LoadEventsXml(<span style="COLOR: blue">this</span>, <span style="COLOR: #a31515">&#8220;_xml\\EventSettings.xml&#8221;</span>); </span><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-family: Georgia; FONT-SIZE: 10pt;">in your main class.<span style="mso-spacerun: yes"> </span>If you open your </span></span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes">_xml\\EventSettings.xml</span><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-size: small;"><span style="font-family: Georgia; FONT-SIZE: 10pt;"> file, you will see the following that there are four events in the xml file…</span></span></span></p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes">DialogueEvent, HUDEvent, AIEvent,</span><span style="FONT-FAMILY: 'Georgia','serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"> and</span><span style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"> LevelChangeEvent</span></p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-size: small;"><span style="font-family: Georgia; FONT-SIZE: 10pt;">Now, we aren’t going to go over how the xml file works yet, that is the next part of the tutorial but I am going to tell you what the code does in the LoadEventsXml method with the assumption that you all know how to read a file from XML and use the data in your games.<span style="mso-spacerun: yes"> </span>(If not, just leave the code alone).<span style="mso-spacerun: yes"> </span>So, for each EventSettings in the file (note: there is only one), create a new XML node node, then for each node in node, find the speficied node by the typeID (aka the name of the class).<span style="mso-spacerun: yes"> </span>If the typeID matches one of the four events, create the event and add it to the list.</span></span></span></p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-family: Georgia; FONT-SIZE: 10pt;">UpdateEvents – if the CGC is changes, the set method that changes the CGC parameter will call UpdateEvents in the </span></span><span style="FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler</span><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-size: small;"><span style="font-family: Georgia; FONT-SIZE: 10pt;">.<span style="mso-spacerun: yes"> </span>UpdateEvents spins the GameEvents List and calls isEventTriggered on each event in the list.<span style="mso-spacerun: yes"> </span>The isEventTriggered method takes the event’s trigger conditions and matches them against the CGC, if there isnt a match, we get another event from the list.<span style="mso-spacerun: yes"> </span>If we get a match, we call the event’s FireEvent() method and remove the event from the list.<span style="mso-spacerun: yes"> </span>Each event has it’s own FireEvent method (this is what you want to change if you want to add functionality to the Events).</span></span></span></p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-family: Georgia; FONT-SIZE: 10pt;">The final method in the </span></span><span style="FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler </span><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-size: small;"><span style="font-family: Georgia; FONT-SIZE: 10pt;">is the killEventList and this simply drops the eventList and resets it to nothing. </span></span></span></p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-family: Georgia; FONT-SIZE: 10pt;">The </span></span><span style="FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEvent </span><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-family: Georgia; FONT-SIZE: 10pt;">class the parent class that all GameEvents inheirit from.<span style="mso-spacerun: yes"> </span>It holds the triggers for the CGC and calls update in the </span></span><span style="FONT-FAMILY: 'Courier New'; COLOR: #2b91af; FONT-SIZE: 10pt; mso-no-proof: yes">GameEventHandler </span><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-size: small;"><span style="font-family: Georgia; FONT-SIZE: 10pt;">when the triggers in the CGC change.<span style="mso-spacerun: yes"> </span>This also holds the portions that all the events share – the typeID, the triggers, and a bool of whether or not the event is triggered.</span></span></span></p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"><span style="font-size: small;"><span style="font-family: Georgia; FONT-SIZE: 10pt;">The GameEvents themselves have three parts - variables and accessors, the constructor, and the FireEvent method.<span style="mso-spacerun: yes"> </span>The variables are all set by the XML node passed into the class inside the constructor.<span style="mso-spacerun: yes"> </span>The FireEvent method, called when the CGC matches the Event’s triggers, will do whatever you have coded the game to do.  <em>The FireEvent method in each of the Game Events is where you have to write your own code</em> - our code will not work in your game - and we cannot write this code in a way that is modular&#8230;it&#8217;s just impossible.</span></span></span></p>
<p class="MsoNormal" style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=148</wfw:commentRss>
		</item>
		<item>
		<title>EventSystem[0].Tutorial(InstallationInstructions)</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=126</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=126#comments</comments>
		<pubDate>Mon, 15 Jun 2009 18:35:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Event System]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=126</guid>
		<description><![CDATA[Prototype By: Andrew Hicks and Katelyn Doran (Wicked Fly Games)
Engineering By: Amanda Chaffin, Andrew Hicks, and Jason Hardman
Code Review By: Jason Hardman and Amanda Chaffin
DLL and Docs By: Amanda Chaffin and Jason Hardman
 
Summary:
The Event System project is an example (and dev&#8217;ed code) of data driven events that run at a pre determined time after a [...]]]></description>
			<content:encoded><![CDATA[<p><em>Prototype By</em>: Andrew Hicks and Katelyn Doran<em> (Wicked Fly Games)<br />
Engineering By:</em> Amanda Chaffin, Andrew Hicks, and Jason Hardman<br />
<em>Code Review By</em>: Jason Hardman and Amanda Chaffin<br />
<em>DLL and Docs By</em>:<em> </em>Amanda Chaffin and Jason Hardman</p>
<p> </p>
<h2 class="mceTemp mceIEcenter" style="TEXT-ALIGN: left">Summary:</h2>
<p>The Event System project is an example (and dev&#8217;ed code) of data driven events that run at a pre determined time after a pre determined condition has been met. Okay, so what the hell does that mean, anyway? It means that you can quickly and easily add RPG elements to your game (dialogue, HUD changes, programatic cutscenes) with minimul code changes needed. The way the Event System works is through events that run off triggers. You set the trigger, meet the trigger conditions, and the event that matches those conditions will fire.</p>
<h3>Download:</h3>
<p>The <a href="http://wulfkat.darkwynter.com/Code/EventSystemFiles.zip"><span style="COLOR: #2f6eb9">zip files </span></a>for the EventSystem</p>
<p>The <a href="http://wulfkat.darkwynter.com/Code/EventSystemDemo.zip"><span style="COLOR: #2f6eb9">Demo project</span></a>: Requires XNA, Visual Studios, and DirectX SDK to run</p>
<h3>Installation: All instructions are written with the assumption that you have downloaded the <a href="http://wulfkat.darkwynter.com/Code/EventSystemFiles.zip"><span style="COLOR: #2f6eb9">zip files </span></a>for the EventSystem.</h3>
<p> </p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left">
<h3>1. Copy the folder event system into your main project folder (see Figure 1 for example).</h3>
</td>
<td align="right">
<p><div id="attachment_130" class="wp-caption alignleft" style="width: 294px"><img class="size-full wp-image-130" title="es1" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/06/es1.png" alt="Figure 1: Event System Added to a New Project" width="284" height="255" /><p class="wp-caption-text">Figure 1: Event System Added to a New Project</p></div></td>
</tr>
<tr>
<td align="left">
<h3>2. If you open the files, you should see 6 classes and one folder (Figure 2).</h3>
</td>
<td align="right">
<p><div id="attachment_131" class="wp-caption alignleft" style="width: 289px"><img class="size-full wp-image-131" title="es2" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/06/es2.png" alt="Figure 2: The Six Event System Classes" width="279" height="359" /><p class="wp-caption-text">Figure 2: The Six Event System Classes</p></div></td>
</tr>
<tr>
<td align="left">
<h3>3. Copy the _xml/EventSettings.xml file into the root of your project (Figure 3).</h3>
</td>
<td align="right">
<p><div id="attachment_132" class="wp-caption alignleft" style="width: 286px"><img class="size-full wp-image-132" title="es3" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/06/es3.png" alt="Figure 3: Inclusion of the XML File" width="276" height="401" /><p class="wp-caption-text">Figure 3: Inclusion of the XML File</p></div></td>
</tr>
<tr>
<td align="left">
<h3>4. Set the EventSettings.xml file properties to &#8220;copy always&#8221; (Figure 4).</h3>
</td>
<td align="right">
<p><div id="attachment_133" class="wp-caption alignleft" style="width: 289px"><img class="size-full wp-image-133" title="es4" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/06/es4.png" alt="Figure 4: EventSettings.xml set to Copy Always" width="279" height="210" /><p class="wp-caption-text">Figure 4: EventSettings.xml set to Copy Always</p></div></td>
</tr>
<tr>
<td align="left">
<h3>5. Drag the textures folder into your content folder (Figure 5).</h3>
</td>
<td align="right">
<p><div id="attachment_134" class="wp-caption alignleft" style="width: 287px"><img class="size-full wp-image-134" title="es5" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/06/es5.png" alt="Figure 5: Adding in the EventSystem Content" width="277" height="458" /><p class="wp-caption-text">Figure 5: Adding in the EventSystem Content</p></div></td>
</tr>
<tr>
<td align="left">
<h3>6. Open your main game class (EventSystemMain in this case).</h3>
</td>
<td align="right"> </td>
</tr>
<tr>
<td align="left">
<h3>7. Add using DarkWynter.EventSystem; into your using statements (Figure 6).</h3>
</td>
<td align="right">
<div class="mceTemp">
<p><div id="attachment_135" class="wp-caption alignleft" style="width: 589px"><img class="size-full wp-image-135" title="es6" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/06/es6.png" alt="Figure 6: Using Statement" width="579" height="473" /><p class="wp-caption-text">Figure 6: Using Statement</p></div></p>
</div>
</td>
</tr>
<tr>
<td align="left">
<h3>8. In LoadContent(), add the line<br />
GameEventHandler.LoadEventsXml(this, &#8220;_xml\\EventSettings.xml&#8221;); (Figure 7).<br />
Since the GameEventHandlers class is a public static class, you do not need to new<br />
the reference.</h3>
</td>
<td align="right">
<p><div id="attachment_136" class="wp-caption alignleft" style="width: 709px"><img class="size-full wp-image-136" title="es7" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/06/es7.png" alt="Figure 7: Event System Code" width="699" height="393" /><p class="wp-caption-text">Figure 7: Event System Code</p></div></td>
</tr>
</tbody>
</table>
<h3>9. You should now be able to compile the game.<br />
But wait, there is nothing there, right? That is because we haven&#8217;t told you what to do next!</h3>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=126</wfw:commentRss>
		</item>
		<item>
		<title>HUD Tutorial</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=97</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=97#comments</comments>
		<pubDate>Tue, 10 Mar 2009 04:41:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[HUD]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=97</guid>
		<description><![CDATA[
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 [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left">
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em>Prototype By:</em> Priyesh Dixit<em> (ScreenObject)</em> and Hunter Hale<em> (HUD)<br />
Engineering By:</em> Amanda Chaffin<br />
<em>Code Review By</em>: Jason Hardman<br />
<em>DLL and Docs By</em>:<em> </em>Amanda Chaffin and Jason Hardman</div>
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em></em></div>
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em></em> </div>
<h2 class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em>Summary:</em></h2>
<p style="TEXT-ALIGN: left">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.</p>
<h2 style="TEXT-ALIGN: left"><em>Download:</em></h2>
<p style="TEXT-ALIGN: left">The <a href="http://wulfkat.darkwynter.com/Code/DWHeadsUpDisplay.zip"><span style="COLOR: #2f6eb9">zip files </span></a>for the HUD</p>
<p style="TEXT-ALIGN: left">The <a href="http://wulfkat.darkwynter.com/Code/HUDTestBed.zip"><span style="COLOR: #2f6eb9">Demo project</span></a>: Requires XNA, Visual Studios, and DirectX SDK to run</p>
<p style="TEXT-ALIGN: left"><a href="http://wulfkat.darkwynter.com/blog/?p=9">Part the First:</a> Download and Installation</p>
<p style="TEXT-ALIGN: left"><a href="http://wulfkat.darkwynter.com/blog/?p=53">Part the Second:</a> Getting the HUD to work in a new project.</p>
<p style="TEXT-ALIGN: left"><a href="http://wulfkat.darkwynter.com/blog/?p=68">Part the Third:</a> XML ImageDisplay Explanation</p>
<p style="TEXT-ALIGN: left"><a href="http://wulfkat.darkwynter.com/blog/?p=75">Part the Fourth:</a> Image Positioning</p>
<p style="TEXT-ALIGN: left"><a href="http://wulfkat.darkwynter.com/blog/?p=79">Part the Fifth:</a> imageReference, what?</p>
<p style="TEXT-ALIGN: left"><a href="http://wulfkat.darkwynter.com/blog/?p=91">Part the Sixth:</a> Text Display Explanation</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=97</wfw:commentRss>
		</item>
		<item>
		<title>HUD Tutorial Part the Sixth: TextDisplay Explanation</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=91</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=91#comments</comments>
		<pubDate>Tue, 10 Mar 2009 04:30:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[HUD]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=91</guid>
		<description><![CDATA[
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 [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em></p>
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left">Prototype By:</div>
<p></em> Priyesh Dixit (<em>ScreenObject</em>) and Hunter Hale (<em>HUD</em>)<br />
<em>Engineering By:</em> Amanda Chaffin<br />
<em>Code Review By:</em> Jason Hardman<br />
<em>DLL and Docs By:</em> Amanda Chaffin and Jason Hardman</div>
<p> </p>
<h2 class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em>Summary:</em></h2>
<p style="TEXT-ALIGN: left">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.</p>
<h2 style="TEXT-ALIGN: left"><em>Download:</em></h2>
<p style="TEXT-ALIGN: left">The <a href="http://wulfkat.darkwynter.com/Code/DWHeadsUpDisplay.zip"><span style="COLOR: #2f6eb9">zip files </span></a>for the HUD</p>
<p style="TEXT-ALIGN: left">The <a href="http://wulfkat.darkwynter.com/Code/HUDTestBed.zip"><span style="COLOR: #2f6eb9">Demo project</span></a>: Requires XNA, Visual Studios, and DirectX SDK to run</p>
<p> </p>
<p style="MARGIN: 0in 0in 0pt">If you open your XML file that you downloaded and scroll down below the ImageDisplays, you will see a bunch of TextDisplays that look like this…</p>
<p style="MARGIN: 0in 0in 0pt"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">&lt;</span><span style="font-size: 10pt; color: #a31515; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">TextDisplay</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">nameID</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> =</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">&#8220;<span style="color: blue;">text1</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">text</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">quad upper center</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">posX</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">0</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">posY</span><span style="color: blue;">=</span>&#8220;<span style="color: blue;">15</span>&#8220;<span style="color: blue;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: red;">     quadrant</span><span style="color: blue;">=</span>&#8220;<span style="color: blue;">null</span>&#8221; <span style="color: red;">colorR</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">250</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">colorG</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">100</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">colorB</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">250</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">colorA</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">255</span>&#8220;<span style="color: blue;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: red;">     toDraw</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">true</span>&#8221; <span style="color: red;">imageReference</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">null</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">operation</span><span style="color: blue;">=</span>&#8220;<span style="color: blue;">add</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">offsetX</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">25</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">offsetY</span><span style="color: blue;">=</span>&#8220;<span style="color: blue;">7</span>&#8220;<span style="color: blue;">/&gt;</span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">If you notice, most of the attribute tags are the same in the TextDisplays as they are in the ImageDisplays.  The functionality of those tags is the exact same functionality that the ImageDisplays have so there please refer to the ImageDisplays section if you need a better explanation.  There are a couple that were not in the ImageDisplays…</p>
<p style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes">If you notice, most of the attribute tags are the same in the TextDisplays as they are in the ImageDisplays.<span style="mso-spacerun: yes;">  </span>The functionality of those tags is the exact same functionality that the ImageDisplays have so there please refer to the ImageDisplays section if you need a better explanation.<span style="mso-spacerun: yes;">  </span>There are a couple that were not in the ImageDisplays…</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">text </span><span style="mso-no-proof: yes;">– The text that you want displayed on the screen.</span><span style="font-family: Times New Roman;"></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">operation </span><span style="mso-no-proof: yes;"><span style="font-size: small; font-family: Times New Roman;">– </span>The type of operation that you want performed on the TextDisplay using a the Vector2 offset if the<span style="font-size: small; font-family: Times New Roman;"> </span></span><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">imageReference</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span><span style="mso-no-proof: yes;">does not equal </span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">null</span><span style="mso-no-proof: yes;"><span style="font-size: small;"><span style="font-family: Times New Roman;">.<span style="mso-spacerun: yes;">  </span></span></span>There are four operations…</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"><span style="font-size: small; font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list 1.0in"><span style="font-size: 10pt; color: red; font-family: Symbol; mso-no-proof: yes; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">add</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list 1.0in"><span style="font-size: 10pt; color: red; font-family: Symbol; mso-no-proof: yes; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">subtract</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list 1.0in"><span style="font-size: 10pt; color: red; font-family: Symbol; mso-no-proof: yes; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">multiply</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list 1.0in"><span style="font-size: 10pt; color: red; font-family: Symbol; mso-no-proof: yes; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">divide</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">offsetX </span><span style="font-size: small;"><span style="font-family: Times New Roman;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span style="mso-no-proof: yes;">–</span></span></span></span></span><span style="mso-no-proof: yes;"> The X coordinate of the offset Vector.</span><span style="font-size: small;"></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">offsetY </span><span style="mso-no-proof: yes;">– The Y coordinate of the offset Vector.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"><span style="font-size: small; font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;">So, if you want to change the text, all you need to do is type in the<span style="font-size: small; font-family: Times New Roman;"> </span></span><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">text </span><span style="mso-no-proof: yes;">field what you want to say.<span style="mso-spacerun: yes;">  </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"><span style="font-size: small; font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;">If, once you have drawn the item on the screen, you wish to change the location using the<span style="font-size: small; font-family: Times New Roman;"> </span></span><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">imageReference</span>, you can choose to just add based on the image’s position.  Finally, you then can use the offsets to make minute adjustments to insure that your text is positioned correctly. </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"> </span></p>
<p style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">Now, I will walk you through how to add a game timer to your project that displays on your HUD. </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;">First of all, you need to create an image for the timer box if you wish.  Your XML tag for the timer box will look something like this…</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"><span style="font-size: small; font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">&lt;</span><span style="font-size: 10pt; color: #a31515; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">ImageDisplay</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">nameID</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> =</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">&#8220;<span style="color: blue;">Timer</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">texturePath</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">ArtAssets/HUDTextures/Time</span>&#8220;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: blue;"> <span style="mso-tab-count: 1;">      </span></span><span style="color: red;">posX</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">15</span>&#8221; <span style="color: red;">posY</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">415</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">quadrant</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">UC</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">colorR</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">255</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">colorG</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">255</span>&#8220;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: blue;"> <span style="mso-tab-count: 1;">      </span></span><span style="color: red;">colorB</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">255</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">colorA</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">255</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">toDraw</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">true</span>&#8221; <span style="color: red;">imageReference</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">null</span>&#8220;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: blue;"> <span style="mso-tab-count: 1;">      </span></span><span style="color: red;">imageAttribute</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">width</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">modifier</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">0</span>&#8220;<span style="color: blue;">/&gt;</span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"><span style="font-size: small; font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">As you can see, the image is being loaded into the <span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">&#8220;<span style="color: blue;">UC</span>&#8221; </span><span style="mso-no-proof: yes;">(Upper Center) quadrant so the actual position values are irrelevent (but the numbers are there).</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"><span style="font-size: small; font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">Make sure that you add the image to your project in the HUDTextures folder inside the ArtAssets folder inside Content (Note: you can put this wherever you need to, just make sure that your file path in the XML matches the location of the item in question).</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;">Your XML value, if you want to center the timer, will look something like this…</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"><span style="font-size: small; font-family: Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">&lt;</span><span style="font-size: 10pt; color: #a31515; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">TextDisplay</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span><span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">nameID</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> =</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">&#8220;<span style="color: blue;">TimerText</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">text</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">00:00</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">posX</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">0</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">posY</span><span style="color: blue;">=</span>&#8220;<span style="color: blue;">15</span>&#8220;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-tab-count: 2;">          </span><span style="color: red;">quadrant</span><span style="color: blue;">=</span>&#8220;<span style="color: blue;">null</span>&#8221; <span style="color: red;">colorR</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">250</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">colorG</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">0</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">colorB</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">0</span>&#8220;<span style="color: blue;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: blue;">          </span><span style="color: red;">colorA</span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: blue;">=</span>&#8220;<span style="color: blue;">255</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">toDraw</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">true</span>&#8221; <span style="color: red;">imageReference</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">Timer</span>&#8220;<span style="color: blue;"> </span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: red;">          operation</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">add</span>&#8220; </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="color: red;">offsetX</span><span style="color: blue;"> =</span>&#8220;<span style="color: blue;">25</span>&#8220;<span style="color: blue;"> </span><span style="color: red;">offsetY</span><span style="color: blue;">=</span>&#8220;<span style="color: blue;">7</span>&#8220;<span style="color: blue;">/&gt;</span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">As you can see, the text is not being loaded off the quadrant system but, because we are pulling the location from the Timer image, we do not need to actually try to position the image on the HUD in the XML…but, repeat after me, we cannot leave the values blank.</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="mso-no-proof: yes;">If you have done everything right, you will have something like Figure: 11&#8230;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p><div id="attachment_94" class="wp-caption aligncenter" style="width: 587px"><img class="size-full wp-image-94" title="time" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/03/time.png" alt="Figure 10: Timer" width="577" height="113" /><p class="wp-caption-text">Figure 11: Timer</p></div></p>
<p> </p>
<p style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">But, how do we make the time change?</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">Go to your human class (or whatever has an update loop) and add a timer of some sort…I use<span style="font-size: small; font-family: Times New Roman;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">System.Diagnostics.<span style="color: #2b91af;">Stopwatch </span></span>for all my timing needs.  Start your stopwatch in your LoadContent method.  You will also need to get the index of the Timer from the TextDisplays list so build the same for loop that you did for the ImageDisplays in your LoadContent and store the int in the class.</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">Once you have the relevant information, you can then add the timing code – make sure that you do this in your Update method.  Here is my timing code, based off <span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">System.Diagnostics.<span style="color: #2b91af;">Stopwatch, </span></span>so if you use something else, your mileage may vary…</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; color: green; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">// Update the Game Time</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">int</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> seconds = ((<span style="color: blue;">int</span>)gameTimer.Elapsed.TotalSeconds) % 60;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">int</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> minutes = ((<span style="color: blue;">int</span>)gameTimer.Elapsed.TotalSeconds) / 60;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">string</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> formatedSeconds = seconds.ToString();</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">if</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> (seconds &lt; 10)</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">{</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">formatedSeconds = <span style="color: #a31515;">&#8220;0&#8243;</span> + seconds.ToString();</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">}</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">string</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> timing = minutes.ToString() + <span style="color: #a31515;">&#8220;:&#8221;</span> + formatedSeconds;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">hud.textDisplays[timerIndex].text = timing;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">That’s it!  And that is how the HUD works…</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">Next, dialogue!</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=91</wfw:commentRss>
		</item>
		<item>
		<title>HUD Tutorial Part the Fifth: imageReference, what?</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=79</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=79#comments</comments>
		<pubDate>Tue, 10 Mar 2009 04:07:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[HUD]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=79</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em>Prototype By:</em> Priyesh Dixit (<em>ScreenObject</em>) and Hunter Hale (<em>HUD</em>)<br />
<em>Engineering By:</em> Amanda Chaffin<br />
<em>Code Review By:</em> Jason Hardman<br />
<em>DLL and Docs By:</em> Amanda Chaffin and Jason Hardman</div>
</p>
<h2 class="mceTemp mceIEcenter" style="text-align: left;"><em>Summary:</em></h2>
<p style="text-align: left;">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.</p>
<h2 style="text-align: left;"><em>Download:</em></h2>
<p style="text-align: left;">The <a href="http://wulfkat.darkwynter.com/Code/DWHeadsUpDisplay.zip"><span style="color: #2f6eb9;">zip files </span></a>for the HUD</p>
<p style="text-align: left;">The <a href="http://wulfkat.darkwynter.com/Code/HUDTestBed.zip"><span style="color: #2f6eb9;">Demo project</span></a>: Requires XNA, Visual Studios, and DirectX SDK to run</p>
<p style="text-align: left;"><span style="font-size: 10pt; color: red; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><strong>imageReference:</strong></span></p>
<p style="text-align: left;">Remember the <span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">nameID</span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"> </span>attribute that I told you to use a unique name for?  Well, there was a very valid reason for that, beyond what I harped on earlier.  You use the <span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">nameID</span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"> </span>attribute in the <span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">imageReference</span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"> </span>attribute to denote what image you wish to refer to.</p>
<p style="text-align: left;">For example, let’s say that I want to draw the <em>dude</em> image in the top left hand corner and then draw the <em>health bar</em> to the right of the the <em>dude</em> icon.  My XML file will then look like this…</p>
<p> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">&lt;</span><span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">ImageDisplay</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">nameID</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> =</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">“<span style="COLOR: blue">DudeHealthBar</span>“<span style="COLOR: blue"> </span><span style="COLOR: red">texturePath<span style="color: #0000ff;">=</span><span style="color: #000000;">&#8220;</span></span><span style="COLOR: blue">ArtAssets/HUDTextures/healthBar</span>“<span style="COLOR: blue"> </span><span style="COLOR: red">posX</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">215</span>“<br />
</span><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">      posY</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> =</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">“<span style="COLOR: blue">315</span>“<span style="COLOR: blue"> </span><span style="COLOR: red">quadrant</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">UL</span>“<span style="COLOR: blue"> </span><span style="COLOR: red">colorR</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">255</span>“<span style="COLOR: blue"> </span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="COLOR: red">colorG</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">255</span>“<span style="COLOR: blue"> </span><span style="COLOR: red">colorB</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">255</span>“<span style="COLOR: blue"> </span><span style="COLOR: red">colorA</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">255</span>“<span style="COLOR: blue"><br />
</span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="COLOR: red">      toDraw</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">true</span>“<span style="COLOR: blue"> </span><span style="COLOR: red">imageReference</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">Dude</span>“<span style="COLOR: blue"> </span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="COLOR: red">imageAttribute</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">width</span>“<span style="COLOR: blue"> </span><span style="COLOR: red">modifier</span><span style="COLOR: blue"> =</span>“<span style="COLOR: blue">15</span>“<span style="COLOR: blue">/&gt;</span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">&lt;</span><span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">ImageDisplay</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">nameID</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> =</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">Dude</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue"> </span><span style="COLOR: red">texturePath<span style="color: #0000ff;">=</span></span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">ArtAssets/HUDTextures/character</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue"> </span><span style="COLOR: red">posX</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">215</span><span style="color: #000000;">&#8221;<br />
</span></span><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">     posY</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> =</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">315</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue"> </span><span style="COLOR: red">quadrant</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">UL</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue"> </span><span style="COLOR: red">colorR</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">255</span><span style="color: #000000;">&#8221; </span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="COLOR: red">colorG</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">255</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue"> </span><span style="COLOR: red">colorB</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">255</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue"> </span><span style="COLOR: red">colorA</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">255</span><span style="color: #000000;">&#8221;<br />
</span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="COLOR: red">     toDraw</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">true</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue"> </span><span style="COLOR: red">imageReference</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">null</span><span style="color: #000000;">&#8221; </span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="COLOR: red">imageAttribute</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">null</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue"> </span><span style="COLOR: red">modifier</span><span style="COLOR: blue"> =</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">0</span><span style="color: #000000;">&#8220;</span><span style="COLOR: blue">/&gt;</span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt">When you run the game, providing that you have added the health bar image into your game, you will see something like Figure 10. </p>
<p><div id="attachment_80" class="wp-caption aligncenter" style="width: 413px"><img class="size-full wp-image-80" title="healthdude" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/03/healthdude.png" alt="Figure10: Character Icon and Health Bar" width="403" height="311" /><p class="wp-caption-text">Figure10: Character Icon and Health Bar</p></div></p>
<div class="mceTemp mceIEcenter"> </div>
<p><span style="font-size: 12pt;"><span style="font-family: Times New Roman;">Options for the <span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">imageReference </span>include ANY image that you have PREVIOUSLY added in the XML file.  Please note the PREVIOUSLY notation – you cannot base an image’s location off an image that had NOT been loaded yet, ergo, the image that you want to reference must be entered before the one that is going to reference it (XML reads top to bottom).</span></span></p>
<p>Options for the <span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">imageAttribute</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"> </span>include &#8220;<span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">width</span>&#8220;, &#8220;<span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">height</span>&#8220;, or  &#8220;<span style="font-size: x-small; color: #0000ff; font-family: Courier New;">both</span>&#8220;.  The tags tell the HUD to go to the referenced image and find the image attributes of width, height, or both.  The system then adds that number to the second image’s starting position, in a sense, scooting (hey, it’s a technical term now) it over where you want it to display.</p>
<p>The final option in the image display is the <span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">modifier</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"> </span>option.  This is a simple <span style="font-size: x-small; color: #0000ff; font-family: Courier New;">int </span>that you can use to scoot the images into more precise locations.  As it is an addition function, if you wish to make it a subtraction, just use a negative number.</p>
<p>So why did we do the whole <span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">imageReference </span>routine instead of just setting the image height and width as an XML tag?  Well, hardcoding numbers is bad and hardcoding those numbers means that, if you scale your HUD, the images will not rescale their height and width.  It is better to just allow XNA to discover the image attributes for you and use those so as to avoid all kinds of silly mistakes that enter into programs with hardcoded numbers.</p>
<p>But, aren’t you going to show us how to make the health bar subtract depending on how healthy the player is?  Um, no.  Ok, well, I will show you how to set it up. You need to have an image of a full health bar and an empty health bar.  In your human class (you do have one, yes?), you need to add the <span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">using </span>statement as explained in the installation instructions.</p>
<p>Now, the HUD stores all of the ImageDisplays in a publically accessible list (<span style="COLOR: #2b91af"><span style="font-size: x-small; font-family: Courier New;"><span style="COLOR: #2b91af">Game1</span><span style="color: #000000;">.hud.imageDisplays</span></span></span>) so that you can check the list for the index of the image that you want.  After you have added the <span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">using </span>statement, you now need to find the index of the image that you are wanting, in this case, the index of both the full and empty health bars.  To do this, I suggest that you make two <span style="font-size: x-small; color: #0000ff; font-family: Courier New;">int</span> in your human class to permanently store the image’s list index (it beats having to spin the list every time you hit the update loop).  After you have done that, you need to look for the images, I do this in LoadContent(), and the code for that is something akin to this…</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">     </span><span style="COLOR: blue">for</span> (<span style="COLOR: blue">int</span> x = 0; x &lt; <span style="COLOR: #2b91af">Game1</span>.hud.imageDisplays.Count; x++)</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">         </span>{</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span><span style="COLOR: blue">if</span> (<span style="COLOR: #2b91af">Game1</span>.hud.imageDisplays[x].name == <span style="COLOR: #a31515">&#8220;DudeHealthBar&#8221;</span>)</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">             </span>{</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">                 </span>healthBar = x;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">              </span>}</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">          </span>}</span></p>
<p>So now I know where the image is in the list (remember, you have to do this for any image or text that you want to modify), I can access the actual item in the list and tell it to change.  The code for that is something like this (your math may be different)…   </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">// Update the health bar</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">Game1</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">.hud.imageDisplays[healthBar].Source = <span style="COLOR: blue">new</span> <span style="COLOR: #2b91af">Rectangle</span>(0, 0,</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">      </span><span style="COLOR: #2b91af">Game1</span>.hud.imageDisplays[healthBar].width, </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-tab-count: 1">      </span>(<span style="COLOR: blue">int</span>)((( <span style="COLOR: blue">this</span>.health * <span style="COLOR: #2b91af">Game1</span>.hud.imageDisplays[healthBar].height / 80))));</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"> </p>
<p>So  now that you know how to put images on the HUD, move them around to the desired location, and even, hopefully, have your health bar working, we need to move onto the text portion of the HUD&#8230;Part the Sixth!</p>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=79</wfw:commentRss>
		</item>
		<item>
		<title>HUD Tutorial Part the Fourth: Image Positioning</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=75</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=75#comments</comments>
		<pubDate>Tue, 10 Mar 2009 03:38:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[HUD]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=75</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p><em>Prototype By:</em>  Priyesh Dixit (<em>ScreenObject</em>) and Hunter Hale (<em>HUD</em>)<br />
<em>Engineering By:</em> Amanda Chaffin<br />
<em>Code Review By:</em> Jason Hardman<br />
<em>DLL and Docs By:</em> Amanda Chaffin and Jason Hardman</p>
<h2 class="mceTemp mceIEcenter" style="text-align: left;"><em>Summary:</em></h2>
<p style="text-align: left;">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.</p>
<h2 style="text-align: left;"><em>Download:</em></h2>
<p style="text-align: left;">The <a href="http://wulfkat.darkwynter.com/Code/DWHeadsUpDisplay.zip"><span style="color: #2f6eb9;">zip files </span></a>for the HUD</p>
<p style="text-align: left;">The <a href="http://wulfkat.darkwynter.com/Code/HUDTestBed.zip"><span style="color: #2f6eb9;">Demo project</span></a>: Requires XNA, Visual Studios, and DirectX SDK to run</p>
<p style="text-align: left;"><strong>Image Positioning:</strong></p>
<p style="text-align: left;">Like I said last time, I am going to assume that you know how to name your images and load them into your game.  Therefore, we are going to start how you set up the position of the HUD image on the screen using the DarkWynter HUD system.  Essentially, you have two options as far as the image position goes; <em>hardcoding</em> the images or using the <em>quadrant system</em>. </p>
<p style="text-align: left;"><em>Hardcoding Images (More Expert Use)<br />
</em><br />
If you wish, you can hardcode the image positions to show at a specific location in your game.  To do this, simply change the <span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">posX </span>and <span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">posY </span>to be the location that you want to use and make sure that the quadrant’s value is set to null (<span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">quadrant</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">&#8220;<span style="color: blue;">null</span>&#8220;</span>).  Remember that you cannot leave any value either blank, or take it out of the XML as you will cause the HUD to break.  Remember, also, that the top left corner is (0,0).  After you have hardcoded the image position, remember, too that you can change the base location by using the image reference tags, which we will discuss shortly.  If you hardcode all of your image positions, you can also call hud.Resize() to correct the images to the proper viewport in the game.</p>
<p style="text-align: left;"><em>Quadrant System</em></p>
<p style="text-align: left;">The quadrant system works by dividing the viewport space into 9 different quadrants: <span style="color: #008000;"><strong>UL</strong> </span>(upper left), <strong><span style="color: #008000;">ML</span></strong> (middle left), <strong><span style="color: #008000;">BL</span> </strong>(bottom left), <strong><span style="color: #008000;">UC</span> </strong>(upper center), <strong><span style="color: #008000;">MC</span> </strong>(middle center), <strong><span style="color: #008000;">BC</span> </strong>(bottom center), <strong><span style="color: #008000;">UR</span> </strong>(upper right), <strong><span style="color: #008000;">MR</span> </strong>(middle right), and <strong><span style="color: #008000;">BR</span> </strong>(bottom right).  Each quadrant knows where it is supposed to draw the images and you can also change the base location by using the <span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">imageReference </span>tags.  Note:  The quadrant system is the <span style="color: #993300;"><strong>DEFAULT</strong> </span>system for the HUD so, if you do NOT set the <span style="font-size: 10pt; color: red; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">quadrant</span><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">&#8220;<span style="color: blue;">null</span>&#8220;</span> in the XML tag, you will be using the quadrant system.  For a more indepth explanation of the quadrant system, please refer to Figure 9.</p>
<p><div id="attachment_76" class="wp-caption aligncenter" style="width: 810px"><img class="size-full wp-image-76" title="quadrant" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/03/quadrant.png" alt="Figure 9: The Quadrant System" width="800" height="600" /><p class="wp-caption-text">Figure 9: The Quadrant System</p></div></p>
<p style="text-align: left;">  As you can see, each of the quadrants has the math already pre-configured for you so that you just need to use the actual attribute tags for the XML file listed in <span style="color: #008000;"><strong>green </strong></span>in the introductory paragraph above.  Also, notice the order that the tags are in (Y, X)&#8230;what can I say, I&#8217;m dyslexic. If you look in your <em>HUD.xml</em> file that you downloaded and installed into your project (if you have been following along), you can see that every image and text display are using the quadrant system and not the hardcoding.  You will also note, however, that each image and text display has numbers in the <span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">posX </span>and <span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">posY </span>tags.  If you leave out the numbers (it’s stored as an <span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">int</span><span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"> </span>in the code, so whatever you want as long as it is an <span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">int</span>), you will crash the program.</p>
<p style="text-align: left;">And the monkeys will be sad.</p>
<p style="text-align: left;">Ok, so now that you have how you can load images to either a hardcoded or quadrant position, what happens if you want to load two images in the same quadrant?  Or what if you want to hardcode an image position and then base your second image next to the one that you just loaded?</p>
<p style="text-align: left;">That is what the <span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">imageReference </span>was designed to answer and what we will discuss in Part the Fifth.</p>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=75</wfw:commentRss>
		</item>
		<item>
		<title>HUD Tutorial Part the Third: XML ImageDisplay Explanation</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=68</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=68#comments</comments>
		<pubDate>Tue, 10 Mar 2009 03:17:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[HUD]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=68</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em>Prototype By:</em> Priyesh Dixit<em> (ScreenObject)</em> and Hunter Hale<em> (HUD)<br />
Engineering By:</em> Amanda Chaffin<br />
<em>Code Review By</em>: Jason Hardman<br />
<em>DLL and Docs By</em>:<em> </em>Amanda Chaffin and Jason Hardman</div>
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em></em></div>
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em></em> </div>
<h2 class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em>Summary:</em></h2>
<p style="TEXT-ALIGN: left">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.</p>
<h2 style="TEXT-ALIGN: left"><em>Download:</em></h2>
<p style="TEXT-ALIGN: left">The <a href="http://wulfkat.darkwynter.com/Code/DWHeadsUpDisplay.zip"><span style="COLOR: #2f6eb9">zip files </span></a>for the HUD</p>
<p style="TEXT-ALIGN: left">The <a href="http://wulfkat.darkwynter.com/Code/HUDTestBed.zip"><span style="COLOR: #2f6eb9">Demo project</span></a>: Requires XNA, Visual Studios, and DirectX SDK to run</p>
<p><strong>How to Use the HUD:</strong></p>
<p>So this is all very well and good, you say as you stare at the HUD that is both useless and somewhat pretty, but how do I replace your images with my images?  And how do I make it work for things like a timer and a health bar?</p>
<p>Don’t worry, young samurai, it is very easy to do and I will explain all to you.</p>
<p>The first thing that you need to know is that the entire HUD, including positions and types of displays, are loaded in the <em>HUD.xml</em> file.  In other words, if you want to change the HUD, you need to change the <em>HUD.xml</em> file.</p>
<p><strong>XML Images Explanation:</strong></p>
<p>Now, if you go into your <em>HUD.xml</em> file, you will see a bunch of <span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">ImageDisplays</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span>that look like this…</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">&lt;</span><span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">ImageDisplay</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">nameID</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> =</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">&#8220;<span style="COLOR: blue">Dude</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">texturePath</span><span style="COLOR: blue"><br />
<span style="mso-tab-count: 1">      </span></span>&#8220;<span style="COLOR: blue">ArtAssets/HUDTextures/character</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">posX</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">215</span>&#8220;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">posY</span><span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> =</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">&#8220;<span style="COLOR: blue">315</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">quadrant</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">null</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">colorR</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">255</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">colorG</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">255</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">colorB</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">255</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">colorA</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">255</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">toDraw</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">true</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">imageReference</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">null</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">imageAttribute</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">null</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">modifier</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">0</span>&#8220;<span style="COLOR: blue">/&gt;</span></span></p>
<p> </p>
<p>ImageDisplays are, simply, the textures that you want to display on your HUD.  If you have gotten your HUD integrated at this point, you will notice that there are 9 of the character images (see Figure #8) in your game, scattered in different locations and in different colors.  All of those images are loaded via the XML file and you can change, add, and delete anything in the XML file at will.</p>
<p> </p>
<p><div id="attachment_69" class="wp-caption aligncenter" style="width: 74px"><img class="size-full wp-image-69" title="character" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/03/character.png" alt="The Character Icon" width="64" height="64" /><p class="wp-caption-text">Figure 8: Character Icon</p></div></p>
<p>Wait!  But first, we must explain how to do it and what all the parts are from the XML configuration…</p>
<p><span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">ImageDisplay </span>– The name of the Node, also the type of display to be added to the HUD.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">nameID </span>– The name attribute of the image. </p>
<p>Note: This name is here for your convenience so that you can find the HUD image that you want to change so each nameID should be a unique but readily identifiable name. </p>
<p>For example, <span style="COLOR: blue"><span style="font-size: small; font-family: Courier New;">emptyHealthBar </span></span>is a good name but <span style="COLOR: blue"><span style="font-size: small; font-family: Courier New;">image35324rqw</span></span>, in a word, sucks.  From the name <span style="COLOR: blue"><span style="font-size: small; font-family: Courier New;">image35324rqw</span></span>, the next coder in line has less than no idea which image that actually is just by looking at the name and has to go track down the actual image to figure out which one it is, unless they know your naming conventions.  Now, that may not seem like a big deal but, trust me, it is a very big deal.  One that actually gets more monumentous the later in the evening it is and the less caffine there is at the programmer’s disposal.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">texturePath </span>– The actual location of the image, with the name of the image minus the file extension, in the project.   </p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">posX </span>– The X coordinate of the position.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">posY </span>– The Y coordinate of the position.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">quadrant </span>– The quadrant that you want the image drawn into. </p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">colorR </span>– The red channel of the desired color.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">colorG </span>– The green channel of the desired color.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">colorB </span>– The blue channel of the desired color.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">colorA </span>– The alpha channel of the desired color.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">toDraw </span>– A boolean that tells the HUD to draw the image or not.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">imageReference </span>– The image that you wish to refer to (see why names are soooo important now, yes?) for the drawing location of your new image.  Can be self referencing also.</p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">imageAttribute </span>– The attribute (height, width, or both) of the referenced image that you need for your drawing location of your new image. </p>
<p><span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">modifier </span>– An int that you can use to offset your images from one another.  This one does an add operation but, if you use negative numbers, you can also get it to subtract.</p>
<p>Oh, my god, that’s so complicated, right?  No, not really.  Deving it was a little complicated but that’s all been done for you so now you get the easy part – changing the XML to show what you want it to show.</p>
<p>I am going to assume that you know how to name your images and load them into your game.  Therefore, we are going to start how you set up the position of the HUD image on the screen using the DarkWynter HUD system.  Essentially, you have two options as far as the image position goes; hardcoding the images or using the quadrant system.  We will do this in part the fourth.</p>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=68</wfw:commentRss>
		</item>
		<item>
		<title>HUD Tutorial Part the Second: Getting the HUD to work in a new project</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=53</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=53#comments</comments>
		<pubDate>Tue, 03 Mar 2009 02:23:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[HUD]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=53</guid>
		<description><![CDATA[



 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 [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<div class="mceTemp mceIEcenter">
<div class="mceTemp mceIEcenter">
<div class="mceTemp mceIEcenter">
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"> <em>Prototype By:</em> Priyesh Dixit<em> (ScreenObject)</em> and Hunter Hale<em> (HUD)<br />
Engineering By:</em> Amanda Chaffin<br />
<em>Code Review By</em>: Jason Hardman<br />
<em>DLL and Docs By</em>:<em> </em>Amanda Chaffin and Jason Hardman</div>
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em></em></div>
<div class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em></em> </div>
<h2 class="mceTemp mceIEcenter" style="TEXT-ALIGN: left"><em>Summary:</em></h2>
<p style="text-align: left;">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.</p>
<h2 style="text-align: left;"><em>Download:</em></h2>
<p style="text-align: left;">The <a href="http://wulfkat.darkwynter.com/Code/DWHeadsUpDisplay.zip"><span style="color: #2f6eb9;">zip files </span></a>for the HUD</p>
<p style="text-align: left;">The <a href="http://wulfkat.darkwynter.com/Code/HUDTestBed.zip"><span style="color: #2f6eb9;">Demo project</span></a>: Requires XNA, Visual Studios, and DirectX SDK to run</p>
</div>
</div>
<p style="text-align: left;">All instructions that follow will be based on your use of the game1.cs class (which is renamed to HUDDemo in my images.  The first thing that you need to do is open your game1.cs class and add your using statement as shown in Figure 3.</p>
</div>
<div class="mceTemp">
<p><div id="attachment_28" class="wp-caption aligncenter" style="width: 479px"><img class="size-full wp-image-28" title="using" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/using.png" alt="Figure 3: Using Statement" width="469" height="433" /><p class="wp-caption-text">Figure 3: Using Statement</p></div></p>
</div>
<p>Oh, but there is so much more to do!</p>
<p>After you have added the using statement, you have to declare the HUD, a viewport, and a string with the CurrentDirectory location in it (Figure 4).</p>
<p><div id="attachment_20" class="wp-caption aligncenter" style="width: 619px"><img class="size-full wp-image-20" title="declare" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/declare.png" alt="Variable Declaration" width="609" height="153" /><p class="wp-caption-text">Figure 4: Variable Declaration</p></div></p>
<p>Now, drop down to your LoadContent() method in your game1 file (or whatever your top level class is) and initialize your variables (see Figure 5).  The reason that we have to initialize in LoadContent() instead of in the traditional Initialize() is because we need the graphics.GraphicsDevice.Viewport to exist, which it does not exist until after all the Initialization() calls have finished.</p>
<p>You need to get the viewport from the GraphicsDevice, add the file name of the HUD xml file to the filename string, and then declare the new HUD, passing in the game, the game’s spriteBatch, the viewport, and the filename (which, if you did a plus equals [+= ] and put the HUD.xml file in the correct location, will allow the HUD to find the file in the debug folder – don’t worry, this does work on an Xbox as well).</p>
<p><div id="attachment_24" class="wp-caption aligncenter" style="width: 701px"><img class="size-full wp-image-24" title="loadc" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/loadc.png" alt="Figure 5: Load Content" width="691" height="271" /><p class="wp-caption-text">Figure 5: Initialize Content</p></div></p>
<p> <br />
The last thing that you need to do is tell the HUD to draw itself so drop down to your Draw call and call the HUD’s draw call (Figure 6).</p>
<p><div id="attachment_21" class="wp-caption aligncenter" style="width: 715px"><img class="size-full wp-image-21" title="draw" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/draw.png" alt="Figure 6: Draw Call" width="705" height="308" /><p class="wp-caption-text">Figure 6: Draw Call</p></div></p>
<p>Hit RUN and you should see something like Figure 7.</p>
<div class="mceTemp mceIEcenter">
<div class="mceTemp mceIEcenter">
<p><div id="attachment_22" class="wp-caption aligncenter" style="width: 613px"><img class="size-full wp-image-22" title="game" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/game.png" alt="Figure 7: The Game window with the HUD Displaying" width="603" height="466" /><p class="wp-caption-text">Figure 7: The Game window with the HUD Displaying</p></div></p>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=53</wfw:commentRss>
		</item>
		<item>
		<title>HUD Tutorial Part the First - Download and Installation (Updated!!!)</title>
		<link>http://wulfkat.darkwynter.com/blog/?p=9</link>
		<comments>http://wulfkat.darkwynter.com/blog/?p=9#comments</comments>
		<pubDate>Tue, 24 Feb 2009 05:13:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[HUD]]></category>

		<guid isPermaLink="false">http://wulfkat.darkwynter.com/blog/?p=9</guid>
		<description><![CDATA[


 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 [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<p><em></em></p>
<div><em></em></div>
<p> <em>Prototype By:</em> Priyesh Dixit <em>(ScreenObject)</em> and Hunter Hale <em>(HUD)<br />
Engineering By:</em> Amanda Chaffin<br />
<em>Code Review By:</em> Jason Hardman<br />
<em>DLL and Docs By:</em> Amanda Chaffin and Jason Hardman</p>
<h2><em></em></h2>
<h2><em>Summary:</em></h2>
<p>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.</p>
<h2><em>Download:</em></h2>
<p>The <a href="http://wulfkat.darkwynter.com/Code/DWHeadsUpDisplay.zip">zip files </a>for the HUD</p>
<p>The <a href="http://wulfkat.darkwynter.com/Code/HUDTestBed.zip">Demo project</a>: Requires XNA, Visual Studios, and DirectX SDK to run</p>
<h2><em>Installation:</em></h2>
<p>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.<br />
2. Download and extract the files into a temp directory on the desktop.<br />
3. Drag the file <em>DWHeadsUpDisplay.dll</em> into root folder of your game (it’s the one with the .sln file).<br />
4. Right-click <em>References</em> (in Project Explorer) and click Add, then click on the Browse Tag.<br />
5. Locate the <em>DWHeadsUpDisplay.dll</em> and select the file.<br />
6. Remember to include <span><span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">using</span><span style="font-size: 10pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"> DarkWynter.Engine.UserInterface; </span></span>to any class that needs to use the HUD (game1.cs, human, engine, etc). Refer to Figure 3.<br />
7. Go back to your temp folder, grab the ArtAssets file and copy that to your project’s Content directory on your local machine.<br />
8. Add the folder to your project (you can drag and drop the folder into the directory).<br />
9. Find the <em>Arial.spritefont </em>file and do steps 7 and 8 with it.<br />
10. Find the <em>HUD.xml</em> 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.<br />
11. Set the property of the XML file to “copy if newer.” Refer to Figure 2.<br />
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).</p>
<dl id="attachment_27" class="wp-caption alignleft" style="width: 312px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-27" title="solexp" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/solexp.png" alt="Figure 1: Solution Explorer" width="302" height="435" /></dt>
<dd class="wp-caption-dd">Figure 1: Solution Explorer</dd>
</dl>
<p><div id="attachment_28" class="wp-caption alignleft" style="width: 479px"><img class="size-full wp-image-28" title="using" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/using.png" alt="Figure 3: Using Statement" width="469" height="433" /><p class="wp-caption-text">Figure 3: Using Statement</p></div></p>
<div class="mceTemp">
<p><div id="attachment_25" class="wp-caption alignleft" style="width: 333px"><img class="size-full wp-image-25" title="properties" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/properties.png" alt="Figure 2: Setting the XML Properties" width="323" height="201" /><p class="wp-caption-text">Figure 2: Setting the XML Properties</p></div></p>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp"> </div>
<div class="mceTemp">
<p><div id="attachment_176" class="wp-caption alignleft" style="width: 495px"><img class="size-full wp-image-176" title="Reference" src="http://wulfkat.darkwynter.com/blog/wp-content/uploads/2009/02/hud1.png" alt="Figure 4: Adding an XML Reference" width="485" height="403" /><p class="wp-caption-text">Figure 4: Adding an XML ReferenceFigure 5: Solution Explorer with XML Reference</p></div></p>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://wulfkat.darkwynter.com/blog/?feed=rss2&amp;p=9</wfw:commentRss>
		</item>
	</channel>
</rss>
