<?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>All Things IT Blog &#187; XNA</title>
	<atom:link href="http://www.enusbaum.com/blog/tag/xna/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.enusbaum.com/blog</link>
	<description>My little nerded out corner of the Internets!</description>
	<lastBuildDate>Tue, 18 Oct 2011 20:22:58 +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>2D WndrPong! using the Microsoft XNA Game Studio v2.0!</title>
		<link>http://www.enusbaum.com/blog/2007/12/2d-wndrpong-using-the-microsoft-xna-game-studio-v20/</link>
		<comments>http://www.enusbaum.com/blog/2007/12/2d-wndrpong-using-the-microsoft-xna-game-studio-v20/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 00:28:04 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[C# Programming]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Microsoft XNA]]></category>
		<category><![CDATA[2D Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Pong!]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.enusbaum.com/blog/2007/12/28/2d-wndrpong-using-the-microsoft-xna-game-studio-v20/</guid>
		<description><![CDATA[I decided to take some time this weekend to sit down and learn what I could about the latest release of Microsoft&#8217;s XNA Game Studio. I started out with a book I purchased called Microsoft XNA Game Studio Creators Guide, which turned out to be a terrible book. Most of the examples in this book [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to take some time this weekend to sit down and learn what I could about the latest release of Microsoft&#8217;s <a href="http://www.xna.com/" title="Link -- Microsoft XNA Game Studio Website" target="_blank">XNA Game Studio</a>. I started out with a book I purchased called <a href="http://www.amazon.com/Microsoft%C2%AE-Game-Studio-Creators-Guide/dp/007149071X/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1198886266&amp;sr=8-1" title="Link to the worst book on XNA ever printed, ever." target="_blank">Microsoft XNA Game Studio Creators Guide</a>, which turned out to be a terrible book. Most of the examples in this book assume that you&#8217;re starting with a project the book provides on a Website, which already has hundreds of lines of code, custom shaders and everything built in&#8230; without even explaining how the code is working in the background.</p>
<p>After fumbling around with that for an hour or so an only succeeding in creating a small square on the screen, I headed over to Microsoft.com to see if any MSDN articles might exist to help me along in my &#8216;ground up&#8217; learning of XNA.  I was pleasantly surprised when I found a great article titled &#8220;<a href="http://msdn2.microsoft.com/en-us/library/bb203893.aspx" title="Best Starter Article ever for XNA :)" target="_blank">Your First Game: Microsoft XNA Game Studio in 2D</a>&#8220;. This was EXACTLY what I was looking for as it starts from the ground up, assuming the reader has never done game programming before, let alone 3D game programming. <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The example provided my Microsoft in this article is a simple 2D Texture of a cat that bounces around the window. I was so pleased with the ease of coding this, I thought to myself, &#8220;Heck, how hard could it be to recreate Pong?&#8221; <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So I set upon my task.</p>
<p>Several hours and many Coca-Cola bottles later I had not only my first XNA game <a href="http://www.enusbaum.com/blog//blog/wp-content/uploads/2007/12/wndrpong.thumbnail.gif" title="2D WndrPong! running in Windows" target="_blank">running in Windows</a>, but after purchasing the XNA Creators Club annual subscription from the XBox Live! marketplace for $99, I had it <a href="http://www.enusbaum.com/blog//blog/wp-content/uploads/2007/12/wndrpong_tv.jpg" title="2D WndrPong! running on the XBox 360!" target="_blank">running on my XBox 360</a> as well <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I decided to take a little extra time and add a debug information screen as well as a small welcome screen <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Controls (PC):</strong></p>
<p>Up/Down for Player 1 Paddle (Left): Q/A</p>
<p>Up/Down for Player 2 Paddle (Right): Up Arrow/Down Arrow</p>
<p>Debug Information: F1</p>
<p><strong>Controls (XBox 360):</strong></p>
<p>Up/Down for Player 1 Paddle (Left): Left Thumbstick on Player 1 Remote</p>
<p>Up/Down for Player 2 Paddle (Right): Left Thumbstick on Player 2 Remote</p>
<p>I did run into a couple of &#8216;gotchas!&#8217; while working with Game Studio. The major one I had trouble with was when you&#8217;re developing for the XBox 360 you have to account for <a href="http://en.wikipedia.org/wiki/Overscan" title="Link -- Wikipedia Article on Overscan" target="_blank">overscan</a> on the Television and have your game render within the &#8216;<a href="http://en.wikipedia.org/wiki/Safe_area" title="Link -- Wikipedia Article on Safe Area" target="_blank">Safe Area</a>&#8216;. I noticed that when I was playing my Pong! game on my LCD TV at 720p, the edges of the game were cut off and it looked like it was stretched past the borders of my TV. After asking the fine folks in #XNA on IRC about this issue, they were able to help me out. Now I have my Pong! game account for this by setting up an XBox 360 macro which pads the edges of the play area by 50 pixels.</p>
<p>I&#8217;m including the Source Code for my version of Pong! which I&#8217;ve titled, &#8220;2D WndrPong!&#8221;. You can work in XNA Game Studio for free using <a href="http://msdn2.microsoft.com/en-us/express/aa975050.aspx" title="Link -- Microsoft.com Visual C# 2005 Express Edition" target="_blank">Visual C# 2005 Express Edition</a> along with <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=DF80D533-BA87-40B4-ABE2-1EF12EA506B7&amp;displaylang=en" title="Link -- Microsoft.com XNA Game Studio 2.0 Install" target="_blank">XNA Game Studio 2.0</a> <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  To deploy your games to an XBox 360, you must pair your XBox with your PC  (using the &#8220;XNA Game Studio Device Center&#8221; tool)  then you must purchase an XNA Creators Club Membership from the XBox 360 Marketplace. I believe the prices are $49.99 for 3 Months, $99.99 for a year. I opted for the entire year since I know it&#8217;s going to take me some time to learn <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Baby Steps <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>2D WndrPong! Source Code</strong> &#8211; <a href="http://www.enusbaum.com/blog//blog/wp-content/uploads/2007/12/2d_wndrpong.zip" title="Link -- Download Link to 2D WndrPong!" target="_blank">Download</a> (36k)</p>
<div class="su-linkbox" id="post-69-linkbox"><div class="su-linkbox-label">Link to this post!</div><div class="su-linkbox-field"><input type="text" value="&lt;a href=&quot;http://www.enusbaum.com/blog/2007/12/2d-wndrpong-using-the-microsoft-xna-game-studio-v20/&quot;&gt;2D WndrPong! using the Microsoft XNA Game Studio v2.0!&lt;/a&gt;" onclick="javascript:this.select()" readonly="readonly" style="width: 100%;" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.enusbaum.com/blog/2007/12/2d-wndrpong-using-the-microsoft-xna-game-studio-v20/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

