<?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>gameonaut - game and life design</title>
	<atom:link href="http://gameonaut.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://gameonaut.com/wordpress</link>
	<description>Designing the digital lifestyle ... it&#039;s all game design..</description>
	<lastBuildDate>Mon, 13 Feb 2012 07:22:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Texturing a car wheel and other rounded objects in 3ds max</title>
		<link>http://gameonaut.com/wordpress/?p=228</link>
		<comments>http://gameonaut.com/wordpress/?p=228#comments</comments>
		<pubDate>Thu, 17 Nov 2011 06:37:04 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=228</guid>
		<description><![CDATA[Modeling round objects is usually not too hard, but when it comes to efficient texturing, most people can spend hours on something that should take but a few minutes. For this tutorial I won&#8217;t go into where to find all settings and menus, as I expect you to have rudimentary knowledge of where to find [...]]]></description>
			<content:encoded><![CDATA[<p>Modeling round objects is usually not too hard, but when it comes to efficient texturing, most people can spend hours on something that should take but a few minutes. For this tutorial I won&#8217;t go into where to find all settings and menus, as I expect you to have rudimentary knowledge of where to find things. This is just purely about process.</p>
<p>Tires are one of those objects most modelers and texturers seem to have trouble with. So let&#8217;s look at how to model and texture this quickly.<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/TirePile.png"><img class="aligncenter size-medium wp-image-231" title="TirePile" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/TirePile-300x225.png" alt="" width="300" height="225" /></a><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/TireMeshFinished.png"><img class="aligncenter size-medium wp-image-232" title="TireMeshFinished" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/TireMeshFinished-300x251.png" alt="" width="300" height="251" /></a></p>
<p>The tools we need of course are your favorite modeling package (I prefer 3ds max for that so my explanations with tools will use that, but the principle is perfectly applicable to other tools), the edit poly tool, the UVW Map and Unwrap UV tool. So let&#8217;s get going:</p>
<p><strong>Initial Setup and Modeling:</strong></p>
<ol>
<li>The first thing we build is a cylinder. Keep the resolution low, we can always mesh smooth later. Set is height segments to 1 and give it a 1 cap division and 16 corners.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_1.png"><img class="alignnone size-medium wp-image-237" title="Step_1_1" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_1-300x136.png" alt="" width="300" height="136" /></a></li>
<li>Set it&#8217;s size to look like the dimensions of a tire, bets you grab yourself some references for that.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/fs924021.jpg"><img title="fs924021" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/fs924021-150x150.jpg" alt="" width="150" height="150" /></a></li>
<li>I now set up my face ID&#8217;s and make everything except the inner circle shape of my cap to ID 2. I do this because I will use a multi/sub-object texturing for this model later. It&#8217;s quicker at this stage to just grab your images and use them in max this way as it means I don&#8217;t have to bother with photoshop. If you like of course a decent texture can be built later on, but this if for rough and quick building.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_2.png"><img class="alignnone size-medium wp-image-238" title="Step_1_2" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_2-300x136.png" alt="" width="300" height="136" /></a></li>
<li>Add an edit poly modifier and use the face select tool to scale the inner cap segments (that&#8217;s why you want to have a cap subdivision of the ends of your cylinder) upwards so its edge can define the border between rims and tire rubber.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_3.png"><img class="alignnone size-medium wp-image-239" title="Step_1_3" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_3-300x136.png" alt="" width="300" height="136" /></a></li>
<li>Now use the inset and scale tools to build the inner shapes of the rim. If you use a reference, this should be quite easy.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_4.png"><img class="alignnone size-medium wp-image-240" title="Step_1_4" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_4-300x136.png" alt="" width="300" height="136" /></a></li>
<li>When you are done, use the edge loop select on that outer subdivision of your cylinder and scale it up, this will make your tire more rounded looking.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_5.png"><img class="alignnone size-medium wp-image-241" title="Step_1_5" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_5-300x136.png" alt="" width="300" height="136" /></a></li>
<li>We don&#8217;t have a good transition yet for the surface of our tire rubber to the side of the wheel. To fix this, again edge loop select the corner edge where cap meets side of cylinder and user the chamfer tool to break up this hard edge.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_6.png"><img class="alignnone size-medium wp-image-242" title="Step_1_6" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_6-300x136.png" alt="" width="300" height="136" /></a></li>
<li>If you used your reference well then you have almost a finished tire shape on one side of the cylinder.</li>
<li>We want to work quick so lets apply a symmetry tool and mirror one side of the cylinder to the other side.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_7.png"><img class="alignnone size-medium wp-image-243" title="Step_1_7" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_1_7-300x136.png" alt="" width="300" height="136" /></a></li>
<li>Voila the rough mesh is done and we will go on texturing and make any adjustments later.</li>
</ol>
<p><strong>Texturing:</strong></p>
<ol>
<li>For speed&#8217;s sake I just grabbed two images I liked from the web that will serve for now as my texture. We can adjust them later to look proper:<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/tire-tread-iphone-case.jpg"><img title="tire-tread-iphone-case" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/tire-tread-iphone-case-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/fs924021.jpg"><img title="fs924021" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/fs924021-150x150.jpg" alt="" width="150" height="150" /></a></li>
<li>I go ahead and delete the bottom of my cylinder as we won&#8217;t need it at all (save yourself some trouble as well).</li>
<li>Next up I go back to my model and set up my UV&#8217;s. Channel 1 I use a planar projection, so select this surface ID and add your UVW Map onto it. For channel 2 I will use a cylindrical projection. Apply as usual buy selecting that ID and apply another UVW Map.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_1.png"><img class="alignnone size-medium wp-image-244" title="Step_2_1" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_1-300x136.png" alt="" width="300" height="136" /></a></li>
<li>Next we want to ensure our UVs are not stretched so much. I generally add a little checkerboard material onto it to help me quickly. Let&#8217;s do that and then use the UVW Map settings to help get proper mapping. You want to make sure at this stage to not get any stretching as much as possible. You will get some stretching that is unavoidable at this stage but don&#8217;t worry, everything goes through an ugly phase and we fix that in a moment.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_2.png"><img title="Step_2_2" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_2-300x136.png" alt="" width="300" height="136" /></a></li>
<li>Add a Unwrap UVW and let&#8217;s adjust some of that stretching. Make sure your checkers are as good as possible square.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_3.png"><img class="alignnone size-medium wp-image-246" title="Step_2_3" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_3-300x136.png" alt="" width="300" height="136" /></a><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_5.png"><img class="alignnone size-medium wp-image-248" title="Step_2_5" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_5-300x136.png" alt="" width="300" height="136" /></a><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_6.png"><img class="alignnone size-medium wp-image-249" title="Step_2_6" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_6-300x136.png" alt="" width="300" height="136" /><br />
</a><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_4.png"><img class="alignnone size-medium wp-image-247" title="Step_2_4" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_4-300x136.png" alt="" width="300" height="136" /></a><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_7.png"><img class="alignnone size-medium wp-image-250" title="Step_2_7" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_7-300x136.png" alt="" width="300" height="136" /></a></li>
<li>I set up a multi/sub-object in my material editor next, using the wheel rim on channel 1 and the rubber surface in channel 2.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_8.png"><img title="Step_2_8" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_8-300x136.png" alt="" width="300" height="136" /></a></li>
<li>Drop you multi/sub-object material onto your tire now.</li>
<li>As you can see the positioning of our UV&#8217;s is not correct yet so go back to your Unwrap UVW and move your UV&#8217;s into the right place.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_9.png"><img class="alignnone size-medium wp-image-252" title="Step_2_9" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_9-300x136.png" alt="" width="300" height="136" /></a></li>
<li>When you done, we have a roughly unwrapped tire. Now we can adjust our texture to look proper and our mesh to fit the texture better and we are done. And If you really just want to have something super fast and don&#8217;t mind stretching, you can adjust your UV&#8217;s to just match our reference images we used.<br />
<a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_10.png"><img class="alignnone size-medium wp-image-253" title="Step_2_10" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_2_10-300x136.png" alt="" width="300" height="136" /><br />
</a><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_3_1.png"><img class="alignnone size-medium wp-image-236" title="Step_3_1" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/Step_3_1-300x136.png" alt="" width="300" height="136" /></a></li>
</ol>
<p>Hope you enjoyed this little tutorial and modeling and texturing a tire or something like it becomes a breeze.</p>
<p>The final Image with a neater texture: I won&#8217;t leave you hanging cheaply.</p>
<p><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/TireTexture.png"><img class="alignnone size-medium wp-image-260" title="TireTexture" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/TireTexture-300x300.png" alt="" width="300" height="300" /></a><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/TireFinishedTex.png"><img class="alignnone size-medium wp-image-261" title="TireFinishedTex" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/11/TireFinishedTex-300x234.png" alt="" width="300" height="234" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=228</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flixel Demo &#8211; Creating animated and rotated sprites from an un-rotated animated images.</title>
		<link>http://gameonaut.com/wordpress/?p=221</link>
		<comments>http://gameonaut.com/wordpress/?p=221#comments</comments>
		<pubDate>Mon, 07 Nov 2011 17:14:04 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=221</guid>
		<description><![CDATA[The Problem: Flixel can load animated sprites and can generate rotated sprites from a single image. It can’t however easily create a rotated sprite sheet of a loaded animation sprite sheet. We will attempt to find a solution on how to combine rotation AND animation into one sheet. Limitations: Pixel buffer size limitation of bitmap. [...]]]></description>
			<content:encoded><![CDATA[<div>
<h3 dir="ltr">The Problem:</h3>
<p>Flixel can load animated sprites and can generate rotated sprites from a single image. It can’t however easily create a rotated sprite sheet of a loaded animation sprite sheet. We will attempt to find a solution on how to combine rotation AND animation into one sheet.</p>
<h3 dir="ltr">Limitations:</h3>
<p>Pixel buffer size limitation of bitmap. 16,777,216 pixels (4096&#215;4096) with a maximum length of 8191 pixels per side.</p>
<h3 dir="ltr">Thus:</h3>
<p>Creating rotation Spritesheets for large graphics is essentially difficult because you quickly can exceed the buffer limit for a BitmapData object.</p>
<h3 dir="ltr">Solution:</h3>
<h4 dir="ltr">Below Limitation for Bitmap:</h4>
<p>For samples where spritesheets can contain animation AND rotation and the total pixel amount is less than the limitation, we are fine and can generate rotations easily and assemble in a rotated spritesheet.</p>
<h4 dir="ltr">Above Limitation for Bitmap:</h4>
<p>For samples that exceed the limitation we can either manually generate rotated sheets and load depending on what angle we need we load the actual graphic.</p>
<h5 dir="ltr">Advantage:</h5>
<p dir="ltr">No need to generate samples through code and quicker implementation. Can reduce memory load as we need only make what we really need. Can allow for odd angle samples depending on need.</p>
<h5 dir="ltr">Disadvantage:</h5>
<p dir="ltr">No flexibility in quickly adjusting sample rotation sheets, manually rendering and creating the sheets before use and updating of code manually each time we change the sample rate. Possibly create samples we might never use. Possibility of artifacts during generation, diffuse and alpha needs to be handled separately. Complex code.</p>
<h3 dir="ltr">Existing Solutions:</h3>
<p>An implementation that uses a pre-built rotation/animation sprite sheet was created by by Hectate and can be found here:</p>
<p dir="ltr"><a href="http://flashgamedojo.com/wiki/index.php?title=Mouse-Aim_Tutorial_(Flixel)">http://flashgamedojo.com/wiki/index.php?title=Mouse-Aim_Tutorial_(Flixel)</a></p>
<p>He uses the prebuilt sheet and sets how the animation is to be played, adding animation sequences based on row and columns.<img src="https://lh6.googleusercontent.com/2hbDrqj-IC9MFxnk52tXnf_RlwOvXmu3EubuxHPZkb-l5ACLF5NFrF47bP69-xMfuWGP7nhjW409qVWxdnQ1kzPw4LKohbfhYRDm42MYUXplhNTuu2A" alt="" width="512px;" height="256px;" /></p>
<p>In this example we have the rotation along the horizontal, and the fading of the red line on the vertical. Playing now the animation labeled X will rotate the shape, whereas the animation labeled 0 will make the red line fade out and back in.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">addAnimation<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;X&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">3</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">6</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">7</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">8</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">11</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">12</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">13</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">30</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
addAnimation<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;0&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">16</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">32</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">48</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">64</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">80</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">96</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">112</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">96</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">80</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">64</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">48</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">32</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">16</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">30</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<h3 dir="ltr"><span id="more-221"></span></h3>
<h3 dir="ltr">As explained, we have some advantages and disadvantages here.</h3>
<h3 dir="ltr">Generating an animation/rotation sprite sheet from an animation sprite sheet</h3>
<h5 dir="ltr">Basic Conversion from Single Image to Rotation Sprite Sheet</h5>
<p>In Flixel, loadRotatedGraphic allows loading a simple sprite and generate X rotation samples from it. We can then set an angle property to find an appropriate rotation for this sheet position.</p>
<p>This illustration shows how a sprite sheet with 64 samples is created in Flixel from a single image. We can rotate in 360/64 = 5.625 degrees:<br />
<img src="https://lh4.googleusercontent.com/zBSMnjLUDehX2xqqJwLb4wB6Ls4QMExlhum69K48fTNxPf71CJoYBg28DeAvNEYrQkkUdqRJAShD16BXVEXbfNoq9SBF9yINe5-nmQd8a3fGnt9KaJI" alt="" width="337px;" height="224px;" /></p>
<p>As we can see, Flixel arranges the generated sheet in equal rows and columns. This makes it in fact easier to ensure we don’t accidentally exceed any of the bitmap limit too quickly. Assume that we always work in a square then the sheet dimensions can be expressed as:</p>
<p dir="ltr">sheetMaxDimesion(Width,Height) =  Ceil(Sqrt(amount of rotation samples))</p>
<p>for those who can’t imagine how to use this formula to set the actual pixel dimensions of the rotation sheet, this is how you generate it from our original image sample:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">rotationSheet<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = originalImage<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> <span style="color: #000066; font-weight: bold;">*</span> sheetMaxDimesion<span style="color: #000066; font-weight: bold;">;</span>
rotationSheet<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = originalImage<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">*</span> sheetMaxDimesion<span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<h5 dir="ltr">Going further</h5>
<p>Now that we know what a rotation sheet looks like we can convert it into a sheet that we cold quickly animate.<br />
In Flixel Animation sheets follow the same concept applies. Animations are played either on the vertical or the horizontal depending on how you set up the frames in addAnimation();</p>
<p>Since the setup is usually quite manual, we want to of course generate what animation sequences need to be played automatically.</p>
<p>What we established before, is that Flixel can’t combine animation and rotation in a simple way. So we have to find a way that allows us to load an animation and generate the rotations for it.</p>
<p>The obvious question that will appear is of course the following:<br />
Why can’t we just load the entire animation sheet with loadRotatedGraphic?</p>
<p>Lets look at what the generated sprite sheet would look like if we loaded the following animated sequence:<img src="https://lh6.googleusercontent.com/Qrty6JmfbSPufphrWf5OlncL8lLgrGMEeoRAmX-2vtwEIdF4t9by5e9_rSci2SHbfc-4WUkjIE96U5XAlyFA-VDLjDHPK1_KmK352e7RXLiFSzZtUc4" alt="" width="192px;" height="48px;" /></p>
<p>When we load the entire thing, what we would get is the following:<img src="https://lh5.googleusercontent.com/uZ0vN5JhOLtGq98FPEqmMihjelYfqekONQyBaDAs-rF4ngREOcLlZZCa72pLU8vOaouF1fZnd2smze5eRXXfMVKydSSXFwP74tdKiJSSE7Zp0BCIAhg" alt="" width="395px;" height="387px;" /><br />
We of course right away notice the gigantic empty space. Now here we only used 4 samples, creating 90 degree rotations only. Imagine this using 32 or 64 samples. We would quickly not just run out of buffer space due to the bitmap size, but now knowing where out tiles are will be insanity.</p>
<p>You might say, OK how about we pre-pack it in a square shape for the animation, so 2&#215;2. Unfortunately that won’t work either as the ENTIRE image will be rotated, not the individual samples and still resulting in a mess.</p>
<p>So what should be do???</p>
<h3 dir="ltr">What to do to make it work</h3>
<p>First and foremost there could be a few approaches. But lets look at a straight forward one:<br />
Breaking up the animation in separate images first instead of keeping it in a sprite sheet and load each as a rotated graphic, or load four times for each frame, and store it within seperate bitmapData containers and swap pixel data on runtime for the flixel sprite depending on what animation we are using. That would mean. We have a default rotation. When animating, we replace the current pixel data with he one from the prebuilt bitmapData container. We of course need to know at what frame we are and do this each time we change position to a new frame in the sheet. So what we would get is the following using this sheet:<br />
<img src="https://lh3.googleusercontent.com/yaDz_rwpyCEgDFeCP_yzTAG0ewY6W8LQP6-DGOfaWfSJ7FlWIn5GT6nKfIWbsM_iMrUNE58rIUA961_Zue6vesK5a-KZLoVJC71bqEbd0pS2K0jESP4" alt="" width="192px;" height="48px;" /></p>
<ul>
<li>One FlixelSprite</li>
<li>Containing 4 instances of bitmapData each containing a rotation sheet for each frame. So one rotation sheet for white, red, green and blue. What we would get for the last rotation sheet if we have 4, 8 an 9 samples respectively:<br />
<img src="https://lh4.googleusercontent.com/gqbbmDF6nNg06YbaZMekayZe9ArbyCICFBure8awx0vAvah9hbHeHt9NW9mdQPiAlYqfLuMqxGbpAJhDeimYVotYR3zHay0qiw5rxQJH4bwaZYbc6bw" alt="" width="97px;" height="97px;" /><img src="https://lh4.googleusercontent.com/_5mahov1WzdAen7eNvDs7DInlXXKMeKQ6o7cG7QinVrA68AS_RIckv0uVcbg30RwPuLlhYb_PsMimESsCYWC1JwN7UY1tAUQmLMfKAyjpRmnmYlzSK8" alt="" width="198px;" height="96px;" /><img src="https://lh5.googleusercontent.com/0zdPpNCuC-5nZrBSBHOGeT6IJQUzn7q-f62gupVW94AzTy1GJReqMFbjk06TtYzM96TOf-kt90rMVxFULceoZR2TVRLD-wM246_VfzrhlTBtu83LwVk" alt="" width="150px;" height="146px;" /></li>
<li>We would only have a sequence of 4 frames total, but we need to swap the pixel buffer.<br />
addAnimation(&#8220;0&#8243;,[0,1,2,3],30,true);<br />
won’t do us any good now as this thing is not considered an animation in flixel. We need to manually animate. Something like this.</li>
</ul>
<p dir="ltr">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> frames<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> frameCounter<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
override <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> update<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
&nbsp;
<span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>frameCounter <span style="color: #000066; font-weight: bold;">&gt;</span> frames<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
&nbsp;
frameCounter = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>update<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
pixels = rotationRefA<span style="color: #000000;">&#91;</span>frameCounter<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
frameCounter<span style="color: #000066; font-weight: bold;">++;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p dir="ltr">
<ul>
<li>Assume we generated 8 samples now for each frame (thats rotations of 45 degrees in the sheet). If we rotate 45 degrees to the right we would have to pick rotation frame 1 in each sheet. Flixel will automaticaly know as long as make sure we keep the thing alive as a rotatedGraphic.</li>
<li>Each frame update we check if we need to replace the current pixel of our object with the ones from the buffer.</li>
</ul>
<p>The code for this would be the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> rotations<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">9</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//Amount of rotation samples we want.</span>
<span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #009900; font-style: italic;">//i refers to the frame position in the animation sheet</span>
&nbsp;
loadRotatedGraphic<span style="color: #000000;">&#40;</span>AssetsList<span style="color: #000066; font-weight: bold;">.</span>CircleBlinkAni<span style="color: #000066; font-weight: bold;">,</span>rotations<span style="color: #000066; font-weight: bold;">,</span>i<span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> bmd<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//Create a bitmapData container</span>
&nbsp;
bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span>pixels<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//pase the current pixel data into the bitmapdata container</span>
&nbsp;
rotationRefA<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//store it for reference.</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
pixels = rotationRefA<span style="color: #000000;">&#123;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>The Problem: Swapping Pixel Data</p>
<p>Unfortunately in this approach all our clipping goes out the window. What we will see is exactly what the screenshots above show.<img src="https://lh3.googleusercontent.com/ZKMiZaX_oNwSxycKQFmpk2VHHqq1L159_nkrQ9UNIFY4No4L5ab3cI_F3sLfJs0nFLWYs-CxI31ho73JZQzvoRc7fIe1y6SvnyxOXpK0biBt11iVYIc" alt="" width="150px;" height="146px;" /><br />
This unfortunately just also kicked out our rotation samples. So what can we do? It seems we are straight back to square one.<br />
What we need to remember is that we can’t just move the bitmapData straight back into the pixels buffer. If we do that, we get this problem as Flixel autoadjusts width and height to the new pixel data.<br />
On top of this, we lose when we do that all the ALPHA information. Outch.</p>
<p>Now obviously that can’t be the approach we want. We need to find a way, that doesn’t just replace the pixels bitmapdata reference but correctly copies the pixel data.</p>
<p>Alas we can revert to good old blitting.</p>
<p>Essentially what we want to do is NOT:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">pixels = rotationRefA<span style="color: #000000;">&#123;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>But:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">pixels<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">copyPixels</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></pre></td></tr></table></div>

<p>So where is the difference here. Reassigning pixels.bitmapData to a new bitmapData object will automatically destroy all the nicely set up properties Flixel made for us and on top render the entire bitmap. Not what we want at all.</p>
<p>Using copyPixels we just duplicate pixel we created in the for loop over into our existing bitmapData object without Flixel automatically adjusting the FlxSprites properties.</p>
<h4 dir="ltr">copyPixels to the rescue</h4>
<p>Lets set up anew to have a good creation of our sample BitmapData array that contains proper samples of rotations for all our animated frames:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> framesAmount<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
loadRotatedGraphic<span style="color: #000000;">&#40;</span>animatedAsset<span style="color: #000066; font-weight: bold;">,</span>rotations<span style="color: #000066; font-weight: bold;">,</span>i<span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> bmd<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">*</span>sheetMaxDimesion<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">*</span>sheetMaxDimesion<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> 0x00000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #004993;">rect</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Rectangle</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">*</span>sheetMaxDimesion<span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">*</span>sheetMaxDimesion<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">copyPixels</span><span style="color: #000000;">&#40;</span>pixels<span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span>pixels<span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
rotationRefA<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>To understand fully what we have done now:</p>
<ul>
<li>The FOR loop simply cycles through all the frames in our asset (see later how we know how many frames there are).</li>
<li>we run the loadrotated graphic based on a specific frame in the animatedAsset, generate the amont of rotations, i represents what frame in the animation we are processing, antialiasing is set to true by default here, and we don’t buffer because anyway we this somewhere else later.</li>
<li>Now we create a new bitmapData same as before.</li>
<li>Into this bitmapData object we not copyPixels at the size (rect) of the sprite sheets size, we set the source and alpha bitmap to this objects pixels (set via the loadRotatedGraphics)</li>
<li>And store the bitmapData in our array for later use.</li>
<li>Wash rinse repeat for all our frames.</li>
</ul>
<p>Now that we have the references created properly how to we play back?</p>
<p>Exactly the same way just this time instead of doing copyPixel from the source to the reference, we go from reference to source in our update loop.</p>
<h5 dir="ltr">Playing back our rotated animated graphic</h5>
<p>We simply cycle through our frames in the update loop and copyPixels back into the bitmapData object of our FlxSprite.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>frameCounter <span style="color: #000066; font-weight: bold;">&gt;</span> framesAmount<span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
frameCounter = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
pixels<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">fillRect</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">,</span>0x00000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//clear out blank to avoid artefacts</span>
pixels<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">copyPixels</span><span style="color: #000000;">&#40;</span>rotationRefA<span style="color: #000000;">&#91;</span>frameCounter<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span>
&nbsp;
rotationRefA<span style="color: #000000;">&#91;</span>frameCounter<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
drawFrame<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
frameCounter<span style="color: #000066; font-weight: bold;">++;</span></pre></td></tr></table></div>

<p>Note two things:</p>
<ol>
<li>There is no specific framerate set yet in this class. That means at whatever framerate your application is playing back, at the same speed this graphic will play. It is NOT a time based animation</li>
<li>Notice the call to drawFrame(true). As this is not an animated frame in the common sense of Flixel, changing the bitmap data won’t force a redraw of this graphic. We must manually force Flixel to redraw this sprite. You can try to comment this line out and notice how nothing updates until you change the ANGLE of the graphic, which forces a redraw.</li>
</ol>
<h4 dir="ltr">Last words</h4>
<p>This is essentially it. For the users convenience I added some extra things.</p>
<h5 dir="ltr">Creating an instance</h5>
<p>To load an animation as a rotatable asset, simple create a new instance directly in your code and pass your asset in the constructor along with the amount of rotation samples you want like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> aniRotSprt<span style="color: #000066; font-weight: bold;">:</span>FlxSpriteAniRot = <span style="color: #0033ff; font-weight: bold;">new</span> FlxSpriteAniRot<span style="color: #000000;">&#40;</span>YouGraphics<span style="color: #000066; font-weight: bold;">,</span> HowManyRotationSamples<span style="color: #000066; font-weight: bold;">,</span>
posX<span style="color: #000066; font-weight: bold;">,</span> posY<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>You can freely adjust the angle now of this FlxSprite and the animation will play along.</p>
<h5 dir="ltr">Some words of caution</h5>
<p>I haven’t fully tested this with very large images and long animations. Some problems might still show up and by all means this might be far from the ideal and final solution. It is also quite memory intensive as you will potentially create a lot of bitmapData. So use it only if you HAVE TO.</p>
<h5 dir="ltr">Future Development</h5>
<p>Surely some improvements can be made, first and foremost playback of animation based independent of your flash files frame rate and at a fixed speed.<br />
Some testing on performance should be done as well and possibly a better overall writing of this. Somehow I feel it is still a bit of a hack.</p>
<h5 dir="ltr">Special Thanks</h5>
<p>I want to thank Hectate for providing the above mentioned resource that sparked my idea and especially Adam Saltsman for creating and maintaining Flixel. Also my thanks go out to my friends and colleagues, Florian at <a href="http://www.codeflow.org/">codeflow.org</a>, and Sean <a href="http://wyrdysm.com/">wyrdysm.com</a> for introducing me to Flixel in the first place.</p>
<h5 dir="ltr">LICENSE:</h5>
<p>Since Flixel is free for personal and commercial use, so is this little extention. Please use, edit, reuse, change, eat, lick and anything else you like. And if you like, give me a bit of credit after you done manhandling this code ^__^d</p>
<h5 dir="ltr">SOURCE CODE</h5>
<p>Find the source for the entire class here. Feel free to check out my entire sandbox of what I am messing with.<br />
<a href="https://bitbucket.org/Levantulee/sandbox/src/548fbaddb47c/FlixelSandbox/src/assets/FlxSpriteAniRot.as"> https://bitbucket.org/Levantulee/sandbox/src/548fbaddb47c/FlixelSandbox/src/assets/FlxSpriteAniRot.as</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=221</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rendering a Planet Video Game Style &#8211; Part 1 &#8211; Earth</title>
		<link>http://gameonaut.com/wordpress/?p=198</link>
		<comments>http://gameonaut.com/wordpress/?p=198#comments</comments>
		<pubDate>Sat, 23 Jul 2011 17:23:14 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=198</guid>
		<description><![CDATA[Ok, so I was challenged by my wife over the mediocre looking water in Garden Planet and said why can&#8217;t you make a planet that looks more believable, especially the water of the oceans. I though, well then, lets create a little game like demo setup to render planet earth the same way we did [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so I was challenged by my wife over the mediocre looking water in Garden Planet and said why can&#8217;t you make a planet that looks more believable, especially the water of the oceans.</p>
<p>I though, well then, lets create a little game like demo setup to render planet earth the same way we did in garden planet. No fancy shaders or anything. Just a few tricks etc.</p>
<p>After a few hours of work and tweaks the result is what you see in the images. Ok admitted, I did use earth photographs from NASA, and after a few tweaks I had separate layers for Landmasses, water, shorelines and clouds. And for a bit of visual fun, a very large version of the moon as a visual gimmick. Mind you, it&#8217;s it not scale, just make it look nice.</p>
<p>Hope you enjoy. The setup on how I did it will come in a separate post.</p>
<p style="text-align: center;"><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/07/earth1.0.1.jpg"><img class="aligncenter size-medium wp-image-215" style="border: 1px solid gray;" title="earth1.0.1" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/07/earth1.0.1-300x128.jpg" alt="" width="300" height="128" /></a></p>
<p style="text-align: center;"><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/07/earth1.0.2.jpg"><img class="aligncenter size-medium wp-image-216" style="border: 1px solid gray;" title="earth1.0.2" src="http://gameonaut.com/wordpress/wp-content/uploads/2011/07/earth1.0.2-300x128.jpg" alt="" width="300" height="128" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=198</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asynchronous Flash Events = Evil little buggers</title>
		<link>http://gameonaut.com/wordpress/?p=195</link>
		<comments>http://gameonaut.com/wordpress/?p=195#comments</comments>
		<pubDate>Thu, 14 Jul 2011 09:19:45 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Life and other silly inventions]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Loader]]></category>
		<category><![CDATA[Loops]]></category>
		<category><![CDATA[State Machine]]></category>
		<category><![CDATA[URLloader]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=195</guid>
		<description><![CDATA[Did you know that combining loops with any kind of flash event is a bad idea when processing data? Well it should be obvious but usualy it isn&#8217;t. Take a for loop for example. Add in a bunch of remote file downloads that get started in this loop. 1 2 3 4 for&#40;var i:int = [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that combining <strong>loops</strong> with any kind of <strong>flash event</strong> is a <strong>bad</strong> idea when processing data? Well it should be obvious but usualy it isn&#8217;t.</p>
<p>Take a for loop for example. Add in a bunch of remote file downloads that get started in this loop.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span> counter<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span>Complete<span style="color: #000066; font-weight: bold;">,</span> doStuff<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Since they are flash events, you wait until the event triggers and then you got your data. You will end up with missing data.</p>
<p>Why? I don&#8217;t know. Third base.</p>
<p>What I do know is, things become asynchronous due to the nature of flash events, and even worse so due to filsize and download speeds. What to do instead&#8230;make it state driven! Ok, you don&#8217;t get simultaneous downloads inside of a flash application, but then, seems it can&#8217;t relly handle it anyway.</p>
<p>How to make it state driven without using the loops in AS3 the way you would usually do it. Simple:</p>
<p>Replace the loop through an ENTER_FRAME event and call your data processing method that way. When done, don&#8217;t forget to remove the event again.</p>
<p>Within the method called by the event, use a simple switch to keep track of different states of your loader:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span>update<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> update <span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">switch</span><span style="color: #000000;">&#40;</span>state<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;initload&quot;</span><span style="color: #000066; font-weight: bold;">:</span>
			initTheLoader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;loading&quot;</span><span style="color: #000066; font-weight: bold;">:</span>
			<span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;finished&quot;</span><span style="color: #000066; font-weight: bold;">:</span>
			cleanUpYourself<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> initTheLoader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	state=<span style="color: #990000;">&quot;loading&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span>Complete<span style="color: #000066; font-weight: bold;">,</span> doStuff<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> doStuff<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #009900; font-style: italic;">//Loading finished</span>
	<span style="color: #009900; font-style: italic;">//Do stuff to your loaded that form here on out</span>
	<span style="color: #009900; font-style: italic;">//When you are done change the state again</span>
	state=<span style="color: #990000;">&quot;finished&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> cleanUpYourself<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span>update<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Now you wont get any more funky missing data, everything is referenced and loads properly. You can even put this in a class that you init multiple tiles and it will still work.</p>
<p>One <strong>MAJOR</strong> thing you must know, that events are dependant on <em>EventDispatcher</em> in AS3. That means you can only ADD event in a class that EXTENDS the EventDispatcher such as Sprites, Bitmaps, the Stage etc. This means that the <strong>eventListener</strong> must be added to the DISPLAYLIST.</p>
<p>The best way to handle this in classes that are NOT part of the display list, is by adding the listener to the STAGE. Do remember that when you are done to remove the listener again before the class instance is destroyed. Else it will keep lfoating around in memeory and cause trobule.</p>
<p>Thats all folks. Happy coding <img src='http://gameonaut.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=195</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unreal &#8211; After a long time again</title>
		<link>http://gameonaut.com/wordpress/?p=190</link>
		<comments>http://gameonaut.com/wordpress/?p=190#comments</comments>
		<pubDate>Wed, 29 Jun 2011 08:52:12 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=190</guid>
		<description><![CDATA[For my upcoming class for 3D Level design I am diving into Unreal again. After having dabbles in Source for the past two years, I go back to this lovely thing. Now that UDK is available freely, and the new light engine is just fantastic, I decided to give it a go again and use [...]]]></description>
			<content:encoded><![CDATA[<p>For my upcoming class for 3D Level design I am diving into Unreal again. After having dabbles in Source for the past two years, I go back to this lovely thing. Now that UDK is available freely, and the new light engine is just fantastic, I decided to give it a go again and use it as the tool of choice for my class.</p>
<p>For fun&#8217;s sake I built a very small demo level to play around with the new light features and getting a hang of using the new Editor (haven&#8217;t touched it for like 6 +years). Turns out, few changes that really threw me off. I do miss the SkyBox though&#8230;. Oh well, can&#8217;t get everything. Here a small taste of the demo level. next up. Build a better unreal level <img src='http://gameonaut.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/05/UnrealDemoMap01_01.png"><img src="http://gameonaut.com/wordpress/wp-content/uploads/2011/05/UnrealDemoMap01_01-300x146.png" alt="" title="UnrealDemoMap01_01" width="300" height="146" class="aligncenter size-medium wp-image-192" /></a></p>
<p><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/05/UnrealDemoMap01_02.png"><img src="http://gameonaut.com/wordpress/wp-content/uploads/2011/05/UnrealDemoMap01_02-300x146.png" alt="" title="UnrealDemoMap01_02" width="300" height="146" class="aligncenter size-medium wp-image-191" /></a></p>
<p><a href="http://gameonaut.com/wordpress/wp-content/uploads/2011/05/UnrealDemoMap01_03.png"><img src="http://gameonaut.com/wordpress/wp-content/uploads/2011/05/UnrealDemoMap01_03-300x146.png" alt="" title="UnrealDemoMap01_03" width="300" height="146" class="aligncenter size-medium wp-image-191" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=190</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Triangular &#8211; Flash Shoot-Em-Up Game Prototype</title>
		<link>http://gameonaut.com/wordpress/?p=170</link>
		<comments>http://gameonaut.com/wordpress/?p=170#comments</comments>
		<pubDate>Wed, 22 Dec 2010 06:57:02 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Game Design]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=170</guid>
		<description><![CDATA[I have been learning Actionscript 3.0 over the past few months in order to be able to build digital prototypes of my games instead of just traditional paper and pencil / board games. On top of that it is meant to teach my students how to go from an initial design for my game through the process of a technical design [...]]]></description>
			<content:encoded><![CDATA[<p>I have been learning <strong>Actionscript 3.0</strong> over the past few months in order to be able <strong>to build digital prototypes</strong> of my games instead of just traditional paper and pencil / board games. On top of that it is<strong> meant to teach</strong> my students how to go <strong>from </strong>an initial <strong>design </strong>for my game <strong>through </strong>the process of a <strong>technical design</strong> <strong>to </strong>actual <strong>implementation</strong>. As a first major game I wanted to <strong>make </strong>a <strong>Shoot-Em-Up</strong> type of game for three good reasons:</p>
<ul>
<li>First it is challenging</li>
<li>It&#8217;s is a simple concept of destruction/survival dynamics and it can be competitive</li>
<li>Touches base on all fundamental game structures apart from story, strategy and complex stats</li>
</ul>
<p>Some of the functions I wanted to explore especially in regards to Actionscript are the following:</p>
<ul>
<li>Multiple Class Structures</li>
<li>Code and Timeline</li>
<li>XML Loading and Saving</li>
<li>Level Design</li>
<li>Different types of collisions in AS3</li>
<li>SIN/COS/ATAN2 for movement</li>
<li>Tracking of units</li>
<li>Event Handlers</li>
<li>Scoring/HUD/Healthbars</li>
<li>Screen Navigation</li>
<li>Bosses</li>
<li>Upgrades</li>
<li>Z Coordinates in Flash</li>
</ul>
<p>In regards to teaching I want to communicate the following in particular in regards to game design:</p>
<ul>
<li>Programming for Game Designers (who don&#8217;t have programming experience and won&#8217;t become game designers)</li>
<li>Rapid digital prototyping</li>
<li>Understanding basic programming building blocks for games</li>
<li>Flowcharting the game logic</li>
<li>Understanding technical limitations of game engines</li>
<li>Basic balancing</li>
<li>Documenting and planning the implementation of a design</li>
</ul>
<p>This sounds like a lot to digest, but it is not as much as it might appear. With this entry I wanted to share as a first step the initial technical design document I have put together before I started programming. I didn&#8217;t write a full Game Design Document since the game is so simple. But let me summarize for educational purposes anyway:</p>
<p><strong>Game Summary:</strong></p>
<p>Triangular is a 2.5D vertical, top down, space shoot-em-up. The player defeats oncoming waves of enemy ships and a boss at the end of each level. The player tries to beat all levels and gain a high-score. He can fly up,down,left,right as well as fly depth in order to attack enemies and avoid obstacles. The player can pick up upgrades to restore health, lives and change weapons.</p>
<p>So, here you get a sample of the current game:</p>
<p><iframe src ="http://gameonaut.com/wordpress/wp-content/uploads/2010/12/shootemup.swf" width=480 height=600></p>
<p>Your browser does not support iframes.</p>
<p></iframe></p>
<p>Buttons:</p>
<ul>
<li>Navigation: Up,Down,Left,Right, Spacebar</li>
<li>Cheat: P &#8211; to self destruct</li>
</ul>
<p>NOTE: Highscores are disabled and there is just one level currently.</p>
<p>You may look at the initial design doc here: <a class="pdfppt-link" href="http://gameonaut.com/wordpress/wp-content/uploads/2010/12/TRIANGULAR_InitialDesign.pdf">Initial Design Document</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=170</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Garden Planet – A short postmortem – Part 2</title>
		<link>http://gameonaut.com/wordpress/?p=159</link>
		<comments>http://gameonaut.com/wordpress/?p=159#comments</comments>
		<pubDate>Mon, 20 Dec 2010 09:12:47 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Garden Planet]]></category>
		<category><![CDATA[M-EDGE]]></category>
		<category><![CDATA[Postmortem]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=159</guid>
		<description><![CDATA[In the previous Part I explained what Garden Planet and M-EDGE is. Let me explain some of the things that went well and the ones that didn&#8217;t. Hopefully some of you who read this can learn as much from it as I did. Especially some mistakes have been made, not just by others but myself [...]]]></description>
			<content:encoded><![CDATA[<p>In the previous <a href="http://gameonaut.com/wordpress/?p=75" target="_self">Part I</a> explained what <strong>Garden Planet</strong> and <strong>M-EDGE</strong> is. Let me <strong>explain </strong>some of the <strong>things that went well </strong>and the ones <strong>that didn&#8217;t</strong>. Hopefully some of you who read this can learn as much from it as I did. Especially some mistakes have been made, not just by others but myself as well. Unfortunately not everyone learned from it, which let to the projects demise (half published doesn&#8217;t count as success).</p>
<p><strong>So what went wrong:</strong></p>
<p><span style="text-decoration: underline;">Game Design overturned, often without knowing by upper management.</span></p>
<p>This definitely the worst thong to do. You should never ever be in the situation where your boss  (investigator) goes around behind your back and issue changes in the game design without ever discussing it with you. Especially when he has no experience or knowledge about game design and running a production. Issuing instructions to the production team without it going through an approval process, especially when it involved the design of the game, is asking for disaster, not to mention destroying trust, alienating the team and frustrating.</p>
<p><span style="text-decoration: underline;">Last minute  changes for no good reason.</span></p>
<p>Changing the games direction when alpha is over and it has been tried and tested to work well, is suicide. Especially when the project timeline is 12 months and 8.5 months are done. Worse even, when the change comes from the boss without sound reason and proof that the game is not working. I am not advocating to keep beating a dead horse, but you should never kill the horse thats still running hard and far ahead.</p>
<p><span id="more-159"></span></p>
<p><span style="text-decoration: underline;">Functional Prototype not built early enough.</span></p>
<p>Having built a paper prototype to prove the game works is one thing and an important thing but we should have built a simple prototype (even in 2d) to prove practically that the game works, have a proof of concept really. Additionally, it would serve as a constant reminder to look at what the vision of the game is, and refer back to it. It also could have helped as a tool to help keep production on track and remind everyone what we are aiming for.</p>
<p><span style="text-decoration: underline;">Not enough skilled staff</span></p>
<p>This is not to say people involved have no skill, just not the skill required by this project. Some people should have not been involved in doing certain work, like programmers do animating, effects designer do programming.</p>
<p><span style="text-decoration: underline;">Distractions from other duties</span></p>
<p>When you work on a project like this, you should have to be able to focus the majority of your attention to it. Having people distracted by mundane tasks, or other projects that interfere with your production cycle is never good. Avoid if at all possible to pull people off their primary assignment to work on something that someone else could take care of unless you have very very good reasons. If you do, remember it will disrupt the current production and communication.</p>
<p><span style="text-decoration: underline;">Bad team communication</span></p>
<p>It was not so much people talking past each other, but everyone on the team was location in different rooms and even different floors in the building. This made communicating difficult and a lot of running around for nothing happened. This could have been avoided by either having everyone work int he same room, of if not possible, have IM communication permanently between all members active and status of the person is at the desk or not. Also meetings should be held to a minimum and to the point. Anything that takes more then 15 minutes, only relevant members should be involved. And come to meetings with a clear agenda!</p>
<p><span style="text-decoration: underline;">Technology unsuited</span></p>
<p>The game technology ended up being not suited for a lot of the visual features we wanted to have, even though it was advertised to work the way we wanted. Make sure you test and know your technology throughly before deciding to run your production on it. If you have time, prepare your own small demos (if you built a prototype before, that should be relatively easy).</p>
<p><span style="text-decoration: underline;">No feasible scheduling and clear guidance by upper management</span></p>
<p>Make sure you have a realistic and reasonable schedule. Forcing features and extra work into an already crammed schedule and then shortening it is naturally a bad idea. Remind your management that they should listen to the leads when it comes to scheduling. They know what their teams are capable of. Keep buffer time available in case things go wrong or you need extra.<br />
<strong>What went right:</strong></p>
<p><strong> </strong><span style="text-decoration: underline;">Clear design</span></p>
<p>Having set out clearly of what kind of game we wanted was crucial. Despite setbacks and radical changes, we always strives and had a solid design that everyone in the production team understood and followed.</p>
<p><span style="text-decoration: underline;">Strong code base and structure</span></p>
<p>Coding as logical as it is, it is messy. Comments and great documentation helped when structures were passed around between people, it was clear what was to be found where and how it works, even months after it was touched. This helped when changes needed to be made and other people worked on similar parts of the code.</p>
<p><span style="text-decoration: underline;">Clear Task Breakdowns</span></p>
<p>Everyone had a clear task breakdown and always knew what was on their plate. Tracking, reviewing and signing off of work meticulously reduced idle time and having to redo work. It also ensures the team stays on schedule and less things were overlooked.</p>
<p><span style="text-decoration: underline;">Independent work attitude of team members</span></p>
<p>You team should be composed of people who can run on their own and don&#8217;t need constant hand holding. The team always was very independent and supervision was not necessary. Having a strong vision and common goal is essential to have this. It is important that all members work on their own and retain a team spirit.</p>
<p><span style="text-decoration: underline;">Strong API</span></p>
<p>We had a clearly developed API for M-EDGE and great members who keep the code and implementation up to date and bug free. Having your foundation solid and strong will soothe your mind and focus on other problems.</p>
<p><span style="text-decoration: underline;">Testing</span></p>
<p>We were able to test early and often and in doing so could focus closely on how well M-EDGE and the rest of the game worked. Structured testing and knowing what you want form it makes for better products!</p>
<p><span style="text-decoration: underline;">Equipment</span></p>
<p>At last you need equipment that works. You don&#8217;t want to have to worry about your hardware of software tools crashing all the time.</p>
<p>In conclusion, there were many ups and down in the production, and some of them really killed the original design and lessened the product we finished. The final product is also nice, but it is a far cry from what Garden Planet could have been. Now we just have to hope that the powers to be will actually release it to the public!</p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=159</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Terrain Editor Stage 1 &#8211; Heliosphere Development</title>
		<link>http://gameonaut.com/wordpress/?p=149</link>
		<comments>http://gameonaut.com/wordpress/?p=149#comments</comments>
		<pubDate>Mon, 10 May 2010 06:25:22 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Heliosphere]]></category>
		<category><![CDATA[Terrain Editor]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=149</guid>
		<description><![CDATA[Florian pretty much finished a basic first stage of a terrain editor for Heliosphere. The description runs as follows: Lithosphere is a GPU driven terrain generator. It allows you to create and export material textures and heightmaps intended for use in realtime graphics applications. You can download the editor and enjoy playing around with it. [...]]]></description>
			<content:encoded><![CDATA[<p>Florian pretty much finished a basic first stage of a terrain editor for Heliosphere.</p>
<p><img class="aligncenter" title="Lithosphere Snowy Mountains" src="http://lithosphere.codeflow.org/screenshots/snowy_mountains.jpg" alt="Lithosphere Snowy Mountains" width="523" height="347" /><a href="http://lithosphere.codeflow.org/screenshots.html"></a></p>
<p>The description runs as follows:</p>
<p><a href="http://lithosphere.codeflow.org/" target="_blank">Lithosphere </a>is a <em>GPU</em> driven <em>terrain generator</em>. It allows you to create and export material <em>textures</em> and <em>heightmaps</em> intended for use in realtime graphics applications.</p>
<p>You can <a href="http://lithosphere.codeflow.org/download.html" target="_blank">download </a>the editor and enjoy playing around with it. Please see the <a href="http://lithosphere.codeflow.org/documentation.html" target="_blank">documentation </a>and release notes.</p>
<p>Addition would be to extend it to be generate spherical objects such as asteroids and even planets.</p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=149</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why so puzzled?</title>
		<link>http://gameonaut.com/wordpress/?p=139</link>
		<comments>http://gameonaut.com/wordpress/?p=139#comments</comments>
		<pubDate>Thu, 06 May 2010 07:32:46 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Game Design]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=139</guid>
		<description><![CDATA[UPDATE: Follow the discussion at GAMASUTRA. Interactive &#8211; non-Interactive and Staic &#8211; Active Puzzles are static, games are interactive. -Greg Costikyan http://www.costik.com/nowords.html The first thing I must ask here is: Are Puzzles static? Are Puzzles non-interactive? Can we compare even puzzles to games on the grounds that one is static and the other is interactive? [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:</strong> Follow the discussion at <a href="http://www.gamasutra.com/blogs/SimonRozner/20100506/5094/Why_so_puzzled.php" target="_blank">GAMASUTRA</a>.</p>
<p><strong>Interactive &#8211; non-Interactive and Staic &#8211; Active</strong></p>
<p><em>Puzzles are static, games are interactive.</em> -Greg Costikyan<br />
<a href="http://www.costik.com/nowords.html" target="_blank">http://www.costik.com/nowords.html</a></p>
<p>The first thing I must ask here is:</p>
<p>Are Puzzles static?<br />
Are Puzzles non-interactive?</p>
<p>Can we compare even puzzles to games on the grounds that one is static and the other is interactive? What are we talking about here? Can the two words even be compared to each other?</p>
<p>________________________________________<br />
<em>The state of the thing will change depending on your decision.</em> -Greg Costikyan<br />
________________________________________</p>
<p>A puzzle starts unsolved, and you complete it when there is nothing to solve anymore.<br />
Assembling a car is unfinished until all that go into it are assembled and no parts a left over.<br />
A game is not finished until the last objective is completed and a player has won.<span id="more-139"></span></p>
<p>In each example we have two states:</p>
<p>Puzzle: unsolved &#8211; solved<br />
Car: unassebled &#8211; assembled<br />
Game: uncompleted &#8211; completed</p>
<p>Each has a goal: Some kind of completness. Each time we make a decision, the puzzle becomes a little less unsolved, the car a bit more assembled the player in the game a bit closer to completing the last objective.</p>
<p>A crossword puzzle can be solved in any order of words. The player makes a choice, depending on his choices (even bad ones) he gets closer and closer to solving it.</p>
<p>You can assemble a car in many different ways, there is no defnite route, though some are obviously not possible and wrong.</p>
<p>A game has many decisions for him to make. Go left or go right. Buy a property in Monopoly or not. There will be eventually a final decision taht will lead to one player winning the game and the game is completed.</p>
<p>The above quote sais something is interactive (allows Interaction) if it&#8217;s state can be changed.</p>
<p>In a puzzle the state is not just purely black and white as solved/unsolved as it is in a game uncompleted/completed. True there are puzzles where you have only one solution and one action to do it. But that makes the puzzle still interactive.</p>
<p>A puzzle is like a lightswitch when it is that simple.<br />
________________________________________<br />
<em>A light switch is interactive. You fl ick it up, the light turns on. You flick it down, the light turns off. That’s interaction.</em> -Greg Costikyan<br />
________________________________________</p>
<p>According to that then: Puzzles are interactive, games are interactive.</p>
<p>Now, where do puzzles after all differ from games?</p>
<p>Greg sais puzzles are static. But are they? Puzzles don&#8217;t have change, or little change. They lack development. (see the definition of the word static below).</p>
<p>We clearly have shown that Puzzles are interactive. Can something that is interactive be static? The opposite of static is active. Is a puzzle active? By itself it is not, but through player interaction is becomes active. Each time we solve something and interact with it, it changes a bit more towards a solved state. With little to no change it is meant that the change is so small, the outcome doesn&#8217;t change whatsoever. Bbut in a puzzle, a change definitly has a strong direct impact on the outcome.<br />
A videogame is static unless there is some kind of input, be that the user or another piece of code such as AI that adds activity to it. The moment you add activity to it, you can get interaction. <strong>You can&#8217;t have interaction without activity.</strong></p>
<p>________________________________________<br />
<em>&#8220;Games,&#8221; by contrast, are not static, but change with the player&#8217;s actions.</em> -Chris Crawford paraphrased by Greg Costikyan<br />
________________________________________<br />
But so do puzzles!</p>
<p>Puzzles are interactive, games are interactive.<br />
Puzzles are active, games are active.</p>
<p>Are puzzles a game then?</p>
<p>________________________________________<br />
<em>Some puzzles are obviously so (static); no one would call a crossword a “game.”</em> -Greg Costikyan<br />
________________________________________</p>
<p>Why not? It has many of the same aspects that we associate with games.<br />
________________________________________<br />
<em>There is no opposition, there is no roleplaying, and there are no resources to manage; victory is solely a consequence of puzzle solving.</em> -Greg Costikyan<br />
________________________________________</p>
<p>Now this part contains something that makes a difference where we are concerned.</p>
<p>Let&#8217;s compare it with a dice game.</p>
<p>A dicegame usually doesn&#8217;t have roleplaying, doesn&#8217;t always have resource management BUT you can&#8217;t SOLVE a dice game. There is nothing to solve. Mainly chance and sometimes some skill or prediction via decision making is involved to win a dice game.</p>
<p>A puzzle on the other hand MUST be solved using knowlege. You can try to guess and rely on chance, but more often then not it won&#8217;t get you anywhere. You either solve a problem using your wits, or you don&#8217;t.</p>
<p><strong>Puzzles require logical thinking.</strong></p>
<p>What we consider as games on the other hand don&#8217;t require logical thinking. Poker doesn&#8217;t require logic to win. You can bluff your way through. DOOM doesn&#8217;t require logic, it requires skill in aiming and moving skillfully though the world. Yahtzee! doesn&#8217;t require logic, the player relies on chance to win the game.</p>
<p>Puzzles can only be won by logic, games can be won anyway. Thus, Puzzles could be considered not games. They can be however, be included inside games.</p>
<p>With this we found one additional trait we could add to our definition of game.</p>
<p style="text-align: center;"><strong>Games can be completed by other means then just logic.</strong></p>
<p style="text-align: left;">However, if we don&#8217;t consider this a facter of excluding puzzles from being a game, then puzzles must be a kind of game.</p>
<p style="text-align: center;"><strong> </strong></p>
<p style="text-align: left;">For common definitions what games are, you should visit<a href="http://gamedesignconcepts.wordpress.com"> Ian Schreibers&#8217;</a> website at: <a href="http://gamedesignconcepts.wordpress.com/2009/06/29/level-1-overview-what-is-a-game/">http://gamedesignconcepts.wordpress.com/2009/06/29/level-1-overview-what-is-a-game/</a><br />
He compiles a good many sources there and provides excellent descriptions and debates on the topic.</p>
<p>NOTES:<br />
You might ask why I go and rely on dictionary and thesaurus definitions of words. Game design is a young, to some degree subjective and term inconsistent business. Since there is no common terminology, we must rely on the exact meanings of the words we are using. To illustrate that I feel that some words are used wrongly, I like to show what they actually mean, and how they should be applied to our critical dialogue.</p>
<p>I also want to add that my conclusion is far from the last word spoken on this topic, and I encourage anyone who reads my article to try and disprove my statements and show my err in reasoning. It serves as a grounds for debate and help us define more clearly in the overall scheme of understanding game design, what games actually are, and how we can determine if something is a game or not.</p>
<p>To Greg Costikyan (if you happen to read it):<br />
I apologize to you if I look like I am shredding your paper and reasoning apart and scupulously attempt to disect your reasoning and it upsets you. I know I can sound a bit harsh at times. I have chosen to use your article because I believe it is one of the best ones there is when attempting to define what is a game and what is not. I hope it serves as a constructive debate. I did this with the greatest respect for you and your work. -Simon</p>
<p><strong>stat•ic</strong><br />
–adjective<br />
1.<br />
pertaining to or characterized by a fixed or stationary condition.<br />
2.<br />
showing little or no change: a static concept; a static relationship.<br />
3.<br />
lacking movement, development, or vitality: The novel was marred by static characterizations, especially in its central figures.</p>
<p><strong>ac•tive<br />
</strong>–adjective<br />
1.<br />
engaged in action; characterized by energetic work, participation, etc.; busy: an active life.<br />
2.<br />
being in a state of existence, progress, or motion: active hostilities.<br />
3.<br />
involving physical effort and action: active sports.<br />
4.<br />
having the power of quick motion; nimble: active as a gazelle.<br />
5.<br />
characterized by action, motion, volume, use, participation, etc.: an active market in wheat; an active list of subscribers.<br />
6.<br />
causing activity or change; capable of exerting influence (opposed to passive): active treason.<br />
7.<br />
effective (opposed to inert): active ingredients.</p>
<p><strong>in•ter•ac•tive</strong> (non-interactive would be those activities negated)<br />
–adjective<br />
1.<br />
acting one upon or with the other.<br />
2.<br />
of or pertaining to a two-way system of electronic communications, as by means of television or computer: interactive communications between families using two-way cable television.<br />
3.<br />
(of a computer program or system) interacting with a human user, often in a conversational way, to obtain data or commands and to give immediate results or updated information: For many years airline reservations have been handled by interactive computer systems.<br />
4.<br />
Acting or capable of acting on each other.<br />
5.<br />
Computer Science Of or relating to a program that responds to user activity.<br />
6.<br />
Of, relating to, or being a form of television entertainment in which the signal activates electronic apparatus in the viewer&#8217;s home or the viewer uses the apparatus to affect events on the screen, or both.</p>
<p><strong>interactive definition<br />
programming </strong><br />
A term describing a program whose input and output are interleaved, like a conversation, allowing the user&#8217;s input to depend on earlier output from the same run.<br />
The interaction with the user is usually conducted through either a text-based interface or a graphical user interface. Other kinds of interface, e.g. using speech recognition and/or speech synthesis, are also possible.<br />
This is in contrast to batch processing where all the input is prepared before the program runs and so cannot depend on the program&#8217;s output.<br />
(1996-06-21)</p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=139</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Text Formatting done better</title>
		<link>http://gameonaut.com/wordpress/?p=133</link>
		<comments>http://gameonaut.com/wordpress/?p=133#comments</comments>
		<pubDate>Sat, 24 Apr 2010 15:35:52 +0000</pubDate>
		<dc:creator>Levantulee</dc:creator>
				<category><![CDATA[Digital Life]]></category>

		<guid isPermaLink="false">http://gameonaut.com/wordpress/?p=133</guid>
		<description><![CDATA[There is a big difference between writing for normal documents and the web. This is even more apparent on blogs, B2C and informative websites then anywhere else. People want to &#8220;skim&#8221; the site for information and not ready every word. When Florian read my recently published Garden Planet post, he mentioned that it read more [...]]]></description>
			<content:encoded><![CDATA[<p>There is a big <strong>difference </strong>between <strong>writing </strong>for normal <strong>documents </strong>and the <strong>web</strong>.</p>
<p>This is even more apparent on blogs, B2C and informative websites then anywhere else. People want to &#8220;<strong>skim</strong>&#8221; the site <strong>for information</strong> and not ready every word.</p>
<p>When <a href="http://codeflow.org/" target="_blank">Florian</a> read my recently published <a href="http://gameonaut.com/wordpress/?p=75" target="_blank">Garden Planet</a> post, he mentioned that it read more like a book then a <strong>skim-able</strong> web entry.  He directed me to the <a href="http://www.useit.com/" target="_blank">UseIt Website</a> to read up on how to more effectively <a href="http://www.useit.com/papers/webwriting/" target="_self"><strong>write for the web</strong></a>.</p>
<p>To make a long story short, I try to do what the site suggests now and format my entries more according to <a href="http://www.useit.com/alertbox/9710a.html" target="_blank">what their research concludes</a>. You will find a lot more:</p>
<ul>
<li>Images</li>
<li><a href="http://www.useit.com/alertbox/nanocontent.html" target="_blank">Punch Words</a></li>
<li><a href="http://www.useit.com/alertbox/980906.html" target="_blank">Headers</a></li>
<li>Bullets</li>
<li><a href="http://www.useit.com/alertbox/20010722.html" target="_blank">Taglines</a></li>
<li>Bold Type</li>
<li>Links</li>
<li><a href="http://www.useit.com/alertbox/9606.html" target="_blank">Conclusions First</a></li>
<li><a href="http://www.useit.com/alertbox/intro-text.html" target="_blank">Less Blabla</a></li>
</ul>
<p>I hope those measures will help my avid reader to <strong>enjoy </strong>my site more and help them assimilate the information given.</p>
<p>Warning: I will add my own spin to all of this at times. I don&#8217;t believe in rigid rules. Also I will <em>reformat </em>older <em>entries </em>to become more <em>legible</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gameonaut.com/wordpress/?feed=rss2&amp;p=133</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

