<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>Nick's Code</title>
	<link>http://nick.gravelyn.com</link>
	<description></description>
	<pubDate>Wed, 02 Jul 2008 06:51:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>An Idea of Game Packs</title>
		<link>http://nick.gravelyn.com/2008/07/01/an-idea-of-game-packs/</link>
		<comments>http://nick.gravelyn.com/2008/07/01/an-idea-of-game-packs/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 06:51:47 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[XNA]]></category>

		<category><![CDATA[Zune]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/07/01/an-idea-of-game-packs/</guid>
		<description><![CDATA[According to the Rules of XNA, you are only allowed to call the Run method of the Game class once. No matter how many Game objects you instantiate, you only can call Run once lest you get an InvalidOperationException. However the other day I began to wonder how one could work around this.
So I set [...]]]></description>
			<content:encoded><![CDATA[<p>According to the <em>Rules of XNA</em>, you are only allowed to call the Run method of the Game class once. No matter how many Game objects you instantiate, you only can call Run once lest you get an InvalidOperationException. However the other day I began to wonder how one could work around this.</p>
<p>So I set off with my Zune attempting such a feat. After a few hours and some fun little tricks, I was able to ping-pong between a bootstrapper application (no XNA used), a game launcher application (XNA GUI interface), and any number of Zune games I wanted. What this means is that I can create a single game package for the Zune that includes any number of games and the user never has to actually reboot the Zune.</p>
<p>However this post isn&#8217;t really about the Zune at all. That was just the first platform I tried it on. My thoughts extend beyond this, though. What about multi-game packs for Xbox 360? You could argue, &#8220;But Nick, you can just make each &#8216;game&#8217; a piece of one big game and not deal with all this rigamarole!&#8221; and to that I say &#8220;Sure, you could.&#8221; However my argument is this: What if you (and others) create a bunch of standalone games for the Xbox 360 and release them. Now it&#8217;s the future and let&#8217;s say you want to bundle them all up and release it as a single pack. To meet the &#8220;one big game&#8221; criteria, you have some decent work tying it all together and making sure it all plays nice. What I&#8217;m proposing, though, would allow you to just input the previously built games, build the launcher UI, and you&#8217;re done. No source changes required for the original games</p>
<p>Of course I still have to test on the Xbox 360, but if it worked on the Zune (which runs a similar version of the .NET CF) I have to assume it would also work on the Xbox 360. I might give a prototype a try and see how it goes. Make a pack of mini games and submit it to the XNA Community Games beta or something. Who knows. I just found it to be an interesting idea that actually is possible. What to do with it, if anything, is a whole new discussion.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/07/01/an-idea-of-game-packs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Creatures</title>
		<link>http://nick.gravelyn.com/2008/06/27/my-creatures/</link>
		<comments>http://nick.gravelyn.com/2008/06/27/my-creatures/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 01:55:03 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/27/my-creatures/</guid>
		<description><![CDATA[I did download the Spore Creature Creator demo. No, I will not spend $10 on a demo. The free demo is just as good. I&#8217;ll save my $10 for the real game.
Anyway, I whipped up a couple of little creatures and figured why not share them with the world? They&#8217;re nothing all that special, but [...]]]></description>
			<content:encoded><![CDATA[<p>I did download the Spore Creature Creator demo. No, I will not spend $10 on a demo. The free demo is just as good. I&#8217;ll save my $10 for the real game.</p>
<p>Anyway, I whipped up a couple of little creatures and figured why not share them with the world? They&#8217;re nothing all that special, but I think they&#8217;re each cool. So here are those magical PNG files you can just drag into the game to import them. I would love to see a read up from the developers on who thought of that and exactly how it all works.</p>
<p align="center">&nbsp;</p>
<p style="text-align: center" align="center"><img src="/images/spore/Javen.png" /><img src="/images/spore/Parmon.png" /></p>
<p align="center">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/27/my-creatures/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Research</title>
		<link>http://nick.gravelyn.com/2008/06/27/research/</link>
		<comments>http://nick.gravelyn.com/2008/06/27/research/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 20:04:36 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[Industry]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/27/research/</guid>
		<description><![CDATA[I&#8217;ve started playing around with searching for trademarks, patents, and copyrights for various games and ideas to see what is and isn&#8217;t covered already. So far nothing really interesting (I just mainly wanted to share those links for others to use), but I did find one curious item. The name &#8220;Tower Defense&#8221; is actually trademarked [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started playing around with searching for <a href="http://www.uspto.gov/main/trademarks.htm">trademarks</a>, <a href="http://www.uspto.gov/patft/">patents</a>, and <a href="http://www.copyright.gov/records/">copyrights</a> for various games and ideas to see what is and isn&#8217;t covered already. So far nothing really interesting (I just mainly wanted to share those links for others to use), but I did find one curious item. The name &#8220;Tower Defense&#8221; is actually <a href="http://tess2.uspto.gov/bin/showfield?f=doc&amp;state=s66um5.2.1">trademarked by a company in South Korea</a>.</p>
<p>Seems interesting. It was only granted recently (June 3, 2008) but I wonder how long it will stick. Afterall, if the company doesn&#8217;t enforce their trademark against the literal dozens of games online using &#8220;Tower Defense&#8221; in the name, can the trademark actually be upheld? I&#8217;m no lawyer but I remember being told that the key with trademarks is that if you don&#8217;t enforce them, you lose them. Seems that this companyhas some work to do if that is the case.</p>
<p>Now back to random searching. <img src='http://nick.gravelyn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Edit: It also appears that <a href="http://www.valvesoftware.com/">Valve</a> owns the <a href="http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&amp;Sect2=HITOFF&amp;u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&amp;r=21&amp;f=G&amp;l=50&amp;d=PTXT&amp;p=1&amp;p=1&amp;S1=%22video+game%22&amp;OS=%22video+game%22&amp;RS=%22video+game%22">patent for generating virtual eyes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/27/research/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zune Performance</title>
		<link>http://nick.gravelyn.com/2008/06/20/zune-performance/</link>
		<comments>http://nick.gravelyn.com/2008/06/20/zune-performance/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 18:37:26 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[XNA]]></category>

		<category><![CDATA[Zune]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/20/zune-performance/</guid>
		<description><![CDATA[Michael Klucher, a program manager on the XNA team, made a great blog post this morning about Zune performance in regards to the differences between the 30GB model (generation 1) and the 4/8/80GB models (generation 2).
It&#8217;s great to finally have an answer, even if it&#8217;s that the Zune is being limited to save battery power. [...]]]></description>
			<content:encoded><![CDATA[<p>Michael Klucher, a program manager on the XNA team, made a <a href="http://klucher.com/archive/2008/06/20/zune-performance-between-zune-30-and-zune-4-8-and-80.aspx">great blog post</a> this morning about Zune performance in regards to the differences between the 30GB model (generation 1) and the 4/8/80GB models (generation 2).</p>
<p>It&#8217;s great to finally have an answer, even if it&#8217;s that the Zune is being limited to save battery power. While great for the general Zune media functionality, it&#8217;d be nice for games to have more power. So in the usual rally of &#8220;customers drive software&#8221;, I&#8217;ve created a Connect suggestion that games should be able to request that these features be turned off so as to gain those clock cycles and faster refresh rate. You can go ahead and see there here: <a href="https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=352193&amp;SiteID=226">https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=352193&amp;SiteID=226</a>.</p>
<p>If you want to make Zune games and want to see this get changed, please register at that site and vote on the issue to let Microsoft know that this is important to us, especially the developers looking to start making more and more advanced games for the Zune where every cycle is valuable.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/20/zune-performance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;m a Convert</title>
		<link>http://nick.gravelyn.com/2008/06/19/im-a-convert/</link>
		<comments>http://nick.gravelyn.com/2008/06/19/im-a-convert/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 05:37:06 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/19/im-a-convert/</guid>
		<description><![CDATA[I&#8217;m switching over! To FRAPS that is. A while back I had a discussion in IRC about screen capture and was told that FRAPS would give me a better video quality and let me easily record my game&#8217;s audio. Initially I was skeptical because I had already tried tons of screen capture software and was [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m switching over! To <a href="http://www.fraps.com/">FRAPS</a> that is. A while back I had a discussion in IRC about screen capture and was told that FRAPS would give me a better video quality and let me easily record my game&#8217;s audio. Initially I was skeptical because I had already tried tons of screen capture software and was really happy with HyperCam. But then I tried FRAPS&#8230;</p>
<p>It&#8217;s really nice :). <a href="http://www.hyperionics.com">HyperCam</a> is still far superior for tutorials and things because it&#8217;s more lightweight making it better for long videos. Not to mention FRAPS only works for games. But if you need to record some gameplay, better believe that FRAPS is a great way to capture your video and audio.</p>
<p>I then usually will take that output (a rather large AVI file) into <a href="http://www.virtualdub.org/">VirtualDub</a> with the <a href="http://www.xvid.org/">Xvid Codec</a> and shrink it down. Usually it turns a 500+MB video into a 20MB video. It&#8217;s that good.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/19/im-a-convert/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Releasing Zune Games Sans Source</title>
		<link>http://nick.gravelyn.com/2008/06/19/releasing-zune-games-sans-source/</link>
		<comments>http://nick.gravelyn.com/2008/06/19/releasing-zune-games-sans-source/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 20:54:56 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[XNA]]></category>

		<category><![CDATA[Zune]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/19/releasing-zune-games-sans-source/</guid>
		<description><![CDATA[As some of you may have noticed, my Repeater Zune game is completely devoid of any game source code or assets. The reason being that it was an experiment mostly. People are getting to a point where they have games they want to release, but don&#8217;t want others messing with or redistributing as their own. [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you may have noticed, my <a href="http://nick.gravelyn.com/2008/06/18/repeater/">Repeater</a> Zune game is completely devoid of any game source code or assets. The reason being that it was an experiment mostly. People are getting to a point where they have games they want to release, but don&#8217;t want others messing with or redistributing as their own. So I took some time the other day and figured out just how to do that. Here&#8217;s the high-level steps taken to produce <a href="http://nick.gravelyn.com/2008/06/18/repeater/">Repeater</a>.</p>
<p>1)  Write the entire game like normal. I created a single Windows game project and made the whole game. Then I used the &#8220;Create copy of project for Zune&#8221; option and made the Zune version.</p>
<p>2) Build the game and extract the compiled content. Basically just build your game like normal and go into the bin/Zune/Release directory and find all the content. Take that stuff out and place it somewhere else. We&#8217;ll need that in a minute.</p>
<p>3) Create a second project in Visual Studio (either in the same solution or a new one). This should be a Zune Game Library project. Place all of your game&#8217;s code except for Program.cs into this new project.</p>
<p>4) Create a new Resources file for your library project. Right click on your game project in Visual Studio and go to Properties. Click the Resources tab. Then click the text in the pane to create a new resources file. Now drag in all the built content you had create earlier into this.</p>
<p>5) Go into your game class and create a new ResourceContentManager.You pass in the Game.Services collection for the first argument and then your library&#8217;s resource manager next. Then we can use some reflection to assign our new ContentManager as the game&#8217;s content manager (since the Game.Contnet property is get-only). Assuming your library project&#8217;s name is ZuneLibrary1 then that code looks like this:</p>
<pre>public Game1
{
    //all that other constructor stuff

    ResourceContentManager content = new ResourceContentManager(
             Services,
             ZuneLibrary1.Properties.ResourceManager);

    FieldInfo contentField = typeof(Game).GetField(
             "content",
             BindingFlags.NonPublic | BindingFlags.Instance);
    contentField.SetValue(this, content);
}</pre>
<p>The reason we want to set the content field to our new instance is so that every place we use the Game.Content property will now use our ResourceContentManager instead.</p>
<p>6) Next make sure all of your load methods take into account that the directory structure has potentially changed. For instance I put all of my files into the resources file without subdirectories so I had to remove those in my code.</p>
<p>7) Now build this project and get the DLL file it makes. This DLL now contains (internally) all of the XNB content files and classes for your game.</p>
<p>8 ) Place this DLL in your game project&#8217;s folder and add it as a reference to your game project in Visual Studio. Now your game should compile and run just like normal, but now all of your source code and assets are hidden.</p>
<p>Of course, as with anything, there is a downside. If you read <a href="http://blogs.msdn.com/shawnhar/archive/2007/06/12/embedding-content-as-resources.aspx">this post</a> by Shawn Hargreaves (of the XNA team) you&#8217;ll find there is a significant downside to this for some games:</p>
<blockquote><p>There is one major downside to embedding content as assembly resources, however. The entire assembly (including resource data) will be loaded into memory in one go, and the CLR does not provide any way to unload assemblies other than by unloading the entire AppDomain.</p></blockquote>
<p>What this means for Zune game development is that if your entire game (code and assets) is less than 16MB, this is fine. If, on the other hand, you need to be able to dynamically load and unload assets to stay in this limit, this solution won&#8217;t work for you. But for small Zune games, most people will be fine staying under 16MB I would imagine.</p>
<p>There you go all you closed-source people. Hopefully this helps you all out. Now go forth and make some cool Zune games!</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/19/releasing-zune-games-sans-source/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Repeater!</title>
		<link>http://nick.gravelyn.com/2008/06/18/repeater/</link>
		<comments>http://nick.gravelyn.com/2008/06/18/repeater/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 05:35:17 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[XNA]]></category>

		<category><![CDATA[Zune]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/18/repeater/</guid>
		<description><![CDATA[I&#8217;m proud to announce my third little Zune game: Repeater. Repeater is a basic electronic version of a classic pattern matching game. In this game you use the DPad to see how long you can last against a relentless AI determined to wear you out.
This is a simple game with no options and nothing fancy. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m proud to announce my third little Zune game: Repeater. Repeater is a basic electronic version of a <a href="http://upload.wikimedia.org/wikipedia/commons/4/41/Simon_game.jpg">classic pattern matching game</a>. In this game you use the DPad to see how long you can last against a relentless AI determined to wear you out.</p>
<p><center><img src="http://nick.gravelyn.com/images/repeater.png" alt="Repeater Screenshot" /></center>This is a simple game with no options and nothing fancy. But it&#8217;s definitely an enjoyable little experience. Grab the download here and let me know what you think: <a href="http://nick.gravelyn.com/Download.php?id=9">Repeater.zip</a>.</p>
<hr />
<h3>Donations</h3>
<p>Help support this site and future Zune game development by considering a small donation:</p>
<p><center><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" value="_donations" type="hidden" />
<input name="business" value="nickgravelyn@gmail.com" type="hidden" />
<input name="item_name" value="Nick Gravelyn (Blog, Games, Wiki, Samples, Tutorials)" type="hidden" />
<input name="no_shipping" value="0" type="hidden" />
<input name="no_note" value="1" type="hidden" />
<input name="currency_code" value="USD" type="hidden" />
<input name="tax" value="0" type="hidden" />
<input name="lc" value="US" type="hidden" />
<input name="bn" value="PP-DonationsBF" type="hidden" />
<input src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" border="0" type="image" /> <img src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" width="1" height="1" /> </form>
<p> </center></p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/18/repeater/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Too Much Fun</title>
		<link>http://nick.gravelyn.com/2008/06/18/too-much-fun/</link>
		<comments>http://nick.gravelyn.com/2008/06/18/too-much-fun/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 03:48:48 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/18/too-much-fun/</guid>
		<description><![CDATA[Silverlight is just a ton of fun. I&#8217;m trying to learn more and more so I can start making more advanced games with it. This time I took a shot playing with Expression Blend and set up more of an event-driven game: Rock, Paper, Scissors. This one&#8217;s complete with some AI and everything. We&#8217;ll see [...]]]></description>
			<content:encoded><![CDATA[<p>Silverlight is just a ton of fun. I&#8217;m trying to learn more and more so I can start making more advanced games with it. This time I took a shot playing with Expression Blend and set up more of an event-driven game: Rock, Paper, Scissors. This one&#8217;s complete with some AI and everything. We&#8217;ll see what project I take on next.</p>
<p><center><iframe width="400px" height="300px" src="http://nick.gravelyn.com/silverlight/RPS/RPS.html"></iframe></center></p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/18/too-much-fun/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Teh Internetz in Three Dee</title>
		<link>http://nick.gravelyn.com/2008/06/18/teh-internetz-in-three-dee/</link>
		<comments>http://nick.gravelyn.com/2008/06/18/teh-internetz-in-three-dee/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 23:01:41 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/18/teh-internetz-in-three-dee/</guid>
		<description><![CDATA[Spent a little bit today and tried to get my raycaster working in Silverlight&#8230; and it does :). Beautifully as you can see below. Click on the app and use WASD to move and look around.

]]></description>
			<content:encoded><![CDATA[<p>Spent a little bit today and tried to get my raycaster working in Silverlight&#8230; and it does :). Beautifully as you can see below. Click on the app and use WASD to move and look around.</p>
<p><center><iframe width="320" height="240" src="http://nick.gravelyn.com/silverlight/SilverRays/TestPage.html"></iframe></center></p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/18/teh-internetz-in-three-dee/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Embedding Silverlight!</title>
		<link>http://nick.gravelyn.com/2008/06/18/embedding-silverlight/</link>
		<comments>http://nick.gravelyn.com/2008/06/18/embedding-silverlight/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 20:35:06 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
		
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://nick.gravelyn.com/2008/06/18/embedding-silverlight/</guid>
		<description><![CDATA[Today I made my morning goal to be figuring out how to embed my Silverlight app wherever I wanted. Well, I&#8217;m about an hour and a half late, but I did get it:
(click app to give focus, use arrow keys to fly around)

Pretty fun stuff so far.
]]></description>
			<content:encoded><![CDATA[<p>Today I made my morning goal to be figuring out how to embed my Silverlight app wherever I wanted. Well, I&#8217;m about an hour and a half late, but I did get it:</p>
<p>(click app to give focus, use arrow keys to fly around)<br />
<center><iframe width="300px" height="300px" src="http://nick.gravelyn.com/silverlight/FirstEmbeded/TestPage.html" frameborder="0"></iframe></center></p>
<p>Pretty fun stuff so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.gravelyn.com/2008/06/18/embedding-silverlight/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
