<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Abe&#039;s Blog</title>
	<atom:link href="http://abepralle.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://abepralle.wordpress.com</link>
	<description>The Life and Times of a Game Developer</description>
	<lastBuildDate>Fri, 09 Dec 2011 02:22:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='abepralle.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Abe&#039;s Blog</title>
		<link>http://abepralle.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://abepralle.wordpress.com/osd.xml" title="Abe&#039;s Blog" />
	<atom:link rel='hub' href='http://abepralle.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A Neat Variable-Byte Encoding for Integers</title>
		<link>http://abepralle.wordpress.com/2011/11/11/a-neat-variable-byte-encoding-for-integers/</link>
		<comments>http://abepralle.wordpress.com/2011/11/11/a-neat-variable-byte-encoding-for-integers/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 03:49:27 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=195</guid>
		<description><![CDATA[Bard bytecode files are stored using variable-length integers &#8211; since most of the opcodes and string lengths, etc., are seven bits or less, it saves a lot of space overall.  In the past I used a system that was roughly UTF-8-ish in design but with one special modification: since negative one is a fairly common [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=195&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>Bard</em> bytecode files are stored using variable-length integers &#8211; since most of the opcodes and string lengths, etc., are seven bits or less, it saves a lot of space overall.  In the past I used a system that was roughly UTF-8-ish in design but with one special modification: since negative one is a fairly common index and operand, I added one to my integer value before encoding it so that numbers -1..126 would be stored as a single byte (and a leading &#8217;1&#8242; bit would indicate a multi-byte value).</p>
<p>I thought about that design again today and for whatever reason a much better system came to mind.  Here&#8217;s the spec:</p>
<pre>Leading byte:
  01111111 // 0 - 127
  1000xxxx // 1 byte follows - 12 bits total
  1001xxxx // 2 bytes follow - 20 bits total
  1010xxxx // 3 bytes follow - 28 bits total
  10110000 // 4 bytes follow - 32 bits total
  11xxxxxx // a negative value -64..-1, e.g:
  11000000 // -64
  11111111 // -1</pre>
<div>The cool thing is that values −64..127 can be simply truncated to a byte with no other encoding processing required!  Not only that, but 15 bit patterns 10110001 through 10111111 are still available any other special markers you might need.</div>
<div>On an unrelated note &#8211; I got majorly busy on a big contract project just after I posted my &#8220;One Game a Week&#8221; plan, so that&#8217;s on hold.</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=195&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2011/11/11/a-neat-variable-byte-encoding-for-integers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Solo Brainstorming</title>
		<link>http://abepralle.wordpress.com/2011/09/13/effective-solo-brainstorming/</link>
		<comments>http://abepralle.wordpress.com/2011/09/13/effective-solo-brainstorming/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 01:37:43 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=189</guid>
		<description><![CDATA[I&#8217;ve recently become a lot better at solo brainstorming.  It&#8217;s always been fun to brainstorm with other people and bounce ideas off each other (&#8220;oh, it&#8217;d be cool if XYZ!&#8221;) but for a while there I hadn&#8217;t had the opportunity to do that and so I&#8217;d just kinda stopped brainstorming in any productive way.  It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=189&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently become a lot better at solo brainstorming.  It&#8217;s always been fun to brainstorm with other people and bounce ideas off each other (&#8220;oh, it&#8217;d be cool if XYZ!&#8221;) but for a while there I hadn&#8217;t had the opportunity to do that and so I&#8217;d just kinda stopped brainstorming in any productive way.  It took me a while to realize that fact, but once I did I also realized I needed to figure out some way to become a more effective solo brainstormer</p>
<h3>Rubber Ducky Debugging</h3>
<p>I took a cue from the Rubber Ducky Debugging technique.  The trick behind RDD is to explain your programming problems to an inanimate object (say, a rubber ducky).  While it can be hard spot the logic error when your thoughts are just swirling around in your head, once you&#8217;ve laid out the problem in black and white &#8211; as if explaining it to someone &#8211; you&#8217;ll usually spot the solution yourself.  It totally works!  I&#8217;ve used it many a time &#8211; though often it&#8217;s been &#8220;Instant Messenger To An Away Friend Debugging&#8221;, where I&#8217;ll type out my problem to a friend who&#8217;s AFK and then I&#8217;ll figure out the problem before they get a chance to say anything back.</p>
<h3>Rambling</h3>
<p>So here&#8217;s the trick: for effective solo brainstorming just open up a text editor or word processor and have a conversation with yourself.  Start rambling on about your game.  Type out questions and blurt out ideas and responses.  Fragments are fine, don&#8217;t worry too much about syntax and clarity.  Type one idea after another in a loose, informal outline and don&#8217;t hesitate to skip around as the ideas come.  The most important thing is to not worry about making a polished document because as soon as you start doing that you start killing the creative fount by suppressing the thoughts as they come in order to organize and format what you have so far.</p>
<p>For myself I have a Git repository called &#8220;design&#8221; and in that I have a bunch of TXT files.  The main one is &#8220;ideas.txt&#8221; and I&#8217;ll just go through jotting down whatever rough concepts I have.  As soon as a particular game idea starts taking on a life of its own &#8211; with me writing down more and more bullet points &#8211; I&#8217;ll spin it off as a new text file.  Currently I have a fair number of these text files for semi-fleshed out games and I&#8217;ll brainstorm on all of them at once, at first just focusing on whichever one sounds the most interesting at the moment and then I&#8217;ll invariably jump around to my different documents and add an idea here and an idea there.</p>
<p>The advantage of using actual text files instead of notebooks or paper napkins is that the text files are much easier to keep organized.  My notebook brainstorming might revisit a particular game on pages 3, 8, 10, and 19, whereas on my computer I&#8217;ll just type in the notes into the appropriate document.  Transferring ideas from napkins and notebook to your design files later would certainly work as well.</p>
<p>Here&#8217;s an example of how one of my design files might evolve.  I&#8217;ll sometimes use asterisks (***) to mark an idea I&#8217;m really keen on in the middle of my session.  Note: I was going to just do an example on the fly &#8211; but it turned into a really cool idea I want to keep close to the vest for now!  I&#8217;m just going to retrofit our existing game &#8220;Fish Hunter&#8221; to the rambling design file as if we&#8217;d used that system instead of brainstorming amongst ourselves.</p>
<blockquote><p>REDNECK FISHING<br />
Need quick, simple game for Palm OS<br />
Hunting games (shooting) are really popular with casual players<br />
Fishing games are really popular<br />
Make a shooting+fishing game<br />
Redneck in boat, shooting fish and dropping dynamite in the water<br />
Drinks beer?<br />
Have to shoot a target number of fish before the time runs out<br />
- then go to next level</p>
<p>Control scheme?<br />
- Could just tap on fish to shoot at them<br />
- BUT don&#8217;t want to make it too easy<br />
- Maybe virtual joystick<br />
- OR Drag finger on screen to change aim to that spot.  Tap to shoot.</p>
<p>Powerups?<br />
- Dynamite, rapid-fire, three-way shot<br />
- How to get?<br />
- Maybe power-ups in the water that you shoot</p>
<p>There&#8217;s no danger&#8230; time just runs out.<br />
Water danger = sharks<br />
***Sharks come straight for you, game over when they get to you.<br />
No levels &#8211; just get as high a score as you can.<br />
Lives?  Nah&#8230;</p>
<p>Palm doesn&#8217;t support dragging [or something like this, I forget exactly]<br />
Maybe just tap to shoot fish overall<br />
Maybe fish are a little faster, bullets are a little slower than I was thinking</p>
<p>What determines score?<br />
- Small fish vs big fish<br />
- Hits in a row<br />
*** power-up idea: like Modern Warfare 2 &#8211; the longer your killstreak the better a powerup you get.  When your killstreak is broken you still have whatever powerup you were able to get to<br />
&#8230;</p></blockquote>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=189&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2011/09/13/effective-solo-brainstorming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title></title>
		<link>http://abepralle.wordpress.com/2011/09/09/179/</link>
		<comments>http://abepralle.wordpress.com/2011/09/09/179/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 22:21:12 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=179</guid>
		<description><![CDATA[Overview After the iPhone&#8217;s touch screen came out all kinds of interesting control schemes have emerged.  After implementing my fair share of overcomplicated and frustrating schemes, I&#8217;d like to give my thoughts on the best ways (and worst) ways to implement touch controls. Problematic Touch Controls Never say never, of course, but we&#8217;ve had user [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=179&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Overview</h1>
<p>After the iPhone&#8217;s touch screen came out all kinds of interesting control schemes have emerged.  After implementing my fair share of overcomplicated and frustrating schemes, I&#8217;d like to give my thoughts on the best ways (and worst) ways to implement touch controls.</p>
<p><span id="more-179"></span></p>
<h1>Problematic Touch Controls</h1>
<p>Never say never, of course, but we&#8217;ve had user frustration issues with all of the following:</p>
<p><strong>Heavy Dragging</strong><br />
Dragging your finger constantly around the glass screen for minutes at a time (<em>Air Hockey, Deathride) </em>becomes somewhat uncomfortable after a while.  You can&#8217;t just swap out mouse movement control with fingertip control!</p>
<p><strong>Virtual Joystick</strong><em><br />
Even though</em> they&#8217;re heavily used in mobile games<strong></strong>, virtual joysticks are a poor substitute for the real thing.  It&#8217;s easy for your finger to slip off-center or run off the edge of the screen.  Using the sides of the screen (which are easier to keep track of) can work for a slower-paced game, but the distance from edge to edge is a little unwieldy for arcade-style games.</p>
<p><strong>Relative Tapping</strong><br />
Relative taps (tap to the right of the hero to slide or turn right, etc.) make a lot of sense in theory, but as we&#8217;ve discovered with <em>Armageddon Rider</em> and <em>Zombie Conga</em>, this idea of &#8220;it matters where you tap but not what you tap on&#8221; can be a little too abstract (for casual players, at least).</p>
<p><strong>Multi-Finger Taps and Swipes<br />
</strong>You can explain it all you want in the instructions, but if you have to do a two-fingered tap to bring up the menu or some such then you&#8217;ll just frustrate the majority of players who either didn&#8217;t read the instructions or have forgotten those special cases by now.<strong></strong></p>
<h1></h1>
<h1>Elegant Touch Controls<strong></strong></h1>
<p><strong>Tap<br />
</strong>There&#8217;s nothing easier or more transparent to the user than tapping on a big, clearly visible button or tile.  Just make sure the buttons don&#8217;t blend in to the background too much &#8211; and if you ever catch yourself requiring the user to tap a tile and then another tile next to it, consider a swipe instead.</p>
<p><strong>Light Dragging<br />
</strong>There&#8217;s certainly a place for dragging as long as the player&#8217;s fingertip is given a break at regular intervals.  The biggest danger then is in players not realizing they <em>can</em> drag something around!</p>
<p><strong>Swipe<br />
</strong>Swiping is one of the most elegant, most underutilized tools that touch game designers have at their disposal.  When it came to replacing the keyboard and D-Pad with a touch screen, most of us thought a little too literally and made virtual buttons.  But what is the purpose of keys in most PC games?  It&#8217;s not to type in W, A, S, and D, it&#8217;s to move the hero up, left, down, and right.  For discrete movements, nothing&#8217;s easier on a touch screen &#8211; just swipe up to go up, etc.  The swipes can be anywhere on screen and they still work just like a D-Pad!  As a bonus, you can then have a world with much smaller tiles than you could have if you needed to be able to tap on a particular tile to walk to it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=179&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2011/09/09/179/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title>One Game Every Week</title>
		<link>http://abepralle.wordpress.com/2011/09/09/one-game-every-week/</link>
		<comments>http://abepralle.wordpress.com/2011/09/09/one-game-every-week/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 17:26:01 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=173</guid>
		<description><![CDATA[I&#8217;m currently in Edinburgh, Scotland, finishing up the last few days of my month-long working vacation in the United Kingdom.  I&#8217;ve really enjoyed the change of pace &#8211; it&#8217;s given me time to step back and think about everything &#8211; to reflect and to soul-search &#8211; and I feel like I&#8217;ve gained some new insights [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=173&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently in Edinburgh, Scotland, finishing up the last few days of my month-long working vacation in the United Kingdom.  I&#8217;ve really enjoyed the change of pace &#8211; it&#8217;s given me time to step back and think about everything &#8211; to reflect and to soul-search &#8211; and I feel like I&#8217;ve gained some new insights into my life and my career path.  Here at the end my little whirlwinds of speculative thought, sent out like robotic probes to explore new avenues of possible endeavor, are returning once more with their findings to converge into a coherent plan of action.</p>
<p>I&#8217;ve realized what the missing piece of the puzzle is for us (or at least for me) to be a successful independent and autonomous game developer.  In short it&#8217;s about establishing personal deadlines and working on small, manageable projects.  But let me take you through my reasoning.</p>
<p>I&#8217;ve been thinking about time management, productivity, and working for the Man versus working for ourselves.  Consider Parkinson&#8217;s Law as described in &#8220;The 4 Hour Work Week&#8221;:</p>
<blockquote><p>If you’re an employee, spending time on nonsense is, to some extent, not your fault. There is often no incentive to use time well unless you are paid on commission. The world has agreed to shuffle papers between 9:00 A.M. and 5:00 P.M., and since you’re trapped in the office for that period of servitude, you are compelled to create activities to fill that time. Time is wasted because there is so much time available. It’s understandable. Now that you have the new goal of negotiating a remote work arrangement instead of just collecting a paycheck, it’s time to revisit the status quo and become effective. The best employees have the most leverage. For the entrepreneur, the wasteful use of time is a matter of bad habit and imitation. I am no exception. Most entrepreneurs were once employees and come from the 9–5 culture. Thus they adopt the same schedule, whether or not they function at 9:00 A.M. or need 8 hours to generate their target income. This schedule is a collective social agreement and a dinosaur legacy of the results-by-volume approach. How is it possible that all the people in the world need exactly 8 hours to accomplish their work? It isn’t. 9–5 is arbitrary. You don’t need 8 hours per day to become a legitimate millionaire—let alone have the means to live like one. Eight hours per week is often excessive, but I don’t expect all of you to believe me just yet. I know you probably feel as I did for a long time: There just aren’t enough hours in the day.</p>
<p>But let’s consider a few things we can probably agree on. Since we have 8 hours to fill, we fill 8 hours. If we had 15, we would fill 15. If we have an emergency and need to suddenly leave work in 2 hours but have pending deadlines, we miraculously complete those assignments in 2 hours. It is all related to a law that was introduced to me by Ed Zschau in the spring of 2000.<br />
[...]<br />
Parkinson’s Law dictates that a task will swell in (perceived) importance and complexity in relation to the time allotted for its completion. It is the magic of the imminent deadline. If I give you 24 hours to complete a project, the time pressure forces you to focus on execution, and you have no choice but to do only the bare essentials. If I give you a week to complete the same task, it’s six days of making a mountain out of a molehill. If I give you two months, God forbid, it becomes a mental monster. The end product of the shorter deadline is almost inevitably of equal or higher quality due to greater focus. This presents a very curious phenomenon. There are two synergistic approaches for increasing productivity that are inversions of each other: Limit tasks to the important to shorten work time (80/20). Shorten work time to limit tasks to the important (Parkinson’s Law). The best solution is to use both together: Identify the few critical tasks that contribute most to income and schedule them with very short and clear deadlines. If you haven’t identified the mission-critical tasks and set aggressive start and end times for their completion, the unimportant becomes the important. Even if you know what’s critical, without deadlines that create focus, the minor tasks forced upon you (or invented, in the case of the entrepreneur) will swell to consume time until another bit of minutiae jumps in to replace it, leaving you at the end of the day with nothing accomplished. How else could dropping off a package at UPS, setting a few appointments, and checking e-mail consume an entire 9–5 day? Don’t feel bad. I spent months jumping from one interruption to the next, feeling run by my business instead of the other way around.</p></blockquote>
<p>The best and worst thing about working for the Man is having someone who tells you what to do.  It limits freedom but it creates focus.</p>
<p>I&#8217;ve finally admitted to myself that my self-directed efforts to date have involved a lot of time mismanagement.  Not as in &#8220;not doing work&#8221;, but as in following too many tangents, losing focus on what&#8217;s most important, and tackling projects that are really too large or too untested for our current means (i.e. income level).</p>
<p>Even though I would always caution my students against it, I have myself fallen into the trap of the Big Game Hunter.  The BGH fallacy lies in saying that &#8220;developing this game will be a lot of work&#8230; but it will be bigger or better or more exotic than the other stuff out there and it will be awesome and it will be <em>worth it</em>.&#8221;</p>
<p>That approach doesn&#8217;t work in general.  It&#8217;s not just a risk/reward thing &#8211; it&#8217;s not just about putting your eggs in one basket and gambling on one big game over a bunch of small games.  Primarily the issue is one of experience.</p>
<p>A modern version of <em>The Tortoise and the Hare</em> would go something like this:</p>
<blockquote><p>The tortoise and hare make a bet as to who can build a small castle more quickly.  The hare starts out piling rocks on top of one another straight away while the tortoise builds a deck for his house, a shed, a guest house, and then a brick office building.  After a few months the tortoise starts building his castle while the hare&#8217;s crooked, uneven walls start falling down due to a lack of reinforcement, poor mortar mix, and spring rains.  After a year the tortoise&#8217;s castle is finished and sound while the hare&#8217;s jury-rigged efforts are only half-way done and are once again on the edge of disaster.</p></blockquote>
<p>The point being, of course, that by working on small games first you&#8217;ll naturally work up to big games and have a lot of small games to show for it besides!</p>
<p><em>Outliers: The Story of Success</em> estimates that it takes the average person 10,000 hours to become an expert at their work.  It notes how, long before they were famous, the Beatles were playing all-night eight-hour gigs for weeks at a time.  In short they put in their time and they earned their chops.  I&#8217;ve definitely put in my 10,000 hours&#8230; on programming.  But not on game design and development.  That&#8217;s what I&#8217;m going to work on with a vengeance, starting now.</p>
<p>To help gain that experience, that focus, that pressure of the deadline to clarify what&#8217;s important and what&#8217;s doable, and to become the Big Game Hunter I want to be, I&#8217;m going to start releasing or submitting a new or upgraded game <strong>every Friday</strong>, with next Friday being the first release<strong>.</strong></p>
<p>I&#8217;m going to start with updating our four &#8220;Jirbo games&#8221;.  <em>Silo, Fish Hunter, Mr. Gibs, </em>and <em>Guys Night Out</em> were originally published by Jirbo on iOS but we&#8217;ve acquired them back again.  I&#8217;ve needed to do something about them for a while because they&#8217;ve all got the fricken&#8217; keyboard bug where the virtual keyboard hasn&#8217;t shown up since iOS<em></em> ~4.1 or so (the buck stopped here on my desk but then rolled under it and was in limbo for a while).  So next Friday we&#8217;ll be releasing an upgraded version of <em>Fish Hunter</em> for Android and submitting it for <em>iOS </em>and <em>Windows Phone 7</em>.</p>
<p>After those four games it&#8217;ll be a mix of upgrades and new game releases (probably saving the upgrades for times when art or something isn&#8217;t ready for whatever new game I&#8217;m working on).  <em>But no more than one game per week</em>!  While I want a deadline, I also want to leave some time for R&amp;D and some time to chip away on larger projects that can&#8217;t be ready in a week (including Plasmacore) &#8211; or some time to work on ongoing contract work if need be.  Unless there&#8217;s a severe crunch, I&#8217;m going to keep doing my weekly release even when working on other contract jobs.</p>
<p>One-week games might have to turn into two-week games (or longer) eventually &#8211; but then again maybe not!  I could see the idea turning into Agile Development at its best, with larger games developed iteratively as a series of actual weekly releases.</p>
<p>I&#8217;m pumped!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=173&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2011/09/09/one-game-every-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving Back!</title>
		<link>http://abepralle.wordpress.com/2011/09/09/moving-back/</link>
		<comments>http://abepralle.wordpress.com/2011/09/09/moving-back/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 11:15:36 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=170</guid>
		<description><![CDATA[Well my code blogging has been about zero lately, and I miss it, and I&#8217;m coming back. In retrospect I have to say that forums like I was trying to switch to are 1) niche and 2) better for discussions than articles.  I&#8217;ve been writing blogs about other things using Facebook Notes, but blogging has [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=170&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well my code blogging has been about zero lately, and I miss it, and I&#8217;m coming back.</p>
<p>In retrospect I have to say that forums like I was trying to switch to are 1) niche and 2) better for discussions than articles.  I&#8217;ve been writing blogs about other things using Facebook Notes, but blogging has never been a strong point for Facebook &#8211; in particular, it&#8217;s hard to search through old notes and people who aren&#8217;t on Facebook can&#8217;t follow your blog.</p>
<p>There&#8217;s one big change though &#8211; I&#8217;m gonna change this from being purely a technical blog to being a personal blog as well (travel, etc.).  I&#8217;ll use categories to keep things straight!</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=170&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2011/09/09/moving-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving</title>
		<link>http://abepralle.wordpress.com/2009/12/12/moving/</link>
		<comments>http://abepralle.wordpress.com/2009/12/12/moving/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 18:40:16 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=166</guid>
		<description><![CDATA[After a brief flirtation with Drupal forums, I&#8217;ve since realized that Simple Machines Forum (SMF) is the one for me. Here&#8217;s the new SMF-based Plasmaworks Community that I&#8217;ll be moving my codeblog thoughts to: http://www.plasmaworks.com/forums/index.php Sign yourself up and join me in discussions of Slag and Plasmacore!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=166&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After a brief flirtation with Drupal forums, I&#8217;ve since realized that Simple Machines Forum (SMF) is the one for me.</p>
<p>Here&#8217;s the new SMF-based Plasmaworks Community that I&#8217;ll be moving my codeblog thoughts to:</p>
<p>http://www.plasmaworks.com/forums/index.php</p>
<p>Sign yourself up and join me in discussions of Slag and Plasmacore!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=166&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2009/12/12/moving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title>Automatic Properties, In-Line Classes, Delegate Properties, and caseNext</title>
		<link>http://abepralle.wordpress.com/2009/07/26/automatic-properties-in-line-classes-delegate-properties-and-casenext/</link>
		<comments>http://abepralle.wordpress.com/2009/07/26/automatic-properties-in-line-classes-delegate-properties-and-casenext/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 18:43:18 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=163</guid>
		<description><![CDATA[For the last couple of weeks I&#8217;ve been trying to come up with a good semi-automatic resource-loading framework for Plasmacore.  For each revision I added a new feature or two to Slag; I ended up not truly needing most of them but they&#8217;re good features nonetheless.  Here&#8217;s a quick overview of the new features &#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=163&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For the last couple of weeks I&#8217;ve been trying to come up with a good semi-automatic resource-loading framework for Plasmacore.  For each revision I added a new feature or two to Slag; I ended up not truly needing most of them but they&#8217;re good features nonetheless.  Here&#8217;s a quick overview of the new features &#8211; mostly by example.</p>
<p><span id="more-163"></span></p>
<h3>Automatic Properties</h3>
<p>First we have <em>automatic properties </em>that can be used when you have a single <em>init</em> method that stores each of its arguments into a property you&#8217;ve just defined.  Here&#8217;s an example of old code:</p>
<pre>  class Person
    PROPERTIES
      name : String
      age : Int32

    METHODS
      method init( name, age ):
  endClass</pre>
<p>Here&#8217;s the same code with automatic properties:</p>
<pre>  class Person( String name, Int32 age )
  endClass</pre>
<p>or even just:</p>
<pre>  class Person( String name, Int32 age );</pre>
<p>You can add additional properties and methods as you like.</p>
<h3>In-Line Classes</h3>
<p>Slag now supports in-line classes that work pretty much just like Java&#8217;s anonymous classes.  In addition, &#8220;METHODS&#8221; is now the default member category (so you can omit it if you start a class definition with a method), which makes in-line method definitions easier.  An example:</p>
<pre>  class Operator
    method init:
    method apply( Real64 lhs, Real64 rhs ).Real64: abstract
  endClass
  ...
  method test( Real64 left, Operator op, Real64 right ):
    println( op.apply(left,right) )
  ...
  local Operator plus = Operator() with
        method apply( Real64 lhs, Real64 rhs ).Real64: return lhs + rhs
      endWith

  local Operator minus = Operator() with
        method apply( Real64 lhs, Real64 rhs ).Real64: return lhs - rhs
      endWith

  test( 5, plus, 3 )  # prints: 8
  test( 5, minus, 3 ) # prints: 2
  test( 5, Operator() with
        method apply( Real64 lhs, Real64 rhs ).Real64: return lhs * rhs
      endWith, 3 )  # prints: 15</pre>
<h3>Delegate Properties</h3>
<p>Delegate properties allow you to specify that any unresolved method calls or property accesses be forwarded to one property in particular.  This is of particular use when you want to make one object that is essentially a proxy for another.  Example:</p>
<pre>  class String
    PROPERTIES
      data : delegate Array&lt;&lt;Char&gt;&gt;
      hash_code : Int32
    ...
  endClass
  ...
  local String mesg = "Delegate *this*!"
  println( mesg.count )  # same as saying "mesg.data.count" - prints: 16</pre>
<p>Only one property can be defined as a delegate.  Underneath the mechanism is very simple: at compile time failed member accesses are reevaluated with the delegate property.</p>
<h3>caseNext</h3>
<p><em>caseNext </em>is handy in a <em>which</em> where you want to do something different every time based on a counter but you don&#8217;t really care what the case values are.  It just takes the previous case value (literal integer required), adds one to it, and makes that the new case.  For example, to load a different graphic (my plan is revealed!) each time a method is called:</p>
<pre>  method load_next.Logical:
    load_index++
    which (load_index)
      caseNext: img_alpha = Image("alpha.png")
      caseNext: img_beta = Image("beta.png")
      caseNext: img_gamma = Image("gamma.png")
      caseNext: return false
    endWhich
    return true</pre>
<p>If you started with &#8220;case 5:&#8221; then the first <em>caseNext</em> would be a shorthand for &#8220;case 6:&#8221;.  If you start with <em>caseNext</em> (as above) then it resolves to &#8220;case 1:&#8221;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=163&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2009/07/26/automatic-properties-in-line-classes-delegate-properties-and-casenext/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic texture sheets, iPhone and Android dev, UTF-8 source files</title>
		<link>http://abepralle.wordpress.com/2009/07/12/dynamic-texture-sheets-iphone-and-android-dev-utf-8-source-files/</link>
		<comments>http://abepralle.wordpress.com/2009/07/12/dynamic-texture-sheets-iphone-and-android-dev-utf-8-source-files/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 09:54:05 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=160</guid>
		<description><![CDATA[Some odds and ends: ITEM: We finished up Wyrmhunter for the iPhone a week ago and submitted it to Apple.  They haven&#8217;t gotten around to approving it yet, but we&#8217;re hopeful it&#8217;ll be soon. ITEM: One of the last major things was a revamp of my dynamic texture sheet management system.  With its already limited [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=160&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some odds and ends:</p>
<p>ITEM: We finished up <em>Wyrmhunter </em>for the iPhone a week ago and submitted it to Apple.  They haven&#8217;t gotten around to approving it yet, but we&#8217;re hopeful it&#8217;ll be soon.</p>
<p>ITEM: One of the last major things was a revamp of my dynamic texture sheet management system.  With its already limited drawing speed, the best bet for the iPhone is to place all images on one big texture (or several), queue up a bunch of triangles as different images are drawn, and then render everything at once.  Even better is if you don&#8217;t have to lay things out yourself but can have Plasmacore do it for you as you dynamically load and unload images.</p>
<p><span id="more-160"></span>My initial stab at the problem worked well in some cases and very poorly in others.  I started out with one big region of unused texture.  Then after the first allocation I split it into several chunks &#8211; one used, the others not.  I decided to make everything below the used area one chunk and then the remaining strip to the right another chunk.  If the original free chunk were:</p>
<p>CC<br />
CC</p>
<p>Then after allocation &#8220;A&#8221; it would be:</p>
<p>AB<br />
CC</p>
<p>The problem was that I could end up with a whole lot of &#8220;B&#8221; chunks of various sizes that didn&#8217;t quite fit together.  There would sometimes be plenty of room to put something but no chunk large enough to put it in.  It was fragmentation but worse: it wasn&#8217;t that there were used areas, it was that the free areas were adjacent but slightly disjoint.</p>
<p>I beat my head against the problem for about a week and tried 6 or 7 different approaches.  I felt that the key was being able to span multiple free regions, but if I used regions as they became available then they were too disjoint, and if I used some sort of grid layout then the search area was too big.</p>
<p>Then <em>finally</em> I finally hit on the solution: when I allocated a region I would split the entire layout area (including all regions used and unused) along both axes to make the allocated region the exact right size while keeping all cells lined up at all 4 edges.  Imagine an Excel spreadsheet where you&#8217;ve randomly adjusted the widths of some columns, the heights of some rows, and filled in random cells &#8211; that&#8217;s what my texture sheet would look like after some heavy cycles of allocation and freeing.  Incidentally two adjacent empty rows become merged again, as do two adjacent empty columns.</p>
<p>The allocation algorithm is this: scan all regions row by row.  If a region is unused and unmarked, see if it&#8217;s the corner of a space that will fit the image (ensure available width at region is &lt;= necessary width, then ensure available height at each region is &lt;= necessary height).  If the space is big enough, <em>mark</em> the all of the rows as in use that are wide enough <em>all the way down</em>, mark all of the columns that are high enough <em>all the way to the right</em>, add the space to a list of possibilities, and continue searching.</p>
<p>The neat thing is that by marking the possible matches as you go you really cut down on the number of candidate spots you have to check for &#8211; and each candidate region you find is a corner already.</p>
<p>For example, say we had allocation A already and free regions B, C, and D:</p>
<p>ABB<br />
CDD</p>
<p>When we try to fit in a new allocation we&#8217;ll find spots B (corner of BB/DD) and C (corner of CDD) &#8211; and that&#8217;s it!  The other possible spots will already be marked as used as we find the top-left B and then C.  Between the two, we&#8217;ll pick the one that has the best {exact match, matching width, matching height, smallest area} crossed with the one that has {no gaps above, has gaps above}.</p>
<p>I hope you can see what I&#8217;m getting at here&#8230; I tried drawing some nicer graphics and so on but it was getting way too complicated for what it was worth.  Anyhow, the code is in and it&#8217;s working beautifully.</p>
<p>ITEM: I&#8217;ve now turned my attention to porting Plasmacore to Android &#8211; it&#8217;s pretty virgin territory and, like Google itself, I think Android could be a sleeping giant (albeit a slightly unwieldy, slightly dorky giant).  Over half of us at <em>Plasmaworks</em> now have G1 phones.  I still like my iPhone but I&#8217;ll admit there&#8217;s a lot of nice stuff about Android.</p>
<p>I got stuck for a while on an esoteric gcc pointer bug that cropped up in my Slag VM code.  It only happens when you have a certain optimization level turned on, which Android does by default.  Say I have a pointer to integer &#8220;ip&#8221; &#8211; I could retrieve an integer at that address and increment the pointer to the next value with:</p>
<p>int x = *(ip++);</p>
<p>This is equivalent to:</p>
<p>int** ip_ptr = &amp;ip;<br />
int x = *((*ip_ptr)++);</p>
<p>which is equivalent to:</p>
<p>int x = *((*(&amp;ip))++);</p>
<p>What I really wanted to do was access a double instead of an int at that position and then advance &#8220;ip&#8221; to point past the double.  I had:</p>
<p>double n = *((*((double**)&amp;ip))++);</p>
<p>I made it a macro and was using it in a place or two, but it was Bug City on Androids gcc configuration.  I went back to doing it a simpler way across a couple of steps.</p>
<p>ITEM: Finally let me tell you about an interesting discovery.  Some stray unicode characters were exposing a UTF-8 encoding/decoding bug in my compiler + VM.  What I didn&#8217;t realize is that Vim (and apparently other editors&#8230;?) load and save text files in UTF-8 already &#8211; I had assumed Vim would only operate on raw bytes.   UTF-8, by the by, is a scheme to translate text that would normally be 2 bytes per character into 1 byte per character for most symbols and then 2 or 3 bytes for the less common symbols.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=160&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2009/07/12/dynamic-texture-sheets-iphone-and-android-dev-utf-8-source-files/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone drawing speed &#8211; Part 2</title>
		<link>http://abepralle.wordpress.com/2009/05/13/iphone-drawing-speed-part-2/</link>
		<comments>http://abepralle.wordpress.com/2009/05/13/iphone-drawing-speed-part-2/#comments</comments>
		<pubDate>Wed, 13 May 2009 19:15:34 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=157</guid>
		<description><![CDATA[I just finished implementing an automatic texture sheet system for iPhone Plasmacore.  By default it automatically places image textures onto a single 1024&#215;1024 texture sheet, creating additional sheets if you run out of room.  In addition I&#8217;ve transparently buffered all drawing calls, so drawing 50 images will just store up 100 triangles and then render [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=157&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just finished implementing an automatic texture sheet system for iPhone Plasmacore.  By default it automatically places image textures onto a single 1024&#215;1024 texture sheet, creating additional sheets if you run out of room.  In addition I&#8217;ve transparently buffered all drawing calls, so drawing 50 images will just store up 100 triangles and then render them all at once later.</p>
<p>There&#8217;s significant speed-up over my previous implementation, but you&#8217;ll still have to be careful.  The results:</p>
<ul>
<li>I altered the system to redraw at 30 fps instead of 60.  Even a blank screen can&#8217;t quite hold steady at 60 fps, so I&#8217;d rather aim for a steady 30 fps on iPhone.  No changes required to your Plasmacore programs.</li>
<li>iPhone Plasmacore can draw about 9280/x square images in 1/30 second, where x is the size of a single dimension of the image (16 px or higher; smaller images are roughly the same).  [Edit: make that "9280 / sqrt(x)" where x is the number of pixels per image].  So around 580 16&#215;16 pixel images, 290 32&#215;32 images, or 145 64&#215;64 images.</li>
<li>Sound effects will probably slow it down a bit more; I need to do some further testing with that.</li>
</ul>
<p>Looking good for modestly complex games!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=157&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2009/05/13/iphone-drawing-speed-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone drawing speed</title>
		<link>http://abepralle.wordpress.com/2009/05/06/iphone-drawing-speed/</link>
		<comments>http://abepralle.wordpress.com/2009/05/06/iphone-drawing-speed/#comments</comments>
		<pubDate>Thu, 07 May 2009 04:35:32 +0000</pubDate>
		<dc:creator>Abe Pralle</dc:creator>
				<category><![CDATA[GameDev]]></category>

		<guid isPermaLink="false">http://abepralle.wordpress.com/?p=153</guid>
		<description><![CDATA[I&#8217;ve been doing some initial drawing tests on the iPhone with so-so results. Turns out it uses a graphics chip that renders different tile sections of the screen in parallel.  I couldn&#8217;t find any info on how big the tiles are offhand. Here are my very informal results. [Clarification: I'm drawing tile/sprite images as a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=153&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing some initial drawing tests on the iPhone with so-so results.</p>
<p>Turns out it uses a graphics chip that renders different tile sections of the screen in parallel.  I couldn&#8217;t find any info on how big the tiles are offhand.</p>
<p>Here are my very informal results. [Clarification: I'm drawing tile/sprite images as a series of individual calls, each with its own 2D transform]</p>
<p>In 1/60th of a second, the iPhone can draw about:<br />
24 textured polygons in the same spot, quarter-screen size or less.<br />
OR 75 spaced-out polys (32&#215;32 in this case)<br />
OR 6 full-screen polys.</p>
<p>Notes:<br />
- This is with a tight drawing-only loop.  Logic &amp; sound adds a bit of overhead &#8211; not an excessive amount but then again every bit hurts.<br />
- Things that <em>didn&#8217;t</em> significantly improve the speed: turning off texturing, turning off back-buffer clear, turning off alpha blending, using texture formats with fewer bytes per pixel.</p>
<p>In light of this I&#8217;m gonna tweak Plasmacore for iPhone so that it&#8217;s CYOB (Clear Your Own Backbuffer).  Not to save time clearing the backbuffer, but to allow you to get tricky (if you want) and only redraw altered portions of the screen.  The good news is that Plasmacore (as usual) will still update() at 60fps no matter how slow the draw() is going, so things might get a little <em>rougher</em> but they won&#8217;t get <em>slower</em>.</p>
<p>A final tip will be to avoid drawing font-based text &#8211; use prerendered words!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abepralle.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abepralle.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abepralle.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abepralle.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abepralle.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abepralle.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abepralle.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abepralle.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abepralle.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abepralle.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abepralle.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abepralle.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abepralle.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abepralle.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abepralle.wordpress.com&amp;blog=3845996&amp;post=153&amp;subd=abepralle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abepralle.wordpress.com/2009/05/06/iphone-drawing-speed/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c945ac50e567d69b031a514e7f585c82?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">Abe Pralle</media:title>
		</media:content>
	</item>
	</channel>
</rss>
