<?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>Minalien.com &#187; XNA</title>
	<atom:link href="http://minalien.com/tag/xna/feed/" rel="self" type="application/rss+xml" />
	<link>http://minalien.com</link>
	<description>Game Programming Weblog &#38; Portfolio</description>
	<lastBuildDate>Sat, 21 Jan 2012 23:05:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Writing a simple 2D Animation system in XNA</title>
		<link>http://minalien.com/2011/06/writing-a-simple-2d-animation-system-in-xna/</link>
		<comments>http://minalien.com/2011/06/writing-a-simple-2d-animation-system-in-xna/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 06:00:22 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://minalien.com/?p=192</guid>
		<description><![CDATA[A friend of mine recently asked me for some help on 2D animation within XNA, and so I wrote up a quick, and somewhat simplistic, system. Figured it wouldn&#8217;t hurt to go ahead and write up a small tutorial and post it here, since it&#8217;s similar to the animation system that I&#8217;m planning on using in the  [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine recently asked me for some help on 2D animation within XNA, and so I wrote up a quick, and somewhat simplistic, system. Figured it wouldn&#8217;t hurt to go ahead and write up a small tutorial and post it here, since it&#8217;s similar to the animation system that I&#8217;m planning on using in the <em>SFML-Zelda</em> tutorial series (which I&#8217;m planning on picking back up, now that I&#8217;ve returned from my CCNA course).</p>
<p><strong>Downloads</strong><br />
<a href='http://minalien.com/wp-content/uploads/2011/06/AnimationDemo-Bin.zip'>AnimationDemo Binary</a><br />
<a href='http://minalien.com/wp-content/uploads/2011/06/AnimationDemo-Src.zip'>AnimationDemo &#8211; Source</a></p>
<p><strong>Setup</strong><br />
Go ahead and set up an XNA project. The system I&#8217;m showing here is rather simplistic, and has many areas in which it can be improved for efficiency, but this isn&#8217;t something that&#8217;s going to require a complex project setup.</p>
<p><strong>How it will work</strong><br />
This animation system will include a very basic Finite State Machine-style animation, using a single sprite sheet for rendering. While scene objects in this sample only use a single sprite sheet per object, it could be modified so that animation data is stored outside of the scene object, which will pretty much be necessary (you&#8217;ll see why in a minute) for anything more complex than this sample.</p>
<p>Sprite sheets are expected to be set up with each included animation in the sheet containing an equal number of frames. Each animation state gets its own row within the sheet, with each frame of the animation taking up one column per row. Every frame must be the same size, and there is no assumed spacing or borders for the sheet or the frame. The image I am going to use in this sample is a running animation from <em>The Legend of Zelda: A Link To The Past</em>.</p>
<div id="attachment_193" class="wp-caption aligncenter" style="width: 522px"><a href="http://minalien.com/wp-content/uploads/2011/06/link.png" rel="lightbox[192]" title="ALTTP Link"><img src="http://minalien.com/wp-content/uploads/2011/06/link.png" alt="" title="ALTTP Link" width="512" height="256" class="size-full wp-image-193" /></a><p class="wp-caption-text">Fig 1: Sample Animation Sheet</p></div>
]]></content:encoded>
			<wfw:commentRss>http://minalien.com/2011/06/writing-a-simple-2d-animation-system-in-xna/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

