<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shyam Guthikonda &#187; xna</title>
	<atom:link href="http://www.shy.am/tag/xna/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shy.am</link>
	<description>Game Programmer - http://shy.am</description>
	<lastBuildDate>Thu, 29 Jul 2010 15:52:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>XNA DebugOverlay Utility</title>
		<link>http://www.shy.am/2009/11/xna-debugoverlay-utility/</link>
		<comments>http://www.shy.am/2009/11/xna-debugoverlay-utility/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 03:20:38 +0000</pubDate>
		<dc:creator>shyam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://www.shy.am/?p=1121</guid>
		<description><![CDATA[The DebugOverlay utility is a class that I&#8217;ve been using in my XNA projects for a while. It allows me to draw visualization objects from anywhere in my application &#8211; even in separate threads. Some areas where I have used this utility are: The AI system can display a units&#8217; velocity and position through Lines, [...]]]></description>
			<content:encoded><![CDATA[<p>The DebugOverlay utility is a class that I&#8217;ve been using in my XNA projects for a while. It allows me to draw visualization objects from <em>anywhere</em> in my application &#8211; even in separate threads.</p>
<p>Some areas where I have used this utility are:</p>
<ul>
<li>The AI system can display a units&#8217; velocity and position through Lines, Arrows, and Spheres. Use ScreenText to show the current state or goal hierarchy of a given unit.</li>
<li>The Physics system can use bounding boxes and spheres to show collision volumes. Points can be used to show raycast intersections or points of impact.</li>
<li>The Graphics system can use Spheres, Lines, and Arrows to show the position and direction of lights.</li>
<li>The Editor (or other tools) can use Lines, Arrows, and Bounding Boxes for axis representation during translate/rotate/scale.</li>
<li>Vertex Display &#8211; For a software-based skinning implementation, I used Points to visualize the locations of my vertices, and Spheres for the locations of the bones. It&#8217;s possible to use Spheres for everything, but thousands of Spheres can get a little expensive.</li>
</ul>
<p>This utility is only meant for Debug purposes, and therefore uses the [Conditional("DEBUG")] tag on each of it&#8217;s exposed methods.</p>
<p>To use the DebugOverlay, create the object during Initialization:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">new</span> DebugOverlay<span style="color: #000000;">&#40;</span>GraphicsDevice, Content<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>Call the visualization functions from anywhere in your code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">void</span> ScreenText<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> text, Vector2 pos, Color c<span style="color: #000000;">&#41;</span>
<span style="color: #0600FF;">void</span> Line<span style="color: #000000;">&#40;</span>Vector3 start, Vector3 end, Color color<span style="color: #000000;">&#41;</span>
<span style="color: #0600FF;">void</span> Arrow<span style="color: #000000;">&#40;</span>Vector3 start, Vector3 end, <span style="color: #FF0000;">float</span> arrowSize, Color color<span style="color: #000000;">&#41;</span>
<span style="color: #0600FF;">void</span> BoundingBox<span style="color: #000000;">&#40;</span>BoundingBox boundingBox, Color color<span style="color: #000000;">&#41;</span>
<span style="color: #0600FF;">void</span> Point<span style="color: #000000;">&#40;</span>Vector3 pos, Color color<span style="color: #000000;">&#41;</span>
<span style="color: #0600FF;">void</span> Sphere<span style="color: #000000;">&#40;</span>Vector3 pos, <span style="color: #FF0000;">float</span> radius, Color color<span style="color: #000000;">&#41;</span></pre></td></tr></table></div>

<p>In your Draw routine, call the DebugOverlay.Draw method, passing in the projection and view matrices:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">DebugOverlay.<span style="color: #0000FF;">Singleton</span>.<span style="color: #0000FF;">Draw</span><span style="color: #000000;">&#40;</span>mCamera.<span style="color: #0000FF;">ProjectionMatrix</span>, mCamera.<span style="color: #0000FF;">ViewMatrix</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>I made a small sample application to show off the functionality. Below is a screenshot and the complete source code.</p>

<div class="ngg-galleryoverview" id="ngg-gallery-63-1121">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-840" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.shy.am/wp-content/gallery/20091121_debugoverlaydemo/debugoverlaydemo.png" title=" " class="shutterset_set_63" >
								<img title="debugoverlaydemo" alt="debugoverlaydemo" src="http://www.shy.am/wp-content/gallery/20091121_debugoverlaydemo/thumbs/thumbs_debugoverlaydemo.png" width="95" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<p><strong>Download: </strong><a href="http://shy.am/codedump/DebugOverlayDemo.zip">source + demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shy.am/2009/11/xna-debugoverlay-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Artemis Chronicle Tools</title>
		<link>http://www.shy.am/2009/08/artemis-chronicle-tools/</link>
		<comments>http://www.shy.am/2009/08/artemis-chronicle-tools/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 17:41:46 +0000</pubDate>
		<dc:creator>shyam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[360]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[gamedev]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://www.shy.am/?p=909</guid>
		<description><![CDATA[During the first semester of working on NitroX and Artemis Chronicle, our design and content pipeline was very slow. Simple things like creating a level and placing a box were arduous tasks. Placing an item involved flying the camera around the level, writing down it&#8217;s rough coordinates, hard coding the coordinates, and then tweak these [...]]]></description>
			<content:encoded><![CDATA[<p>During the first semester of working on NitroX and Artemis Chronicle, our design and content pipeline was very slow. Simple things like creating a level and placing a box were arduous tasks. Placing an item involved flying the camera around the level, writing down it&#8217;s rough coordinates, hard coding the coordinates, and then tweak these values until the box is in the desired position. (Thankfully, we were using C# which pretty much eliminated any compile time. Doing this in C++ would have been impossible).</p>
<p>This created a situation where we were unable to prototype levels quickly, and time that could be better used somewhere else was being wasted.</p>
<p>Because of this, I devoted the first few weeks of the second semester to full-time tool development. Two of the more useful tools created are described below. These tools, once created, were continuously used and refined throughout the entire life of the project.</p>
<p><strong>Level Editor</strong>:</p>
<p>Artemis Chronicle and the NitroX engine have a completely integrated level editor. The editor allows 3D navigation through the world (using Maya camera controls), object placement (translation, rotation, scale), object property exposure (including physics volumes), trigger volumes (used for scripted events), and interactive camera sequencing (allows us to create cut-scenes and cinematics in a point-and-click fashion instead of in code).</p>
<p>The editor runs on Windows and is written in C#, allowing for close integration into the XNA content pipeline. The editor data is serialized out to an XML format (which is later compressed for application deployment), sent through the content pipeline, and imported directly into the NitroX engine for use on both Windows and Xbox 360.</p>
<p><strong>Mesh Viewer</strong>:</p>
<p>The Mesh Viewer is a tool that lets our artists quickly preview their work before sending it off to be integrated into the latest build of the game. As anyone who&#8217;s used the FBX exporter knows, exporting from Maya does not always go smoothly, so this tool allows the artist to catch any errors early, thus saving time for the entire team.</p>
<p>Animations can be chained together to create sequences, and then previewed in a real-time manner. Playback speed, blending parameters, and looping can also be adjusted via the user interface.</p>

<div class="ngg-galleryoverview" id="ngg-gallery-56-909">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-782" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/00.jpg" title="Scene navigation." class="shutterset_set_56" >
								<img title="00" alt="00" src="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/thumbs/thumbs_00.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-783" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/01.jpg" title="Camera sequence scripting and cinematics." class="shutterset_set_56" >
								<img title="01" alt="01" src="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/thumbs/thumbs_01.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-784" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/02.jpg" title="Trigger volumes and scripting." class="shutterset_set_56" >
								<img title="02" alt="02" src="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/thumbs/thumbs_02.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-785" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/03.jpg" title="Object placement." class="shutterset_set_56" >
								<img title="03" alt="03" src="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/thumbs/thumbs_03.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-786" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/04.jpg" title="Scripting." class="shutterset_set_56" >
								<img title="04" alt="04" src="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/thumbs/thumbs_04.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-787" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/05.jpg" title="Object selection." class="shutterset_set_56" >
								<img title="05" alt="05" src="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/thumbs/thumbs_05.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-788" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/07.jpg" title="Mesh Viewer." class="shutterset_set_56" >
								<img title="07" alt="07" src="http://www.shy.am/wp-content/gallery/portfolio_ac_tools/thumbs/thumbs_07.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.shy.am/2009/08/artemis-chronicle-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
