<?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>EdAndersen.com &#187; XNA</title>
	<atom:link href="http://www.edandersen.com/category/xna/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edandersen.com</link>
	<description>Ed Andersen&#039;s musings</description>
	<lastBuildDate>Thu, 22 Jul 2010 10:50:49 +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>Avatar Kart update</title>
		<link>http://www.edandersen.com/2009/08/01/avatar-kart-update/</link>
		<comments>http://www.edandersen.com/2009/08/01/avatar-kart-update/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 17:18:59 +0000</pubDate>
		<dc:creator>Ed Andersen</dc:creator>
				<category><![CDATA[Avatar Kart]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.edandersen.com/2009/08/01/avatar-kart-update/</guid>
		<description><![CDATA[Finally in playtest on Xbox Indie Games, Avatar Kart now has: 8 CPU racers Avatars sit down and actually steer their cars Race restarting Cool loading animation Drift handling improvements Done some optimisation to get the framerate to a steady 60FPS, definitely still much more I could do. The floating point performance on the 360’s <a href="http://www.edandersen.com/2009/08/01/avatar-kart-update/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Finally in playtest on Xbox Indie Games, Avatar Kart now has:</p>
<ul>
<li>8 CPU racers</li>
<li>Avatars sit down and actually steer their cars</li>
<li>Race restarting</li>
<li>Cool loading animation</li>
<li>Drift handling improvements</li>
</ul>
<p>Done some optimisation to get the framerate to a steady 60FPS, definitely still much more I could do. The floating point performance on the 360’s .NET Compact Framework is pretty dire..</p>
<p align="center"><a href="http://www.edandersen.com/wp-content/uploads/2009/08/ed7.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Ed-7" border="0" alt="Ed-7" src="http://www.edandersen.com/wp-content/uploads/2009/08/ed7-thumb.png" width="244" height="139" /></a>&#160; <a href="http://www.edandersen.com/wp-content/uploads/2009/08/ed8.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Ed-8" border="0" alt="Ed-8" src="http://www.edandersen.com/wp-content/uploads/2009/08/ed8-thumb.png" width="244" height="139" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edandersen.com/2009/08/01/avatar-kart-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA QR Codes</title>
		<link>http://www.edandersen.com/2009/07/03/xna-qr-codes/</link>
		<comments>http://www.edandersen.com/2009/07/03/xna-qr-codes/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 13:20:33 +0000</pubDate>
		<dc:creator>Ed Andersen</dc:creator>
				<category><![CDATA[Mobiles]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.edandersen.com/2009/07/03/xna-qr-codes/</guid>
		<description><![CDATA[I’ve just pieced together a renderer for QR codes that outputs a texture instead of System.Drawing.Image objects (the Xbox .Net Framework version does not have access to the Drawing namespace). I’ll be using this as a way of uploading times on Avatar Kart to my server instead of copying a code which you had to <a href="http://www.edandersen.com/2009/07/03/xna-qr-codes/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.edandersen.com/wp-content/uploads/2009/07/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.edandersen.com/wp-content/uploads/2009/07/image-thumb.png" width="178" height="240" /></a>I’ve just pieced together a renderer for QR codes that outputs a texture instead of System.Drawing.Image objects (the Xbox .Net Framework version does not have access to the Drawing namespace). I’ll be using this as a way of uploading times on Avatar Kart to my server instead of copying a code which you had to do in Lines, my previous game. I will release the code once I’ve tidied it up a bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edandersen.com/2009/07/03/xna-qr-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avatar Kart &#8211; now with avatars!</title>
		<link>http://www.edandersen.com/2009/06/16/avatar-kart-now-with-avatars/</link>
		<comments>http://www.edandersen.com/2009/06/16/avatar-kart-now-with-avatars/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 04:24:30 +0000</pubDate>
		<dc:creator>Ed Andersen</dc:creator>
				<category><![CDATA[Avatar Kart]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.edandersen.com/2009/06/16/avatar-kart-now-with-avatars/</guid>
		<description><![CDATA[My Avatar Kart game now has: A skybox An original track a floor for the world Debug and chase cameras A starting countdown I also finally got Avatars in the code (Xbox 360 only so no videos yet). Microsoft has not decided to release the bones for the avatars, so I cannot do custom animations <a href="http://www.edandersen.com/2009/06/16/avatar-kart-now-with-avatars/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>My Avatar Kart game now has:</p>
<ul>
<li>A skybox</li>
<li>An original track</li>
<li>a floor for the world</li>
<li>Debug and chase cameras</li>
<li>A starting countdown</li>
</ul>
<p>I also finally got Avatars in the code (Xbox 360 only so no videos yet). Microsoft has not decided to release the bones for the avatars, so I cannot do custom animations or poses yet. Therefore they are standing in the karts at the moment…</p>
<p align="center"><a href="http://www.edandersen.com/wp-content/uploads/2009/06/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.edandersen.com/wp-content/uploads/2009/06/image-thumb.png" width="244" height="139" /></a> <a href="http://www.edandersen.com/wp-content/uploads/2009/06/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.edandersen.com/wp-content/uploads/2009/06/image-thumb1.png" width="244" height="139" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edandersen.com/2009/06/16/avatar-kart-now-with-avatars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avatar Kart work in progress</title>
		<link>http://www.edandersen.com/2009/06/01/avatar-kart-work-in-progress/</link>
		<comments>http://www.edandersen.com/2009/06/01/avatar-kart-work-in-progress/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 01:30:34 +0000</pubDate>
		<dc:creator>Ed Andersen</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.edandersen.com/2009/06/01/avatar-kart-work-in-progress/</guid>
		<description><![CDATA[During my down time I’ve been cracking on with XNA and am developing “Avatar Kart” – essentially Super Mario Kart on the SNES with Xbox avatars (we have to wait until XNA Game Studio 3.1 this summer for avatar support). In a couple of days I’ve managed to finish: CPU Car AI Physics and wall <a href="http://www.edandersen.com/2009/06/01/avatar-kart-work-in-progress/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>During my down time I’ve been cracking on with XNA and am developing “Avatar Kart” – essentially Super Mario Kart on the SNES with Xbox avatars (we have to wait until XNA Game Studio 3.1 this summer for avatar support). In a couple of days I’ve managed to finish:</p>
<ul>
<li>CPU Car AI</li>
<li>Physics and wall collisions</li>
<li>Terrain effects</li>
<li>Lap counts and car rankings</li>
<li>Split screen</li>
</ul>
<p>The track is still from SMK and the cars are empty but it does the job. Although its in 3D, I’m trying to get a 2D mode7 type handling feeling, really tight controls and simple graphics. I’ve already hit the performance wall of floating point operations in the compact framework on the Xbox so will need to spend some time optimising later. I will be replacing the Mario Kart track with my own design soon.</p>
<p>Below is a video of how its looking so far: </p>
</p>
<div style="padding-bottom: 0px; margin: 0px auto; padding-left: 0px; width: 425px; padding-right: 0px; display: block; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:44ef4fa3-620b-415e-b633-23ed6a94ed6e" class="wlWriterEditableSmartContent">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/ucEYiSV2R1U&amp;hl=en"></param><embed src="http://www.youtube.com/v/ucEYiSV2R1U&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.edandersen.com/2009/06/01/avatar-kart-work-in-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lines EX &#8211; rebuilding with XNA 3</title>
		<link>http://www.edandersen.com/2008/09/06/lines-ex-rebuilding-with-xna-3/</link>
		<comments>http://www.edandersen.com/2008/09/06/lines-ex-rebuilding-with-xna-3/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 13:22:31 +0000</pubDate>
		<dc:creator>Ed Andersen</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.edandersen.com/2008/09/06/lines-ex-rebuilding-with-xna-3/</guid>
		<description><![CDATA[My dissertation project saw me making an XNA game (Lines) and website to go with it (edngames.com) which used web services to make essentially a cut down Xbox Live on the PC with rich presence support, automatic high score uploading etc. I feel it was very successful (and the markers agreed) but I didn’t get <a href="http://www.edandersen.com/2008/09/06/lines-ex-rebuilding-with-xna-3/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[</p>
<p>My dissertation project saw me making an XNA game (Lines) and website to go with it (<a href="http://www.edngames.com">edngames.com</a>) which used web services to make essentially a cut down Xbox Live on the PC with rich presence support, automatic high score uploading etc. I feel it was very successful (and the markers agreed) but I didn’t get the time to spend on the game portion that I wanted to, instead concentrating mainly on the distribution scenarios and the user experience. With the Xbox Live Community Arcade coming up and the new CTP of XNA 3 released, I thought it would be the right time to rewrite the game using everything I’ve learnt over the last year since I began the project ready for the Community Arcade launch “this fall”.</p>
<p align="center"><a href="http://www.edandersen.com/wp-content/uploads/2008/09/image.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="225" alt="image" src="http://www.edandersen.com/wp-content/uploads/2008/09/image-thumb.png" width="400" border="0" /></a> </p>
<p>Instead of using SpriteBatch, I’ve decided to place 2D flat quads in 3D space. While still getting free rotation, transparency etc, I now get resolution independence and extra effects such as being able to skew sprites. </p>
<p>I already have the main game code so am working on the menu system. By having sprites in a 3D space, changing the camera location means aspect ratio independence too by zooming out or changing the field of view – below shows the main menu in 16:9 and 4:3 (the zooming will work with all aspect ratios meaning no stretching).</p>
<p align="center"><a href="http://www.edandersen.com/wp-content/uploads/2008/09/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="170" alt="image" src="http://www.edandersen.com/wp-content/uploads/2008/09/image-thumb1.png" width="303" border="0" /></a> <a href="http://www.edandersen.com/wp-content/uploads/2008/09/image2.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="170" alt="image" src="http://www.edandersen.com/wp-content/uploads/2008/09/image-thumb2.png" width="216" border="0" /></a></p>
<p>My favourite benefit however is the Smash Bros. style 3D effect you can achieve by moving the camera with the right stick. Completely pointless but very cool and can help you debug the locations of your sprites in the game world.</p>
<p align="center"><a href="http://www.edandersen.com/wp-content/uploads/2008/09/image3.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="223" alt="image" src="http://www.edandersen.com/wp-content/uploads/2008/09/image-thumb3.png" width="400" border="0" /></a> </p>
<p align="left">And yes, I am aware of the hidden word in the title and it is purely accidental <img src='http://www.edandersen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.edandersen.com/2008/09/06/lines-ex-rebuilding-with-xna-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA2.0 Dependency checking</title>
		<link>http://www.edandersen.com/2008/02/23/xna2-0-dependency-checking/</link>
		<comments>http://www.edandersen.com/2008/02/23/xna2-0-dependency-checking/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 18:51:26 +0000</pubDate>
		<dc:creator>Ed Andersen</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.edandersen.com/2008/02/xna2-0-dependency-checking/</guid>
		<description><![CDATA[After a lot of trial and error using Process Monitor and Virtual PC, I have finally sussed out exactly what XNA2.0 games on Windows need to run. The requirements are slightly different to XNA 1 games. Direct X runtimes There are four files that need to be installed in the system32 folder for XNA to <a href="http://www.edandersen.com/2008/02/23/xna2-0-dependency-checking/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>After a lot of trial and error using <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx">Process Monitor</a> and <a href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx">Virtual PC</a>, I have finally sussed out exactly what XNA2.0 games on Windows need to run. The requirements are slightly different to XNA 1 games. </p>
<h4>Direct X runtimes</h4>
<p>There are four files that need to be installed in the system32 folder for XNA to initialise properly. They are:</p>
<ul>
<li>xinput1_3.dll
<li>x3daudio1_3.dll
<li>d3dx9_31.dll, and
<li>xactengine2_9.dll </li>
</ul>
<p>The first three can be placed alongside the application exe and then load fine, but xactengine2_9.dll does not load this way for some reason, and has to be present in the system directory. Distributing these files alongside the application breaks the DirectX EULA, so they have to be installed using dxsetup.exe.</p>
<p>To check the presence in your XNA game, just put this code in Program.cs before game.Run() is called:</p>
<pre class="code"><span style="color: rgb(0,0,255)">bool</span> HasAllPrereqs = <span style="color: rgb(0,0,255)">true</span>;</pre>
<pre class="code"><span style="color: rgb(0,128,0)">// check all the required files, if any missing, return false
</span><span style="color: rgb(0,0,255)">if</span> (!System.IO.<span style="color: rgb(43,145,175)">File</span>.Exists(System.<span style="color: rgb(43,145,175)">Environment</span>.SystemDirectory
    + <span style="color: rgb(163,21,21)">"\\xactengine2_9.dll"</span>)) HasAllPrereqs = <span style="color: rgb(0,0,255)">false</span>;
<span style="color: rgb(0,0,255)">if</span> (!System.IO.<span style="color: rgb(43,145,175)">File</span>.Exists(System.<span style="color: rgb(43,145,175)">Environment</span>.SystemDirectory
    + <span style="color: rgb(163,21,21)">"\\d3dx9_31.dll"</span>)) HasAllPrereqs = <span style="color: rgb(0,0,255)">false</span>;
<span style="color: rgb(0,0,255)">if</span> (!System.IO.<span style="color: rgb(43,145,175)">File</span>.Exists(System.<span style="color: rgb(43,145,175)">Environment</span>.SystemDirectory
    + <span style="color: rgb(163,21,21)">"\\x3daudio1_2.dll"</span>)) HasAllPrereqs = <span style="color: rgb(0,0,255)">false</span>;
<span style="color: rgb(0,0,255)">if</span> (!System.IO.<span style="color: rgb(43,145,175)">File</span>.Exists(System.<span style="color: rgb(43,145,175)">Environment</span>.SystemDirectory
    + <span style="color: rgb(163,21,21)">"\\xinput1_3.dll"</span>)) HasAllPrereqs = <span style="color: rgb(0,0,255)">false</span>;</pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p>If HasAllPrereqs is false after those lines, exit the application before it crashes horribly when XNA tries to initialise. </p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h4>Visual C++ 2005 SP1 runtimes</h4>
<p>Even a fresh Vista install doesn&#8217;t have these. They are provided when updating Visual Studio 2005 to SP1, or installing SP1 of the .Net Framework 2.0. However, Vista comes with SP0 of .Net 2.0, meaning 99% of machines you come across will be lacking what XNA 2.0 needs. There is a 2.5MB standalone installer on the MS download site <a href="http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647">here</a> which installs what you need even on .Net 2.0 SP0 machines. .Net 3.5 installs Net 2.0 SP1.</p>
<p>So if any of the following are installed, we safely have the right Visual C++ 2005 runtimes:</p>
<ul>
<li>.NET Framework 2.0 SP1
<li>.NET Framework 3.5
<li>Visual C++ 2005 SP1 Redistributable </li>
</ul>
<p>By looking up the product codes in the registry, we can also check at runtime if we have the runtimes (again, before game.Run()):</p>
<pre class="code">[<span style="color: rgb(43,145,175)">DllImport</span>(<span style="color: rgb(163,21,21)">"msi.dll"</span>)]
<span style="color: rgb(0,0,255)">public</span> <span style="color: rgb(0,0,255)">static</span> <span style="color: rgb(0,0,255)">extern</span> <span style="color: rgb(43,145,175)">Int32</span> MsiQueryProductState(<span style="color: rgb(0,0,255)">string</span> szProduct);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#8230;goes before the main application entry point, and</p>
<pre class="code"><span style="color: rgb(0,0,255)">bool</span> vccOK = <span style="color: rgb(0,0,255)">false</span>;
<span style="color: rgb(0,128,0)">// check for VC++ 2005 SP1 redist (very rare in the wild)
</span><span style="color: rgb(0,0,255)">if</span> (MsiQueryProductState(
<span style="color: rgb(163,21,21)">"{7299052b-02a4-4627-81f2-1818da5d550d}"</span>) == 5) vccOK = <span style="color: rgb(0,0,255)">true</span>;
<span style="color: rgb(0,128,0)">// check for .NET Framework 2.0 SP1
</span><span style="color: rgb(0,0,255)">if</span> (MsiQueryProductState(
<span style="color: rgb(163,21,21)">"{2FC099BD-AC9B-33EB-809C-D332E1B27C40}"</span>) == 5) vccOK = <span style="color: rgb(0,0,255)">true</span>;
<span style="color: rgb(0,128,0)">// check for .NET Framework 3.5 (includes 2.0 SP1)
</span><span style="color: rgb(0,0,255)">if</span> (MsiQueryProductState(
<span style="color: rgb(163,21,21)">"{B508B3F1-A24A-32C0-B310-85786919EF28}"</span>) == 5) vccOK = <span style="color: rgb(0,0,255)">true</span>;</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>If vccOK is still false, exit the application before you call game.Run().</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edandersen.com/2008/02/23/xna2-0-dependency-checking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
