<?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>luminance &#187; prototyping</title>
	<atom:link href="http://www.luminance.org/tag/prototyping/feed" rel="self" type="application/rss+xml" />
	<link>http://www.luminance.org/blog</link>
	<description>Programming and Game Development - Kevin Gadd&#039;s Blog</description>
	<lastBuildDate>Sun, 02 Oct 2011 00:15: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>Prototyping week</title>
		<link>http://www.luminance.org/blog/gruedorf/2009/06/05/prototyping-week</link>
		<comments>http://www.luminance.org/blog/gruedorf/2009/06/05/prototyping-week#comments</comments>
		<pubDate>Sat, 06 Jun 2009 04:26:44 +0000</pubDate>
		<dc:creator>Kael</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[prototyping]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://www.luminance.org/?p=420</guid>
		<description><![CDATA[The main thrust of this week&#8217;s work was gameplay prototyping. I spent the majority of my time prototyping gameplay &#8211; either by building new mechanics, tuning existing ones, or constructing small prototypes in the editor. Some of the more interesting things I built: I added support for attaching pieces of geometry to each other, so [...]]]></description>
			<content:encoded><![CDATA[<p>The main thrust of this week&#8217;s work was gameplay prototyping. I spent the majority of my time prototyping gameplay &#8211; either by building new mechanics, tuning existing ones, or constructing small prototypes in the editor.</p>
<p>Some of the more interesting things I built:</p>
<p>I added support for attaching pieces of geometry to each other, so that I could make composite objects for use in puzzle designs. In the following video, I&#8217;ve attached a Crank (a new variation on my existing Switch object, which I&#8217;ll describe a bit later) to a moving platform, and tied the crank to the platform&#8217;s velocity so that you can use it to move the platform:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube-nocookie.com/v/bL_HvcVUTCE&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;hd=1" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube-nocookie.com/v/bL_HvcVUTCE&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I also spent some time on the Assist mechanic, which allows the player to have abstract control over the inactive character by hitting a special button on the controller at appropriate times. Right now, it merely allows interaction with objects, but in the future, it will allow high-level orders (like &#8216;come here&#8217; or &#8216;stay there&#8217;) that will help guide the (currently unfinished) AI that controls the inactive character in order to keep it from getting left behind during platforming segments. In the following video, I demonstrate using the assist button to operate a crank with the inactive character while the active character makes his way past some spikes:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube-nocookie.com/v/-sf97hbgCWE&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;hd=1" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube-nocookie.com/v/-sf97hbgCWE&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The culmination of my work this week was constructing a larger puzzle prototype that combines many of the smaller elements I&#8217;ve built previously. It&#8217;s a puzzle that utilizes the Assist mechanic along with many of the mechanics and technologies I&#8217;ve built so far and stresses many of the limits of my current engine. In the process of building it I had to fix numerous bugs and performance issues in my game code and ended up discovering some serious flaws in my collision detection code, which I&#8217;ll no doubt have to address in the coming weeks. Nonetheless, it was quite satisfying to see it take shape:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube-nocookie.com/v/zIF5NJCN0y8&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;hd=1" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube-nocookie.com/v/zIF5NJCN0y8&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Finally trying it out made me realize that it was far more difficult than I anticipated, and that my UX needed significant improvement. I spent some time refining the puzzle and improving the game&#8217;s UI and was finally able to beat it myself:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube-nocookie.com/v/XqBVjJQiNi4&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;hd=1" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube-nocookie.com/v/XqBVjJQiNi4&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Naturally, a lot of work still remains, both in the art, design, and technology departments. But it&#8217;s nice to finally be able to build a piece of content this large without running into any showstopper issues &#8211; all said, it took me about 45 minutes to construct and tune this puzzle in my editing tools. Not as fast as I&#8217;d like, but more than good enough to get started on enough content to fill a playable demo.</p>
<p>One of the more surprising technical hurdles this week was the discovery that SpriteBatch.Begin was accounting for over 10% of the CPU usage in my game. This turned out to be due to the fact that each game object was responsible for setting up its own render state, so I was beginning and ending an individual batch for every object in the level &#8211; over a hundred spikes, dozens of moving platforms and doors, and hundreds of tiles. I invested some time into writing code to automatically manage beginning and ending batches, so that objects would no longer need to explicitly call End in their Draw methods, only Begin.</p>
<p>Once I had that working it dropped off my profiles entirely, and my framerate climbed back up to where it was a few weeks ago. On one hand, it&#8217;s nice to be able to see such large performance gains from little effort, but on the other hand, I&#8217;m a little embarassed that I didn&#8217;t think about it earlier. <img src='http://www.luminance.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It&#8217;s likely that in the future I&#8217;ll end up writing a RenderManager class of some sort to automatically handle sorting objects based on their material and other parameters so that I don&#8217;t end up having to send thousands of batches to the video card every frame.</p>
<p>I ran into numerous minor issues with my collision detection code this week, which has me considering ways to rework and improve my current approach. The worst was a bug that I discovered where if I placed an object at negative coordinates (on either the X or Y axes), it behaved differently in collision detection than if it was placed at positive coordinates. Instead of diving into the math to try and figure it out, I ended up just relocating all the objects in my test level so that they had positive coordinates, but I can&#8217;t put solving this one off for too long.</p>
<p>Later in the week a friend stopped by and I had him test the game out on my machine. Not only did he have some good feedback, but he found two bugs within a matter of minutes! Always nice to get fresh eyes on your design and see someone else try out what you&#8217;ve built. I&#8217;m looking forward to having things at the point where I can start handing out test versions for people to bang on.</p>
<p>Finally, a question for anybody who&#8217;s reading on a regular basis: The Gruedorf weekly progress format is becoming rather difficult to work with lately, so I&#8217;m considering changing my approach for this development log. I&#8217;d greatly appreciate it if you let me know via the comments section which topics interest you the most, and whether you&#8217;d be interested in seeing multiple shorter posts during the week focusing on single topics.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luminance.org/blog/gruedorf/2009/06/05/prototyping-week/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

