<?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>The Magic Pantry &#187; RocketHands</title>
	<atom:link href="http://kranzky.rockethands.com/category/rockethands/feed/" rel="self" type="application/rss+xml" />
	<link>http://kranzky.rockethands.com</link>
	<description>the wonderful world of lloyd kranzky</description>
	<lastBuildDate>Wed, 28 Jul 2010 09:00:12 +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>Amazing First Week</title>
		<link>http://kranzky.rockethands.com/2010/06/03/amazing-first-week/</link>
		<comments>http://kranzky.rockethands.com/2010/06/03/amazing-first-week/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 04:20:35 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[Happiness]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=254</guid>
		<description><![CDATA[I sent out an email to a bunch of friends and family on Monday morning announcing the fact that I&#8217;ve resigned my job to focus on personal projects for the remainer of 2010. The response was overwhelming; I received many emails and phone calls, all very supportive, and some offering help. I&#8217;ve achieved the following [...]]]></description>
			<content:encoded><![CDATA[<p>I sent out an email to a bunch of friends and family on Monday morning announcing the fact that I&#8217;ve resigned my job to focus on personal projects for the remainer of 2010. The response was overwhelming; I received many emails and phone calls, all very supportive, and some offering help.</p>
<p>I&#8217;ve achieved the following things in my first sabbatical week:</p>
<ol>
<li>Found an office in Leederville that I&#8217;ll be moving into next Wednesday.</li>
<li>Completed a prototype of one of my projects, the d-board (get it <a href="http://www.rockethands.com/d-board/" target="_blank">here</a>).</li>
<li>Pitched three of my other ideas to a handful of people who are interested in funding them with Real Money &#8482;.</li>
<li>Met with an accountant to set things up for if and when I actually do make any money.</li>
<li>Started planning the implementation of MegaHAL10, another of my projects.</li>
</ol>
<p>Thanks all so much for the overwhelming support. It&#8217;s been great. And don&#8217;t forget to subscribe to &#8220;The Occasional Jason&#8221; if you want more detailed updates; the subscription form is over there on the right (if you&#8217;re viewing this on <a href="http://kranzky.rockethands.com/">my blog</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/06/03/amazing-first-week/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Postal Worker 13</title>
		<link>http://kranzky.rockethands.com/2010/04/15/postal-worker-13/</link>
		<comments>http://kranzky.rockethands.com/2010/04/15/postal-worker-13/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 15:40:03 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=242</guid>
		<description><![CDATA[Right, so I&#8217;m back in the thick of it. I spent tonight working on the InputManager, which is fairly rudimentary at the moment, but the overall plan is for each game context to be able to process input from a controller that abstracts away the specific hardware being used (which, for an iPhone, is keyboard, [...]]]></description>
			<content:encoded><![CDATA[<p>Right, so I&#8217;m back in the thick of it. I spent tonight working on the InputManager, which is fairly rudimentary at the moment, but the overall plan is for each game context to be able to process input from a controller that abstracts away the specific hardware being used (which, for an iPhone, is keyboard, pointer, location, compass, socket and accelerometer). It should be trivial, for example, to switch between controlling a game character with touch or tilt, without having to change any code in the game character entity itself (this makes prototyping much more fun; I wouldn&#8217;t expect you to offer that switch to the user in production however).</p>
<p>The other goal of the InputManager is to give game contexts and game systems controlled access to input controllers. For example, when a particular game context is active, it may require exclusive access to touch. In other circumstances, several game systems and contexts may use touch simultaneously (as would be the case when implementing game entity control with touch and overlaying a HUD that contains buttons that may be pressed). I want to avoid the usual technique of having entities, contexts and systems query the input devices directly, so that&#8217;s taking a bit of thought and hacking to figure out.</p>
<p>I expect I&#8217;ll be a day or two on this, and then will move onto entities.</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/04/15/postal-worker-13/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Postal Worker 12</title>
		<link>http://kranzky.rockethands.com/2010/01/29/postal-worker-12/</link>
		<comments>http://kranzky.rockethands.com/2010/01/29/postal-worker-12/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 16:47:01 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=156</guid>
		<description><![CDATA[Tomorrow marks the beginning of Global Game Jam 2010, which means I&#8217;ll take a brief respite from Postal Worker development. Expect the 13th installation to be late in the week next week. Tonight I started by implementing a pause mode in KranzkyEngine. You can now pause, resume and stop it. Pause is pretty straightforward to [...]]]></description>
			<content:encoded><![CDATA[<p>Tomorrow marks the beginning of <a href="http://rockethands.com/global-game-jam-2010" target="_blank">Global Game Jam 2010</a>, which means I&#8217;ll take a brief respite from Postal Worker development. Expect the 13th installation to be late in the week next week.</p>
<p>Tonight I started by implementing a pause mode in KranzkyEngine. You can now pause, resume and stop it. Pause is pretty straightforward to implement; the engine sets or clears a boolean flag, and passes a time delta of 0 to all update methods if it is paused. It worked without issues in the HelloKranzky sample game.</p>
<p>Of course, once the pause mode was in, I wanted to tap to pause and tap again to unpause. Sure, this could be hacked in quickly, but the whole point of this exercise is to build a neat, re-usable game engine, so I took the lengthier route. I realised that I want at least four &#8220;managers&#8221; in the game engine:</p>
<ul>
<li>The ContextManager, which you&#8217;ve met before</li>
<li>An InputManager, to take player input (keyboard, multitouch), appropriately transformed</li>
<li>An EntityManager, to handle all of the game objects, and</li>
<li>A SystemsManager, to handle various systems (like Physics), where each System is responsible for all of the Components that may be attached to Entities</li>
</ul>
<p>So I began by refactoring the ContextManager to derive from a KranzkyManager ABC, and then I added addManager and getManager calls to the Engine. Internally, the Engine iterates over the list of managers, calling update() and render() on each one.</p>
<p>The cool thing about this is that a game could, conceivably, add a new manager to the engine without touching any engine code. Which is awesome.</p>
<p>Anyway, by the end of the night I had the sample game running, identically to before, using the new system. And I didn&#8217;t have any time to implement the InputManager that started this whole thing off. That&#8217;ll be for next week :)</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/01/29/postal-worker-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postal Worker 11b</title>
		<link>http://kranzky.rockethands.com/2010/01/26/postal-worker-11b/</link>
		<comments>http://kranzky.rockethands.com/2010/01/26/postal-worker-11b/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 15:48:47 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[screenie]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=152</guid>
		<description><![CDATA[No update tonight &#8211; we had family dual-birthday celebrations at &#8220;The Burswood&#8221;, where we ate awesome food and watched fireworks from a distance. But, since I was asked, I thought I&#8217;d capture a screenie from the Kranzky Engine running on the iPhone. Note that there are three contexts running. They are called &#8220;Menu&#8221;, &#8220;Game&#8221; and [...]]]></description>
			<content:encoded><![CDATA[<p>No update tonight &#8211; we had family dual-birthday celebrations at &#8220;The Burswood&#8221;, where we ate awesome food and watched fireworks from a distance. But, since I <a href="http://kranzky.rockethands.com/2010/01/25/postal-worker-11/#comment-361">was asked</a>, I thought I&#8217;d capture a screenie from the Kranzky Engine running on the iPhone. Note that there are three contexts running. They are called &#8220;Menu&#8221;, &#8220;Game&#8221; and &#8220;Pause&#8221;. Unfortunately, the names of the contexts only print in the debug build, as the strings get stripped out of the release build (an aside; contexts are created by a class factory that takes a string name, and refer to each other via a string name &#8211; these strings are hashed to int32&#8242;s by Airplay). Note that the Menu context is transitioning to the Game context (one is stopping and one is starting), and that the game context, in its init() method, overlaid the Pause context (which is also starting). Finally, note that the Game context draws the Captain Onion sprite.</p>
<p><a href="http://kranzky.rockethands.com/wp-content/uploads/2010/01/IMG_0154.png"><img class="aligncenter size-full wp-image-153" title="pws_01" src="http://kranzky.rockethands.com/wp-content/uploads/2010/01/IMG_0154.png" alt="Postal Worker Screenie 01" width="480" height="320" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/01/26/postal-worker-11b/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Postal Worker 11</title>
		<link>http://kranzky.rockethands.com/2010/01/25/postal-worker-11/</link>
		<comments>http://kranzky.rockethands.com/2010/01/25/postal-worker-11/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 15:57:37 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=150</guid>
		<description><![CDATA[Pretty happy tonight that the game context manager has come together so nicely. I&#8217;ve created a bunch of different contexts (splash, menu, game, pause), and can easily transition them in and out, and overlay them on one another. It&#8217;s all pretty cool. The only wrinkle is that there was a perceivable pause when the &#8220;Captain [...]]]></description>
			<content:encoded><![CDATA[<p>Pretty happy tonight that the game context manager has come together so nicely. I&#8217;ve created a bunch of different contexts (splash, menu, game, pause), and can easily transition them in and out, and overlay them on one another. It&#8217;s all pretty cool. The only wrinkle is that there was a perceivable pause when the &#8220;Captain Onion&#8221; sprite is loaded, which happens when the game context initialises. This lead me down the path of figuring out how AirPlay&#8217;s resource manager does its thing; something I&#8217;m still in the thick of even though my two hours for tonight are up. So, that&#8217;ll be the plan for tomorrow: finish figuring it out!</p>
<p>After that, I expect I&#8217;ll start looking at handling user input, and making the various game contexts able to process input, steal focus and so forth.</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/01/25/postal-worker-11/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Postal Worker 10</title>
		<link>http://kranzky.rockethands.com/2010/01/24/postal-worker-10/</link>
		<comments>http://kranzky.rockethands.com/2010/01/24/postal-worker-10/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 16:44:48 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=146</guid>
		<description><![CDATA[Wow &#8211; 20% of the way through the project. Scary stuff. Tonight I got the first version of the ContextManager up and running. Right now the KranzkyEngine has the following structure: KranzkySingleton KranzkyEngine &#60; KranzkySingleton Initialise the AirPlay framework Hook into iPhone events Run the main loop Call KranzkyContextManager to update and render KranzkyContextManager &#60; [...]]]></description>
			<content:encoded><![CDATA[<p>Wow &#8211; 20% of the way through the project. Scary stuff.</p>
<p>Tonight I got the first version of the ContextManager up and running. Right now the KranzkyEngine has the following structure:</p>
<ul>
<li>KranzkySingleton</li>
<li>KranzkyEngine &lt; KranzkySingleton
<ul>
<li>Initialise the AirPlay framework</li>
<li>Hook into iPhone events</li>
<li>Run the main loop
<ul>
<li>Call KranzkyContextManager to update and render</li>
</ul>
</li>
</ul>
</li>
<li>KranzkyContextManager &lt; KranzkySingleton
<ul>
<li>Manage the list of known KranzkyContext objects</li>
<li>Manage the list of currently running KranzkyContext objects</li>
<li>Handle overlaying one KranzkyContext on another</li>
<li>Handle transitioning from one KranzkyContext to another</li>
</ul>
</li>
<li>KranzkyContext
<ul>
<li>Handle state transitions (ready -&gt; waiting -&gt; starting -&gt; running -&gt; stopping -&gt; stopped</li>
</ul>
</li>
</ul>
<p>The &#8220;HelloKranzky&#8221; sample game looks like this:</p>
<ul>
<li>GameContext &lt; KranzkyContext
<ul>
<li>Implement update and render</li>
</ul>
</li>
<li>HelloKranzky
<ul>
<li>Add the GameContext to the KranzkyEngine</li>
<li>Then tell the KranzkyEngine to start at the GameContext</li>
<li>Then call Kranzky::Engine::instance()-&gt;main()</li>
</ul>
</li>
</ul>
<p>This is all very cool. The next step will be to implement a bunch of different contexts to represent all of the different states of PostalWorker, and to hook them up to implement the click-through storyboard that I mentioned previously (and which I was hoping to have done by this update). I&#8217;ll likely find a few bugs in the implementation so far, as the storyboard will make use of stacked contexts with transitions as they start and stop. But that&#8217;s all good!</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/01/24/postal-worker-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Postal Worker 09</title>
		<link>http://kranzky.rockethands.com/2010/01/22/postal-worker-09/</link>
		<comments>http://kranzky.rockethands.com/2010/01/22/postal-worker-09/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 16:25:43 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=143</guid>
		<description><![CDATA[Tonight I got a big chunk of work done on the Context and ContextManager, and I spent some time pulling apart the generic KranzkyEngine from the toy game that uses it (which is called HelloKranzky). Still a bit more to do until I can implement the click-through storyboard I mentioned, so looks like I&#8217;ll miss [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I got a big chunk of work done on the Context and ContextManager, and I spent some time pulling apart the generic KranzkyEngine from the toy game that uses it (which is called HelloKranzky). Still a bit more to do until I can implement the click-through storyboard I mentioned, so looks like I&#8217;ll miss my deadline by a day or two (especially since a fortnight of birthday celebrations begins tomorrow).</p>
<p>Apart from that, we <a href="http://www.rockethands.com/" target="_blank">RocketHands</a> folks have been debating the best way to involve a third-party in the development of one of our games. This was motivated because Postal Worker was conceived by me and two outsiders at GCAP in Melbourne last December, and one of those people (Pazu) will likely be doing the art for the game. RocketHands will publish the game, and I&#8217;m working in my role as a RocketHands team member, so what happens if the game does ballistic and pulls in a cool one million dollars?</p>
<p>Well, in that case, Pazu (who would happily work on a project such as this just for the fun of it) would be rightly annoyed. So how much of that $1m would he deserve to get? And what about the mysterious &#8220;third man&#8221; who helped us conceive this baby? Should he get anything? How much value can be placed on that brief conversation over coffees during a conference compared to actually designing and implementing a game? Really, my main motivation would be to funnel a substantial amount of that $1m into RocketHands, to allow us to set up the company as our primary concern, and to do what we love for a living.</p>
<p>We&#8217;re toying with a three-tiered model, which goes something like this:</p>
<ul>
<li>The first $X of revenue goes straight to RocketHands (to recoup costs associated with marketing and publishing).</li>
<li>The next $Y of revenue is used to pay for work done, at a reasonable rate.</li>
<li>After that, Z% goes to RocketHands, and (100 &#8211; Z%) goes to the development team. The development team decides how to split things up.</li>
</ul>
<p>So, in our hypothetical &#8220;Postal Worker Makes One Million Dollars&#8221; thought experiment, we might do something like this:</p>
<ul>
<li>$1000 goes to RocketHands, to pay for mailing out all that fancy Postal Worker schwag to the games journalists, helping us get awesome revues.</li>
<li>$9000 goes to Pazu and me. I get $6000 (100 hours at $60/hr) and he gets $3000 (50 hours at $60/hr).</li>
<li>70% of what&#8217;s left goes to RocketHands (that&#8217;s $693000 &#8211; we quit our jobs, lease an office and start working on our XBLA game).</li>
<li>30% of what&#8217;s left goes to Pazu and me (that&#8217;s $297000).  We give $25k to the mysterious &#8220;third man&#8221; to keep him quiet, and $2k to charity. I then get 2/3 of it (because I worked 100 hours and Pazu worked 50), which comes out to $180k. Pazu gets a measly $90k.</li>
</ul>
<p>My question to you is this: who is getting ripped off here? Does it seem fair that RocketHands, which didn&#8217;t really do all that much, made a whopping amount of money? Especially when Pazu only ends up getting a bit less than 10% of the total earnings? Or, does $93k for a coffee in a hotel and a weeks worth of work seem like a good deal?</p>
<p>Pazu, your thoughts please&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/01/22/postal-worker-09/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Postal Worker 08</title>
		<link>http://kranzky.rockethands.com/2010/01/20/postal-worker-08/</link>
		<comments>http://kranzky.rockethands.com/2010/01/20/postal-worker-08/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 15:39:08 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=140</guid>
		<description><![CDATA[I mentioned to Beetlefeet at lunch today that I really need to go through the AirPlay documentation to make sure I&#8217;m aware of everything that&#8217;s there, because up until now I&#8217;ve only referenced it on a need-to-know basis. Well, that pretty much sums up how I&#8217;ve spent my two hours tonight. I started by putting [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned to <a href="http://www.beetlefeet.net/" target="_blank">Beetlefeet</a> at lunch today that I really need to go through the AirPlay documentation to make sure I&#8217;m aware of everything that&#8217;s there, because up until now I&#8217;ve only referenced it on a need-to-know basis. Well, that pretty much sums up how I&#8217;ve spent my two hours tonight. I started by putting the final spit-and-polish on the main game loop, before skimming through the documentation, top-to-bottom, and quickly hacking out little test scenarios when things didn&#8217;t make sense, or sounded interesting. All that should come in useful over the next few weeks.</p>
<p>I finished off the night by stubbing out the rest of the Context Manager (which I&#8217;m now calling the Game State Manager). I should be able to finish off the bulk of that tomorrow. I expect the trickiest part will be investigating how to maintain a stack of Contexts, and how to retrieve them by name. AirPlay SDK has an Array type and a fast string hashing implementation to enable that kind of thing, and recommends not to use the STL. So a simple hash map may be a bit more work, and more of a lower level, than normal. Got to make sure I get it right!</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/01/20/postal-worker-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postal Worker 07</title>
		<link>http://kranzky.rockethands.com/2010/01/20/postal-worker-07/</link>
		<comments>http://kranzky.rockethands.com/2010/01/20/postal-worker-07/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 16:01:04 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=137</guid>
		<description><![CDATA[Tonight was pretty mundane. In no particular order, I set Pazu up with an ad-hoc build; made sure my iMac has a static IP, as I need to run a server on it for packaging the game for iPhone deployment; figured out how to view crash logs on the iPhone; got more excited about GDB [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight was pretty mundane. In no particular order, I</p>
<ul>
<li>set Pazu up with an ad-hoc build;</li>
<li>made sure my iMac has a static IP, as I need to run a server on it for packaging the game for iPhone deployment;</li>
<li>figured out how to view crash logs on the iPhone;</li>
<li>got more excited about GDB on Windows for debugging the ARM build (yep, found and fixed a crash bug);</li>
<li>continued work on the game state manager; and</li>
<li>improved the main game loop.</li>
</ul>
<p>Things are progressing nicely, and I&#8217;m quite comfortable with the tools I&#8217;m using to build stuff. I need to sweat the small stuff at this stage of the project, as getting things right now will provide me with firm foundations for building the rest of the game. One example of this is the main game loop. I need to make sure that the time deltas I pass to the update are either fixed or within some reasonable range, I need to yield to the OS correctly and frequently enough, and I need to make sure I can handle being interrupted (by a phone call, for example).</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/01/20/postal-worker-07/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Postal Worker 06</title>
		<link>http://kranzky.rockethands.com/2010/01/18/postal-worker-06/</link>
		<comments>http://kranzky.rockethands.com/2010/01/18/postal-worker-06/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 14:39:28 +0000</pubDate>
		<dc:creator>Lloyd Kranzky</dc:creator>
				<category><![CDATA[RocketHands]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://kranzky.rockethands.com/?p=135</guid>
		<description><![CDATA[Tonight I thought I&#8217;d start work on KranzkyEngine, after upgrading my AirPlay SDK license to remove the annoying EULA message when launching apps. Porting Box2D can wait for another day! I want to write a game state manager that supports a stack of game states, making it possible to draw the game menu on top [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I thought I&#8217;d start work on KranzkyEngine, after upgrading my AirPlay SDK license to remove the annoying EULA message when launching apps. Porting Box2D can wait for another day!</p>
<p>I want to write a game state manager that supports a stack of game states, making it possible to draw the game menu on top of the game proper, without those two things needing to know about each other, and even to separate the HUD in the game proper out into its own state. Ideally, with nothing more than the game state manager and a little bit of engine framework code, I&#8217;ll be able to implement a playable storyboard version of the game that can be clicked through on the iPhone. Once that&#8217;s working, it&#8217;ll be on to entity management (I want to do a nice clean component-based system, and that&#8217;ll take some thinking to get straight). Entities will naturally lead into Physics, and that&#8217;s when I can start worrying about Box2D.</p>
<p>The PC version of KranzkyEngine has been used on quite a few projects (<a href="http://gamejam.org/teams/TheKranzkyBrothers/" target="_blank">Thrust Harder</a>, <a href="http://rockethands.com/99sheep" target="_blank">99Sheep</a>, <a href="http://www.globalgamejam.org/games/brown-cloud" target="_blank">Brown Cloud</a>, dBoard and so on), and RocketHands wants to release it as our rapid prototyping framework, much as 2D Boy <a href="http://2dboy.com/2009/05/27/rapid-prototyping-framework/" target="_blank">did with theirs</a>. I&#8217;m hoping that working on a mobile device version of KranzkyEngine will help me to clean up the PC version considerably, and that we&#8217;ll be able to release <em>both </em>versions Real Soon Now &#8482;.</p>
<h3>Game Engine</h3>
<p>The Game Engine (or GE) is responsible for setting things up, running the main game loop, and tearing things down afterwards. In the case of the iPhone and other mobile devices, it will probably also be responsible for saving and restoring game state, and handling all of that mess. It calls into the Game State Manager both to update and render the game current state(s) of the game, and knows to call render() as often as possible, and update() at a fixed rate. The GE handles input, routing it into the Game State Manager, and is also responsible for updating the Entities Manager and other subsystems (such as the Physics Manager and the Sound Manager).</p>
<h3>Game State Manager</h3>
<p>The Game State Manager (or GSM) is responsible for handling game states. It keeps a stack of active game states, and handles transitioning them in and out. It renders the current state of the game by knowing which of the states in the stack can render visible content (the states contain data that provides this information), and then calls render bottom-to-top, so we can have the game scene with a HUD laid over the top, and then a game menu laid over the top of that. Update is called on each game state in the stack, and input is provided to states from the top-down, until a state is reached that requires exclusive input focus.</p>
<p>Each game state can be inactive, transitioning in, active or transitioning out, and they may specify how long each transition occurs. This allows menus to slide in and out, and even such basic things as having the main display fade to black. Game states have init() and fini() methods to allow entities to be created and destroyed, for example. In their update() methods, they may query other subsystems, but aren&#8217;t required to call update() on anything else (that&#8217;s Someone Else&#8217;s Problem.</p>
<p>Tonight I got a very basic game engine up-and-running. It will be a few more nights before I have the game state manager working to my satisfaction. Perhaps a good deadline is to deliver the storyboard clickthrough at the end of this week?</p>
]]></content:encoded>
			<wfw:commentRss>http://kranzky.rockethands.com/2010/01/18/postal-worker-06/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
