<?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>Acorn Heroes</title>
	<atom:link href="http://acornheroes.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://acornheroes.com</link>
	<description>iPhone Development from the Ends of the Earth</description>
	<lastBuildDate>Sat, 04 Sep 2010 04:07:30 +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>Setting up an Automated Build in an iOS environment &#8211; part 3</title>
		<link>http://acornheroes.com/2010/09/setting-up-an-automated-build-in-an-ios-environment-part-3/</link>
		<comments>http://acornheroes.com/2010/09/setting-up-an-automated-build-in-an-ios-environment-part-3/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 03:34:40 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[automated builds]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[hudson]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=550</guid>
		<description><![CDATA[In my previous articles, we&#8217;ve looked﻿ at how we can set up an automatic build, with a focus on catching issues with bad check-ins immediately.  Another useful aspect of an automated build is that it can remove the chance of human error whenever we have a task that consists of a lot of manual steps. One [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment/">previous</a> <a href="http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment-part-2/">articles</a>, we&#8217;ve looked﻿ at how we can set up an automatic build, with a focus on catching issues with bad check-ins immediately.  Another useful aspect of an automated build is that it can remove the chance of human error whenever we have a task that consists of a lot of manual steps.</p>
<p>One such example is generating a build for ad-hoc distribution to beta testers.  We could create a build by hand, but if we forget to increment the version number in our project, then our testers won&#8217;t be able to update from a previous build unless they delete the old build by hand off their devices and iTunes &#8211; definitely a pain for people you don&#8217;t want to inconvenience.</p>
<p> </p>
<p>Also, imagine the scenario in a couple of weeks when a tester notifies you of a serious bug they&#8217;ve found.  Chances are the code you have now is quite different to the build they have.  Can you get back to that point in the code easily?</p>
<p>Fortunately Apple provide us with a handy tool called <em>agvtool</em> that can handle these situations for us.  It&#8217;s a command line tool, so it integrates nicely into Hudson.  But first let&#8217;s look at <em>agvtool</em> on its own, and see what we can do with it.</p>
<h2>agvtool</h2>
<p>In order for agvtool to do its magic, we have a few things to set up in our project first.  Most of the steps here are described in detail by <a href="http://www.blog.montgomerie.net/easy-iphone-application-versioning-with-agvtool">Jamie Montgomerie on his blog</a>.  Briefly though, we will use two different version numbers &#8211; a <em>release version</em> and a <em>build</em> number.  The <em>release version</em> is our &#8220;marketing&#8221; number &#8211; what our clients see (&#8220;Now updated to version 1.2!&#8221;).  Our <em>build</em> number is for internal use, and will connect a given instance of our App to a specific tagged version of our code in source control. To test this, I created a simple OpenGL project in Xcode and added it to SVN as a starting point.  The only modification I&#8217;ve made to it is to add a label on top of the GL view.  We will use this later to display our build number for testers.  Note that SVN is not necessary for using <em>agvtool</em>, but it will give us a few nice options down the track.</p>
<p> </p>
<p>So, following Jamie&#8217;s instructions, we:</p>
<ol>
<li>Open our project&#8217;s PROJECT_NAME-Info.plist file and set the <em>Bundle version</em> to 1.  This represents our <em>build</em> number.</li>
<li>Ctrl (or right) click on the plist and choose <em>Add Row</em>.  From the options presented, select ﻿<em>Bundle versions string, short</em> and set its initial value to (say) 0.1.  This is our <em>release version</em>.</li>
<li>Ctrl (or right) click on ﻿the project in the <em>Groups &amp; Files</em> window, and select <em>Get Info</em>.  Make sure you&#8217;ve selected <em>All Configurations</em> and find the <em>Versioning</em> section, near the bottom.  Set the <em>Current Project Version</em> to match you build number &#8211; 1 in our case.  Set the <em>Versioning system</em> to <em>apple-generic</em>.</li>
</ol>
<p>OK, not too painful and we&#8217;ll never need to touch these bits again!  Let&#8217;s test our a few things.  Open up a terminal window and cd to your project directory.  We can use <em>agvtool</em> to tell us both the current <em>build</em> and <em>release version</em> numbers (agvtool calls them version and marketing version respectively):</p>
<p> </p>
<p><img style="display: block; margin-left: auto; margin-right: auto; border: 0px initial initial;" src="http://acornheroes.com/wp-content/uploads/2010/09/WhatVersions.png" border="0" alt="WhatVersions.png" width="543" height="181" /></p>
<p>﻿You should see the build number (agvtool what-version) and release version (agvtool what-marketing-version) that you entered into the project settings.  Now, using agvtool we can also update our build and release version numbers.  <em>Note that doing this modifies your project, so ensure it&#8217;s either not open in XCode or everything has been saved &#8211; otherwise you may lose changes to your project such as settings or newly added files.</em> So, to increment our <em>build</em> number we use:</p>
<blockquote><p>agvtool bump -all</p></blockquote>
<p style="text-align: center;"><img class="aligncenter" style="display: block;" src="http://acornheroes.com/wp-content/uploads/2010/09/Bump.png" border="0" alt="Bump.png" width="543" height="181" /></p>
<p>On the slightly rarer occasion that we want to adjust our release version, this can be done as follows:</p>
<blockquote><p>﻿agvtool new-marketing-version 0.21b</p></blockquote>
<p><img style="display: block; margin-left: auto; margin-right: auto; border: 0px initial initial;" src="http://acornheroes.com/wp-content/uploads/2010/09/ReleaseBump.png" border="0" alt="ReleaseBump.png" width="543" height="181" /></p>
<p> </p>
<p>You can use the <em>agvtool what-</em> command to verify what&#8217;s going on here.  Note that our build number is automatically incremented by one using the bump command.  Our release version is in fact a string, and we can supply whatever we want there, in this case 0.21b.</p>
<p>Assuming you&#8217;re paranoid like me, now is a good time to check this into source control as we have all the basics covered.</p>
<p>Open the project in XCode and build it.  XCode will now automatically generate a .c file as part of the build.  In my case, these were found at:</p>
<blockquote><p>build/AutoVersionTest.build/Debug-iphonesimulator/AutoVersionTest.build/DerivedSources/AutoVersionTest_vers.c</p></blockquote>
<p>You don&#8217;t need to even open this file, or include them in your project (that happens automatically).  This file declares two variables, a version string and number that correspond to our <em>build</em> number.  We can put them to good use.  In my sample project, I&#8217;ve declared the <em>build</em> number as an external variable in my App delegate:</p>
<blockquote><p>extern const double AutoVersionTestVersionNumber;</p></blockquote>
<p>And then in my application: didFinishLaunchingWithOptions method I&#8217;ve used the build number on the label I added earlier:</p>
<blockquote><p>﻿versionLabel.text = [NSString stringWithFormat:@"Build: %1.0f",AutoVersionTestVersionNumber, nil];</p></blockquote>
<p>Now when testers run my App they&#8217;ll see something like this:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/09/BuildId.png" border="0" alt="BuildId.png" width="414" height="276" /></p>
<p>Now, a tester can easily identify the build they&#8217;re running when giving me feedback.  By the way &#8211; if anyone know an easy way to get at our release version number in code, please let me know!  What we need now is a simple way to tie that back to a specific version of our code&#8230;</p>
<p> </p>
<h2>Tagging in SVN</h2>
<p>Note, this also works with CVS as well, <a href="http://gamesfromwithin.com/reconsidering-version-control">however while there are good arguments</a> for not moving to a more modern system like Git or Mercurial, there&#8217;s no good argument for sticking with CVS.</p>
<p> </p>
<p><em>agvtool</em> has the ability to update our version information and then commit the changes, simply by adding the <em>usesvn</em> tag like so:</p>
<blockquote><p>﻿agvtool -usesvn bump -all</p></blockquote>
<p><img style="display: block; margin-left: auto; margin-right: auto; border: 0px initial initial;" src="http://acornheroes.com/wp-content/uploads/2010/09/Commit.png" border="0" alt="Commit.png" width="548" height="248" /></p>
<p>Nice.  But it gets better.  We can then tag these changes to make getting back to them simple:</p>
<pre>﻿﻿agvtool -usesvn tag -baseurlfortag http://URL/to/svn/AutoVersionTest/tags</pre>
<p><img style="display: block; margin-left: auto; margin-right: auto; border: 0px initial initial;" src="http://acornheroes.com/wp-content/uploads/2010/09/Tagged.png" border="0" alt="Tagged.png" width="553" height="226" /></p>
<p>The -baseurlfortag option specifies where the tag should go.  After this operation, you&#8217;re SVN repository should look something like this:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/09/svn.png" border="0" alt="svn.png" width="415" height="217" /></p>
<p>Now, when you receive feedback from a tester it&#8217;s a simple matter to check out the tagged code and you can track down issues with the same code base your tester was using.  Note that the folder specified by the ﻿-baseurlfortag option must already exist &#8211; <em>agvtool</em> will not create it for you.</p>
<p> </p>
<h2>And Hudson?</h2>
<p>Hopefully it&#8217;s not too much of a stretch from here to see how we can use this in Hudson (or any other automated build system).  First off, we should create a project in Hudson that will check out our code and build it.  If you already have an existing Hudson project that builds periodically or with each new check-in you can simply clone it (Hudson is good that way).  Configure the project to only build manually by unchecking all the build triggers:</p>
<p> </p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/09/NoTriggers.png" border="0" alt="NoTriggers.png" width="263" height="108" /></p>
<p>And add in new build step(s), calling <em>agvtool</em> to bump our build number and (if using SVN) tag the resulting build.  Note that if this project were set up to trigger a new build when check-ins are detected we have a potential race condition, with agvtool checking in changes which would trigger a new build which would make agvtool check in changes&#8230;.</p>
<p>So, with these changes in place we can now reliably build a version of our code for testers, tag it and know that we can come back to the code for that build at any time.  And it&#8217;s all done automatically.  Also our version numbers will always increase, insuring that our testers don&#8217;t have trouble updating to a newer build.</p>
<p> </p>
<h2>And Another Thing</h2>
<p>OK, I haven&#8217;t played with this one extensively yet, but will add it here for your consideration.  Hudson allows us to <a href="http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Build">add parameters to a build</a>.  When we start a build, it will ask us to supply parameters that affect the build.  As an example we can add a BuildNumber parameter that will decide which tagged version of our code we want.  Configuring it in Hudson will look something like this:</p>
<p> </p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/09/Parameter.png" border="0" alt="Parameter.png" width="619" height="270" /></p>
<p>So what&#8217;s the use of this?  Well the parameter becomes an environment variable when Hudson is building the project.  So we can slip the environment variable into our source control link.  This way, when we kick off a build we can specify the tag to use, making it easy to recreate our App as it was at any stage in its development.</p>
<p>Well that&#8217;s it for this week.  If you have any questions or feedback please leave a comment below.</p>
<p><em>This post is part of <a href="http://idevblogaday.com/">iDevBlogADay</a>, a group of indie iPhone development blogs featuring two posts per day. You can keep up with iDevBlogADay through the <a href="http://idevblogaday.com/">web site</a>, <a href="http://feeds.feedburner.com/idevblogaday">RSS feed</a>, or <a href="http://twitter.com/#search?q=%23idevblogaday">Twitter</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/09/setting-up-an-automated-build-in-an-ios-environment-part-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>State of the Acorn</title>
		<link>http://acornheroes.com/2010/08/state-of-the-acorn/</link>
		<comments>http://acornheroes.com/2010/08/state-of-the-acorn/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 01:05:40 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[About Us]]></category>
		<category><![CDATA[Setting up]]></category>
		<category><![CDATA[Plans]]></category>
		<category><![CDATA[Sales]]></category>
		<category><![CDATA[State of the Acorn]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=539</guid>
		<description><![CDATA[Note: No final article on Automated Builds this week &#8211; check in next week when I should have the final article prepared. It must be the time of year or something, but obviously a few developers have been evaluating their progress and plans for the future.  Not afraid of being a slave to fashion, it [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: No final article on <a href="http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment/">Automated</a> <a href="http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment-part-2/">Builds</a> this week &#8211; check in next week when I should have the final article prepared.</em></p>
<p>It must be the time of year or something, but obviously a few developers have been evaluating their progress and <a href="http://gamesfromwithin.com/growing-indie-style">plans</a> <a href="http://digitalsinigang.blogspot.com/2010/08/living-indie-life.html">for</a> <a href="http://pocketcyclone.com/2010/08/24/indie-devs-dirty-little-secret">the</a> <a href="http://retrodreamer.com/blog/2010/08/context-sales-and-the-indie-survival-barometer">future</a>.  Not afraid of being a slave to fashion, it seemded like a good time to have a look at the progress of Acorn Heroes over the past year.</p>
<p>In our case this navel gazing has been triggered by the fact that we&#8217;re due for our first payout from Apple on September 2nd.  Yep, you read that right, our first.  That may sound like a fairly mediocre result, and in some ways it is.  But there&#8217;s also a ray of hope there.  Read on&#8230;</p>
<h2>Some context</h2>
<p>Sam and I are both fully employed on other jobs.  We both have three kids, a wife and a mortgage.  The good side of this is that we&#8217;re relatively stable and don&#8217;t need to be successful on the App store just to survive.  The flip side is that anything we do is done in a spare hour here and there at the end of the day, family commitments allowing.</p>
<h2>Past</h2>
<p><a href="http://click.linksynergy.com/fs-bin/stat?id=tJcjmvCiUp8&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Fgoo%252Fid349865283%253Fmt%253D8%2526uo%253D4%2526partnerId%253D30">Goo!</a> (App store link) was released back in January, and is a fairly niche application for maths nerd who like playing with <a href="http://en.wikipedia.org/wiki/Cellular_automaton">cellular automata</a>, or possibly two year olds who like the pretty patterns (my youngest is a great example of this).  Despite that it&#8217;s been ticking over quietly averaging about 2-3 sales a day.  While it won&#8217;t make us rich, or let us quit our day jobs, it will cover the cost of our web hosting and dev license for another year.</p>
<p><a href="http://idevblogaday.com/">iDevBlogADay</a> has been (and continues to be) a wonderful experience &#8211; the requirement to write each week is a great motivator and has introduced me to an expanded network of great Indie developers.  If you haven&#8217;t subscribed to the iDevBlogADay feed yet, your missing a ton of great content.  Here&#8217;s a <a href="http://feeds.feedburner.com/idevblogaday">handy link</a>.</p>
<h2>Present</h2>
<p>Sam (the quiet one) is doing wonderful things with <em>Secret Project M. </em> It&#8217;s only secret because we haven&#8217;t talked about it yet &#8211; but we should be announcing <em>M</em> officially soon.  We&#8217;re in what can probably be described as an &#8216;early beta&#8217; stage &#8211; polishing features and UI and squashing bugs.</p>
<p><a href="http://acornheroes.com/2010/07/the-partial-monty/">Faerie</a> is a promising game idea that I&#8217;m looking to develop fully.  Basic gameplay is solid and we&#8217;re looking to build a solid, appealing game that will appeal to people of all ages.  <a href="http://click.linksynergy.com/fs-bin/stat?id=tJcjmvCiUp8&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Fsneezies%252Fid298155609%253Fmt%253D8%2526uo%253D4%2526partnerId%253D30" target="itunes_store">Sneezies</a> and <a href="http://click.linksynergy.com/fs-bin/stat?id=tJcjmvCiUp8&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Frobot-unicorn-attack%252Fid374791544%253Fmt%253D8%2526uo%253D4%2526partnerId%253D30" target="itunes_store">Robot Unicorn Attack</a> are great examples of the kind of experience we&#8217;re aiming to replicate.</p>
<p>In my day job, I&#8217;ve been part of a team working on data capture for high performance athletes &#8211; there&#8217;s a good story covering what&#8217;s been going on <a href="http://www.odt.co.nz/news/business/123313/city-firms-top-sports-app-game">here</a>.</p>
<h2>Future</h2>
<p>So, what does the future hold?  It&#8217;s busy, that&#8217;s for sure.  We&#8217;re aiming to finish <em>M</em> in the next month or two.  Having a second App on the store is a huge milestone for us, especially as <a href="http://click.linksynergy.com/fs-bin/stat?id=tJcjmvCiUp8&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Fgoo%252Fid349865283%253Fmt%253D8%2526uo%253D4%2526partnerId%253D30">Goo!</a> was a proof of concept as much as anything.  To say we&#8217;re excited is an understatement.</p>
<p>Faerie is on hold for a little while, because I&#8217;ve taken on full time contract work until the end of the year.  I can&#8217;t reveal many details at the moment, but we&#8217;ll be creating a game for iOS that is linked to a major TV channel.  I&#8217;m hopeful that I can cover our progress over the next three months or so.  We&#8217;re aiming for a November/December release.</p>
<p>So, interesting times ahead with lots going on.  Sam and I would like to take this chance to thank everyone who&#8217;s bought Goo!, followed our blog or provided advice on working in the magical, mercurial world of iOS development.  Your words of encouragement mean a lot to us!</p>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/08/state-of-the-acorn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up an Automated Build in an iOS environment &#8211; part 2</title>
		<link>http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment-part-2/</link>
		<comments>http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment-part-2/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 10:32:19 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[automated builds]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[hudson]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=525</guid>
		<description><![CDATA[After last week&#8217;s introduction, it&#8217;s time to get on with making this thing.  After looking at both CruiseControl and Hudson, I went with Hudson &#8211; mainly because it&#8217;s very simple to set up and start using straight away.  So without further fuss, let&#8217;s download Hudson from here.  I created a build folder ~/AutomatedBuilds (there&#8217;s nothing [...]]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment/">last week&#8217;s introduction</a>, it&#8217;s time to get on with making this thing.  After looking at both CruiseControl and Hudson, I went with Hudson &#8211; mainly because it&#8217;s very simple to set up and start using straight away.  So without further fuss, let&#8217;s download Hudson <a href="http://hudson-ci.org/latest/hudson.war">from here</a>.  I created a build folder ~/AutomatedBuilds (there&#8217;s nothing special about this location, put it wherever suits you) and put the downloaded file hudson.war.zip in it.</p>
<p>Open a terminal window and cd to the build folder.  The online documentation says that you should unzip hudson and run it using the command:</p>
<blockquote><p>java -jar hudson.war</p></blockquote>
<p>This works fine on Windows, however under OS X, unzipping the file and trying to run it causes the following error:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/08/RunUnzipped.png" border="0" alt="RunUnzipped.png" width="505" height="114" /></p>
<p>If anyone can explain the issue, I&#8217;d appreciate the insight.  However it turns out we can just run Hudson as-is out of the zip file:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/08/RunFromZip.png" border="0" alt="RunFromZip.png" width="505" height="366" /></p>
<p>Ok, so what&#8217;s happened?  Hudson is now running as a Java application in the terminal.  As well as running the build, it also provides a web interface for us to work with.  Open a browser and point it at <a href="http://localhost:8080/">http://localhost:8080/</a> and you should see something like:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/08/WelcomeToHudson1.png" border="0" alt="WelcomeToHudson.png" width="460" height="405" /></p>
<p>Before we set up our first job, we should grab a couple of handy plugins first.  Click on the <em>Manage Hudson</em> link on the left, then <em>Manage Plugins</em> and finally the <em>Available</em> tab.  You should see a long, slightly exciting (or intimidating, depending on your outlook on life) list of plugins.  Have a look through the list &#8211; there&#8217;s lots here to play with &#8211; but for now select the Twitter and Mercurial plugins (assuming <a href="http://acornheroes.com/2010/07/distributed-version-control-getting-started/">I&#8217;ve convinced you to try Mercurial</a>), and click on the <em>Install</em> button.</p>
<p>You should see the plugins being downloaded and installed, along with a message to restart Hudson.  When Hudson is running, there&#8217;s a <em>Prepare for Shutdown</em> option on the <em>Manage Hudson</em> page.  For now though, it&#8217;s enough to go to the Terminal window you&#8217;re running Hudson in and kill it with Ctrl+C (I&#8217;m a bit old fashioned that way).</p>
<p>Run Hudson again from the terminal window, and we&#8217;re ready to set up our first automated build.  For a start, let&#8217;s create a build that monitors our source control repository and kicks off a build when it sees any changes.</p>
<p>On the main Hudson dashboard, click <em>New Job</em>.  Give the job a name, choose the &#8220;free-style software project&#8221; option and click <em>OK</em>.</p>
<p>On the resulting page you can configure a bunch of options.  Feel free to go nuts here.  Each option has a &#8216;?&#8217; icon that provides useful help.  Here&#8217;s the settings I used:</p>
<p>Under Source Code Management, I chose Mercurial and pointed it at my Fogbugz Repository.  The Fogbugz repository requires the user to be authenticated, so we do this by including the user name and password in the URL in the form:</p>
<blockquote><p>﻿https://USER_NAME:PASSWORD@PATH_TO_REPOSITORY</p></blockquote>
<p>Note that, if your user name has a &#8216;@&#8217; symbol in it, replace the &#8216;@&#8217; with &#8216;%40&#8242; to avoid the URL being incorrectly parsed by Hudson or Fogbugz (see the screen shot below).</p>
<p>Hudson also supports many other types of source control, pick the one that you use.  Another small note here &#8211; when setting up an automated build for the first time, it&#8217;s a good idea to use a small test project first, to allow faster testing of your set up.  My actual production code can take many minutes to build (not my fault! OpenFeint is <em>slow</em> to build), so instead, for this article, I&#8217;ve created <em>AwesomeGame</em> from one of the standard XCode templates.  Once I have a running build system, I&#8217;ll then go back and add in my production code.</p>
<p style="text-align: center;"><img class="aligncenter" style="display: block; border: 0px initial initial;" src="http://acornheroes.com/wp-content/uploads/2010/08/SCM.png" border="0" alt="SCM.png" width="580" height="143" /></p>
<p>Next up, we want to check if we need to trigger a build by polling SCM for changes.  We schedule Hudson to check SCM every minute using CRON-like syntax :</p>
<p style="text-align: center;"><img class="aligncenter" style="display: block;" src="http://acornheroes.com/wp-content/uploads/2010/08/Triggers.png" border="0" alt="Triggers.png" width="618" height="136" /></p>
<p>Then, we add the actual build step, executing a shell command to run XCode from the command line using xcodebuild.  Have a look at the <em>xcodebuild</em> man page for all the various options.  For now, we want to build our AwesomeGame target in both <em>Debug</em> and <em>Release</em> modes.  I&#8217;ve done this below using two build steps:</p>
<p style="text-align: center;"><img class="aligncenter" style="display: block;" src="http://acornheroes.com/wp-content/uploads/2010/08/BuildSteps.png" border="0" alt="BuildSteps.png" width="620" height="230" /></p>
<p>Finally, let&#8217;s tell Hudson how to notify us when the build is done.  I selected email and Twitter notifications.  If you&#8217;re on a team, notice the option to notify the individual who committed the changes that broke the build &#8211; without having to notify the entire team.  As well as the person responsible for the break it&#8217;s good practice to have a nominated &#8216;build monkey&#8217; whose job it is to check all builds &#8211; so make sure they&#8217;re getting all the build results as well.   A quick note on Twitter here &#8211; don&#8217;t use your own Twitter account unless you want to spam all your followers!  Instead, create a bogus build account for Hudson to use, and follow it from your main account.</p>
<p>Assuming we&#8217;re all happy with the settings (we can always come back and tweak them), click <em>Save</em>.</p>
<p>Hudson now takes us to the page for our project.  On the left is a <em>Build Now</em> option &#8211; let&#8217;s try it out&#8230;  After a few seconds, you should see a progress bar in the bottom left, telling you that Hudson is building your project.  If nothing happens, check the top right of the page for an <em>Enable auto-refresh</em> option.</p>
<p>Once finished, we&#8217;ll see a blue ball that indicates a successful build (your code in source control does build, right?).  If instead you see a red icon, then the build has broken, and we need to fix something.  Either way, click on the most recent build link to see details of the build:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/08/FinishedBuild1.png" border="0" alt="FinishedBuild.png" width="604" height="177" /></p>
<p>On this page, we can see the status of this particular build (remember blue ball means success), the changes in source control from the last build (none in this case, as we manually triggered the build) and the console output, where we can see the details of the code being checked out from source control and built using XCode.  If your build has failed, this is a good place to look for the problem.</p>
<p>Phew!  The system works!  Checking Twitter, sure enough there&#8217;s a success message there:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/08/TwitterSuccess.png" border="0" alt="TwitterSuccess.png" width="323" height="73" /></p>
<p>But hang on, where&#8217;s my email?  The problem here is that we need to configure Hudson with an smtp server so that it can deliver mail to us.  Go back to the <em>Manage Hudson</em> page, and click on <em>Configure System</em>.  Near the bottom you can configure the global settings for email and Twitter.  If you&#8217;re unsure what smtp server to use, check the settings for your email program &#8211; you&#8217;re looking for the name of your <em>outgoing</em> smtp server.</p>
<p>So enter in your smtp details, and the system admin email address (that&#8217;s you).  Click on the <em>Test</em> button and make sure that you get the test email message.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/08/BuildNow1.png" border="0" alt="BuildNow.png" width="590" height="137" /></p>
<p>Going back to the main Hudson page, you should notice that our project is listed, and on the right hand side is a <em>Build Now</em> icon (so you don&#8217;t have to go into the project to kick off a build).  Click it to start another build, and then click on your project to follow the build&#8217;s progress&#8230;  Still no email.  Bugger.  Going to the project&#8217;s <em>Configure </em>screen, I look up the help for email, which sheds some light on the issue:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/08/EmailHelp1.png" border="0" alt="EmailHelp.png" width="580" height="135" /></p>
<p>This is sensible &#8211; no point in spamming out emails when builds are all going well.</p>
<p>So by now we know that we can check out our code and build it automatically.  But where is the build?  Hudson creates a working folder in your root directory.  Have a look in ~/.hudson, and you&#8217;ll see all of Hudson&#8217;s internals.  In particular, the folder ~/.hudson/jobs/Awesome Game contains all of our build history and a workspace folder in which the code is checked out and built.  So if I want to get the built app, I can grab it from:</p>
<blockquote><p>~/.hudson/jobs/Amazing%20Game/workspace/build/Release-iphoneos/</p></blockquote>
<p>Later we&#8217;ll look at packaging up the build and putting it somewhere handy, but for now, let&#8217;s make sure that it&#8217;ll pick up on changes in source control.  Check out a working copy (if you don&#8217;t have one) of your project and put in a small change that will cause the build to break.  This ought to do it:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://acornheroes.com/wp-content/uploads/2010/08/Bug.png" border="0" alt="Bug.png" width="336" height="150" /></p>
<p>Commit the change (or commit and push if you&#8217;re using a remote Mercurial server like I am) and wait for a minute.  You may notice a message mentioning a &#8216;quiet period&#8217; before the build kicks off properly.  This quiet period is Hudson waiting after it detects a change in source control to make sure all changes have been committed &#8211; this is particularly useful with CVS, where every file is committed separately.</p>
<p>Ah, BOOM!  Our build has failed nicely.  And I got an email this time, which is nice <img src='http://acornheroes.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   A broken build is  something that shouldn&#8217;t be left broken, so let&#8217;s fix it and check the build comes back happily.  Fix the code, push, commit, wait&#8230; success!  Twitter and email confirm everything&#8217;s OK.</p>
<p>We&#8217;ve covered quite a bit so far so it&#8217;s probably a good time to take a break and see what we&#8217;ve achieved, and how that matches our goals from last week.</p>
<p>What works?</p>
<ul>
<li>Monitor source control (Mercurial and Subversion in my case), kicking off a build whenever changes are checked in.</li>
<li>﻿We’ll be able to manually kick off a build as needed.</li>
<li>﻿The build will grab all our source code from source control and build it in all relevant configurations – debug, release, simulator, device and so on.</li>
<li>﻿When the build is finished, it’ll notify people of the success / failure.</li>
<li>﻿There’ll be a handy location (web page most likely) where we can monitor / control the whole thing.</li>
</ul>
<p>What do we still need to do?</p>
<ul>
<li>We’ll schedule a nightly build as well, just in case anything outside of source control has changed. This is fairly simple &#8211; an exercise for the reader!</li>
<li>Copy a successfully built app to somewhere useful, preferably packaging it up with a provisioning profile in a zip archive, ready for emailing.</li>
<li>Automatically update version numbers on our ‘stable’ build with each build.</li>
<li>Bundle up the resulting builds with a provisioning profile and copy them to a shared folder.</li>
<li>Start up automatically under when your build machine is booted.</li>
<li>Paint a unicorn.</li>
</ul>
<p>OK, plenty to work on, I&#8217;ll be back next week with some more detail, or if you&#8217;re keen have a crack yourself and let me know how you get on!</p>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment-part-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting up an Automated Build in an iOS environment</title>
		<link>http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment/</link>
		<comments>http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 05:17:25 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[automated builds]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[cruisecontrol]]></category>
		<category><![CDATA[hudson]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=494</guid>
		<description><![CDATA[Disclaimer: I&#8217;ll let you in on a secret now, to avoid disappointment later on.  By the end of this article you won&#8217;t have a fully working automated build  The reason is that I was half way through writing up this article using CruiseControl when I started to look at Hudson, which seems like it might [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste"><em>Disclaimer: I&#8217;ll let you in on a secret now, to avoid disappointment later on.  By the end of this article you won&#8217;t have a fully working automated build <img src='http://acornheroes.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   The reason is that I was half way through writing up this article using <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a></em><em> when I started to look at <a href="http://hudson-ci.org/">Hudson</a></em><em>, which seems like it might be promising.  So this week is an introduction to the idea of continuous integration and automated builds and how they can save you time and grief.  Next week I&#8217;ll aim to have a useful build system up and running along with instructions on how to set it up&#8230;</em></div>
<div><em><br /></em></div>
<div id="_mcePaste">Alex Okafor&#8217;s <a href="http://www.paradeofrain.com/2010/08/iphone-dev-tip-3-sanity-from-automated-builds">post last week</a> got me thinking that it&#8217;s well past time I set up an automated build system, or better yet one that supports continuous integration (feel free to capitalise the &#8216;c&#8217; and the &#8216;i&#8217; if you want to turn it into a buzz phrase).  Chances are that if you know what I&#8217;m talking about, you&#8217;re nodding your head in agreement now (and can skip the next section).  If not, then read on…</div>
<h2>What?  Why?</h2>
<p><img style="float: right;" src="http://acornheroes.com/wp-content/uploads/2010/08/airscrew1.jpg" border="10" alt="airscrew.jpg" width="240" height="177" /></p>
<p id="_mcePaste">An automated build is a system that can build your software from source to finished product without human intervention.  At it&#8217;s simplest, this can be an XCode project or a makefile &#8211; after all, you don&#8217;t compile each file and link them together by hand, do you?  The key idea is that we can remove human error from the process, making it more efficient.  The ideal is to have a system whereby you can build all versions of your software with a single click (and also score a couple of points on the <a href="http://www.joelonsoftware.com/articles/fog0000000043.html">Joel test</a>).</p>
<p id="_mcePaste">Consider the following situation.  You want a fresh build of the code to show off to your boss, &#8220;<em>Reckless&#8221; Jim</em>, to keep him off your back.  When you wake up, you grab your iPhone 4 (lucky bastard), open Safari and click a link on a web page before you get in the shower (remember to put the iPhone down first).  While you&#8217;re halfway through your hot water supply (and the<em> Sound of Music</em> soundtrack), the following is happening:</p>
<div id="_mcePaste">
<ul>
<li>Your &#8216;build&#8217; machine <em>HAL</em> schedules an automated build.</li>
<li>It grabs the latest code tagged as &#8216;stable&#8217; from source control.</li>
<li>The code is then built in all configurations (debug/release, simulator/iPhone/iPad).</li>
<li>Unit and functional tests are run on the resulting apps to ensure that nothing is broken.</li>
<li>The built apps are bundled up with a provisioning file, ready for installation on any of your test devices.</li>
<li>The resulting bundles are copied to a shared folder for you to download while scoffing down your Fruit Loops.</li>
<li>An email is sent out to the team notifying them of a successful build, along with details of tests run, how long it took to build and who has committed the most lines of code in the last week.</li>
<li>You grab <em>Reckless</em> as he comes in the door (he&#8217;s always late) and put a running build in his hand.</li>
</ul>
</div>
<p id="_mcePaste">Cool, huh?</p>
<p id="_mcePaste">Or how about this:</p>
<div id="_mcePaste">
<ul>
<li>Your team mate &#8220;<em>Lazy&#8221; Jason</em> checks in a new feature, and heads out (it&#8217;s 2pm) so he can go surfing for the day.</li>
<li>Your build system <em>Grumpy</em> detects the change in source control and begins a build.</li>
<li>By now <em>Jason</em> is half way out the door, but he&#8217;s paused to (try to) chat up <em>Christine</em>, the new graphic designer who started yesterday.</li>
<li>Meanwhile, <em>Grumpy</em> is building the source code from the development branch in source control.</li>
<li>Uh oh!  The build is broken &#8211; <em>Jason</em> forgot to check-in <em>AwesomeFeature.mm</em>.</li>
<li><em>Grumpy</em> send a text alert to you (as build monkey) as well as to Jason who was the person who caused the build to break.</li>
<li><em>Jason</em> is beginning to have a bad day.  Not only has <em>Christine</em> turned down his advances in an unequivocal (and slightly cruel) way, but you catch him before he gets out the door.</li>
<li>Disheartened, Jason heads to his desk to fix the build.  Fortunately the solution is fairly obvious and he checkins in a fix within a couple of minutes.</li>
<li>Good news &#8211; the new build is fine.  The team is notified of a clean build and <em>Jason</em> can leave for the beach knowing the team doesn&#8217;t hate him, but that he is now the nominated build monkey until some one else breaks the build.</li>
</ul>
</div>
<p id="_mcePaste">Neat, eh?</p>
<p>This second example is what&#8217;s known as continuous integration &#8211; every time you check in new code to source control, the whole build is exercised to make sure nothing&#8217;s broken.  Why?  Often a broken build is a simple 30 second fix at the time, but 2 weeks later it might require hours of sorting through commit logs to see where the problem is.</p>
<h2>The solution</h2>
<p><img style="float: right;" src="http://acornheroes.com/wp-content/uploads/2010/08/CH-47-Chinook.jpg" border="10" alt="CH-47 Chinook.jpg" width="240" height="298" /></p>
<p id="_mcePaste">So, what does it take to set up a system like this?  Not as much as you might think.  There are some neat tools out there to get you up and running fairly quickly.  The problem is that I didn&#8217;t have time to try out both of the likely candidates for this week&#8217;s deadline.  I&#8217;ve used <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a> before, and <a href="http://hudson-ci.org/">Hudson</a> looks promising.</p>
<p id="_mcePaste">So here&#8217;s the goal for next week.  I&#8217;ll show you how to set up a system that will:</p>
<div id="_mcePaste">
<ul>
<li>Monitor source control (Mercurial and Subversion in my case), kicking off a build whenever changes are checked in.</li>
<li>We&#8217;ll schedule a nightly build as well, just in case anything outside of source control has changed.</li>
<li>We&#8217;ll be able to manually kick off a build as needed.</li>
<li>The build will grab all our source code from source control and build it in all relevant configurations &#8211; debug, release, simulator, device and so on.</li>
<li>When the build is finished, it&#8217;ll notify people of the success / failure.</li>
<li>There&#8217;ll be a handy location (web page most likely) where we can monitor / control the whole thing.</li>
</ul>
</div>
<div id="_mcePaste">And a few nice to haves if I can figure them out:</div>
<div id="_mcePaste">
<ul>
<li>Automatically update version numbers on our &#8216;stable&#8217; build with each build.</li>
<li>Bundle up the resulting builds with a provisioning profile and copy them to a shared folder.</li>
<li>Start up automatically under when your build machine is booted.</li>
<li>Paint a unicorn.</li>
</ul>
</div>
<div id="_mcePaste">More next week!</div>
<p id="_mcePaste">In the mean time here&#8217;s a couple of <a href="http://media.pragprog.com/titles/auto/introduction.pdf">sample</a> <a href="http://media.pragprog.com/titles/auto/scheduled.pdf">chapters</a> from <em><a href="http://pragprog.com/titles/auto/pragmatic-project-automation">Pragmatic Project Automation: How to Build, Deploy, and Monitor Java Applications</a></em> that covers the basics of setting up CruiseControl.</p>
<p id="_mcePaste">So, now to decide between Hudson and CruiseControl.  If you have any thoughts on either of these systems (or another I haven&#8217;t heard of), please let me know in the comments below…</p>
<div><em>This post is part of <a href="http://idevblogaday.com/">iDevBlogADay</a>, a group of indie iPhone development blogs featuring two posts per day. You can keep up with iDevBlogADay through the <a href="http://idevblogaday.com/">web site</a>, <a href="http://feeds.feedburner.com/idevblogaday">RSS feed</a>, or <a href="http://twitter.com/#search?q=%23idevblogaday">Twitter</a>.</em></div>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/08/setting-up-an-automated-build-in-an-ios-environment/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fluffy Buns &#8211; a handy tool for developing better games</title>
		<link>http://acornheroes.com/2010/08/fluffy-buns-a-handy-tool-for-developing-better-games/</link>
		<comments>http://acornheroes.com/2010/08/fluffy-buns-a-handy-tool-for-developing-better-games/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 03:08:16 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Feedback]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=483</guid>
		<description><![CDATA[Got skillz? Any good software developer is always on the look out for new techniques or tools. But when was the last time you actively cultivated your social skills? Does this sound unecessary? We&#8217;re coders after all, dealing with syntax and pixels, right? Well consider this. Our games are nothing until we&#8217;ve put them into [...]]]></description>
			<content:encoded><![CDATA[<h2>Got skillz?</h2>
<p>Any good software developer is always on the look out for new techniques or tools.  But when was the last time you actively cultivated your social skills?</p>
<p>Does this sound unecessary?  We&#8217;re coders after all, dealing with syntax and pixels, right?  Well consider this.  Our games are nothing until we&#8217;ve put them into the hands of our players.  It&#8217;s a social contract we have with the players to offer them a fun and engaging experience.  And most importantly, if <em>they</em> don&#8217;t like it, you&#8217;re up the proverbial creek without a paddle.</p>
<p>If we&#8217;re going to make our game great, we need to see it&#8217;s effect on potential players.  For the best results, we need to do it early and often to avoid wasting time on ideas and implementations that just aren&#8217;t good.</p>
<p>So, assuming you&#8217;re buying into this argument so far, the next step is to get some feedback from players.  Giving and receiving feedback is very difficult to do well, and it&#8217;s a skill that continually needs to be trained and refined, alongside your other mad skillz.</p>
<h2>Giving feedback</h2>
<p><a href="http://acornheroes.com/wp-content/uploads/2010/08/HamburgerCalories.jpg"><img class="alignright size-full wp-image-486" title="Hamburger" src="http://acornheroes.com/wp-content/uploads/2010/08/HamburgerCalories.jpg" alt="" width="236" height="349" /></a>Giving feedback can be difficult &#8211; you need to let the game developer know what doesn&#8217;t work, but without leaving them whimpering in a corner when you&#8217;re done.  The trick here is to think of a <a href="http://n8tip.com/the-hamburger-method-of-constructive-criticism-works-for-vegetarians-too">hamburger&#8217;s fluffy buns</a>.  The idea is that you wrap the &#8220;meat&#8221; of your concerns in between a nice couple of &#8220;fluffy&#8221; buns to soften the blow.</p>
<p style="padding-left: 30px;"><em>Example:</em><br />
&#8220;Your game crashes all the time and is unplayable.&#8221;</p>
<p style="padding-left: 30px;"><em>Example:</em><br />
&#8221; I like what you&#8217;ve done with the art style, and I can see a lot of promise in your game Mega Zombie Ninja Defense HD.  However, I&#8217;m having trouble with the game quitting unexpectedly on me.  It happens fairly regularly at the start of each level and is making it difficult to get into the game.  I&#8217;m keen to get further into the game, please let me know if I can help in tracking down the problem.&#8221;</p>
<p>So, both of these comments say basically the same thing right?  But which would you rather receive from a beta-tester?  Here&#8217;s a few key points:</p>
<ul>
<li>The first example comes across as a personal attack on the developer, mainly through the use of the word &#8220;Your&#8221;.  It&#8217;s the written equivalent of stabbing your finger at someone to make a point.  The recipient of this comment immediately becomes defensive and unwilling to take on board your comments.</li>
<li>Also in the first example, the phrases<em> &#8220;all the time&#8221; </em>and <em>&#8220;is unplayable&#8221;</em> are absolute (rather than subjective) statements about the game that may not be true.  <em>&#8220;Crashes all the time <strong>for me</strong>&#8220;</em> may be true, but can you really speak for all the other testers playing the game?</li>
<li>In the second example, the initial compliment puts the developer in a receptive frame of mind, ready to listen to your concerns &#8211; establishing a dialogue.  Talking about <em>&#8220;the&#8221;</em> game rather than <em>&#8220;your&#8221; </em>game makes for an objective discussion, rather than an emotional one.</li>
<li>Expressing the problem in terms of <em>&#8220;my experience&#8221;</em> means you&#8217;re open to the possibility that it&#8217;s not the developer&#8217;s fault &#8211; perhaps you&#8217;ve updated to a new OS reveision that they haven&#8217;t had a chance to test yet, or perhaps you&#8217;re jailbroken phone running a Linux kernel <em>may</em> have something to do with the issues you&#8217;re having.</li>
<li>You&#8217;ve knocked the guy down and given him a kick in the guts, telling him his code crashes (even if it&#8217;s true, it&#8217;s not nice to hear), so wrap up by saying something nice to pick him up off the ground again feeling positive about what needs to be done.</li>
</ul>
<p>There&#8217;s more at stake here than just being all new age and caring.  It&#8217;s about being able to get to the heart of a problem and fixing it.  The fact that it can help build a stronger relationship with someone is just a nice side effect.</p>
<h2>It is better to give than to receive</h2>
<p>OK, so let&#8217;s say your the king of fluffy bins, and people love you as a beta tester because you give honest, helpful feedback.  Now it&#8217;s your turn to send a build out to a handful of testers.  It&#8217;s hard.  You&#8217;re feeling a bit nervous &#8211; hoping they love the game, terrified that they won&#8217;t.  And then you get this:</p>
<p style="padding-left: 30px;">&#8220;Man this sucks, couldn&#8217;t you do any better?&#8221;</p>
<p>Ouch.  What can you do?  First off, try not to take it personally.  You asked for peoples opinions, you have to be prepared to take the good with the bad.  If people only offer praise, you&#8217;re game will suffer for it.  Just watch American Idol some time if you don&#8217;t believe me.  All those poor people who can&#8217;t sing to save themselves.  I can just imagine their well meaning family telling them <em>&#8220;You&#8217;re fantastic, you can do anything you want to do&#8221;</em>.</p>
<p>OK, so we&#8217;ve gotten over the initial shock of the feedback.  Now it&#8217;s time to ask yourselves &#8220;Why did this person have such a bad experience?&#8221;  There&#8217;s obviously a problem here, and you need to develop the skill to find out what&#8217;s going on.  This is where the <a href="http://www.joelonsoftware.com/items/2008/01/22.html"><em>&#8220;Five Whys&#8221;</em></a><em> </em><a href="http://en.wikipedia.org/wiki/5_Whys">technique</a> comes into play.  Let&#8217;s imagine how the conversation could go:</p>
<p style="padding-left: 30px;"><em>&#8220;Man this sucks, couldn&#8217;t you do any better?&#8221;</em></p>
<p style="padding-left: 30px;">&#8220;Wow, I&#8217;m sorry it didn&#8217;t go so well for you, can you give me an idea of what went wrong?&#8221;</p>
<p style="padding-left: 30px;"><em>&#8220;I just couldn&#8217;t get into it.&#8221;</em></p>
<p style="padding-left: 30px;">&#8220;Why was that, was it too hard?  Did the controls make sense?&#8221;</p>
<p style="padding-left: 30px;"><em>&#8220;It was OK until I reached the first platform, I just couldn&#8217;t get up onto it.&#8221;</em></p>
<p style="padding-left: 30px;">&#8220;Why was that, were you double jumping?&#8221;</p>
<p style="padding-left: 30px;"><em>&#8220;Double jumping?  You can do that?&#8221;</em></p>
<p style="padding-left: 30px;">&#8220;Yeah, just triple tap the player again after he&#8217;s jumped.  Did you read the instructions at the beginning of the game?&#8221;</p>
<p style="padding-left: 30px;">&#8220;<em>Oh those, I kinda skipped through the last seven pages.&#8221;</em></p>
<p style="padding-left: 30px;">&#8220;Fair enough, maybe I should look at shortening them down a bit.  Triple tap may be a bit tricky too, I guess I could look at using a tap and hold or something.  That shouldn&#8217;t take too long to fix.  If I sent you a new build, would you give it another go?&#8221;</p>
<p style="padding-left: 30px;"><em>&#8220;Sure, sounds good&#8221;</em></p>
<p>Wonderful, a happy ending.  With a little effort on our part, we&#8217;ve turned a flippant, unhelpful response into some valuable information:</p>
<ul>
<li>If a player can&#8217;t master double jumping, the game is unplayable.  Is it really that important a skill for our game?</li>
<li>Triple tapping is a pain.</li>
<li>Our &#8220;how to play&#8221; instructions are too long.</li>
<li>Maybe we should put the first time the player is required to double jump further into the first level?</li>
<li>Perhaps we can shorten the instructions and break them up into smaller chunks, delivered as needed rather than all at once?</li>
</ul>
<p>All that from <em>&#8220;Man this sucks, couldn&#8217;t you do any better?&#8221;</em> .  The idea of &#8220;five whys&#8221; is to strip away the superfluous and get at the heart of a problem.</p>
<h2>Wrapping up</h2>
<p>A bullet list to wrap up:</p>
<ul>
<li>Avoid being personal (using &#8220;you&#8221;), unless you&#8217;re talking about yourself (&#8220;I think&#8221;).</li>
<li>Think of it as a puzzle to solve objectively.  The answer is there, you just need to develop the techniques to find it.</li>
<li><a href="http://en.wikipedia.org/wiki/Hanlon's_razor">&#8220;Never attribute to malice that which is adequately explained by stupidity.&#8221;</a> A person who&#8217;s gone to the effort of offering criticism may have a valid problem they don&#8217;t know how to communicate.</li>
<li>Your harshest criticism is also you&#8217;re greatest opportunity for improvement.</li>
<li>Be wary of feedback from friends and family &#8211; avoid asking what they think &#8211; rather ask them for ways to help you improve and fix the game.</li>
</ul>
<p>So, maybe there is something to being nice after all.  Mastering the art of giving and receiving feedback may seem unimportant at first, but it&#8217;s one of the most valueable tools you have.</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/08/fluffy-buns-a-handy-tool-for-developing-better-games/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Partial Monty</title>
		<link>http://acornheroes.com/2010/07/the-partial-monty/</link>
		<comments>http://acornheroes.com/2010/07/the-partial-monty/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 03:49:57 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Faerie]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=458</guid>
		<description><![CDATA[Today is the day when I tell all and bare all. At least it&#8217;s the day when I said I&#8217;d tell all and bare all about the game I&#8217;m currently working on. And I will, mostly.  You see it&#8217;s complicated, and that&#8217;s what this article is about. A Commitment Let&#8217;s start at the beginning.  There was an [...]]]></description>
			<content:encoded><![CDATA[<div>Today is the day when I tell all and bare all.</div>
</p>
<div>At least it&#8217;s the day when I <em>said</em> I&#8217;d tell all and bare all about the game I&#8217;m currently working on.</div>
</p>
<div>And I will, mostly.  You see it&#8217;s complicated, and that&#8217;s what this article is about.</div>
</p>
<h2>A Commitment</h2>
<div>Let&#8217;s start at the beginning.  There was an interesting chat this week on Twitter, where we were discussing how much you should reveal of the project you&#8217;re working on.  There&#8217;s a school of thought that says revealing your plans just gives other people the chance to rip off your ideas.  Which is true.  The other side says that there&#8217;s a huge potential win by getting something in front of people early, so you have a chance to ship a superior product.  Also a valid viewpoint, and this is why we have public betas.</div>
</p>
<div>So here&#8217;s my take on it:</div>
</p>
<div><a href="http://acornheroes.com/wp-content/uploads/2010/07/Revolutionary.jpg"><img class="aligncenter size-full wp-image-460" title="Revolutionary" src="http://acornheroes.com/wp-content/uploads/2010/07/Revolutionary.jpg" alt="" width="350" height="86" /></a></div>
</p>
<div>Tetris was revolutionary.  It&#8217;s hard to remember that now.  I remember reading the pre-release buzz about Tetris, and I just plain didn&#8217;t get it.  Until I saw the blocks falling, and played with rotating and dropping them, it was hard to see where the fun was.  If Jonathon Blow had started talking to you about his time-shifting platformer, any game you made from the idea would undoubtedly be far removed from the wonderful game that <a href="http://braid-game.com/">Braid</a> turned into.</div>
</p>
<div><a href="http://acornheroes.com/wp-content/uploads/2010/07/Derivative.jpg"><img class="aligncenter size-full wp-image-461" title="Derivative" src="http://acornheroes.com/wp-content/uploads/2010/07/Derivative.jpg" alt="" width="350" height="86" /></a></div>
</p>
<div>Note that when I say derivative, I&#8217;m not necessarily being negative.  If you&#8217;re working on a Diablo-clone, or a Bejewelled-a-like title, there&#8217;s still plenty of scope for it to be brilliant, and well worth playing.  <a href="http://sivers.org/multiply">Execution is everything</a>.  Just don&#8217;t hide it away in a dark dungeon, believing that no one else has had the same idea.</div>
</p>
<div>Don&#8217;t take my word for it, <a href="http://www.escapistmagazine.com/articles/view/issues/issue_221/6582-Why-Your-Game-Idea-Sucks">read this</a>.</div>
</p>
<div><a href="http://acornheroes.com/wp-content/uploads/2010/07/ChaoticGood.jpg"><img class="aligncenter size-full wp-image-463" title="ChaoticGood" src="http://acornheroes.com/wp-content/uploads/2010/07/ChaoticGood.jpg" alt="" width="350" height="86" /></a></div>
</p>
<div>I&#8217;m not naive, but I do prefer to believe that most people are honest, and the world is a better place for sharing.  That&#8217;s why I love the iDev community so much.</div>
</p>
<div>So this fairly quickly lead to:</div>
</p>
<div><a href="http://acornheroes.com/wp-content/uploads/2010/07/Dogfood.jpg"><img class="aligncenter size-full wp-image-464" title="Dogfood" src="http://acornheroes.com/wp-content/uploads/2010/07/Dogfood.jpg" alt="" width="350" height="107" /></a></div>
</p>
<div>If you&#8217;re not familiar with the dog food reference, <a href="http://www.joelonsoftware.com/articles/fog0000000012.html">read this</a>.</div>
</p>
<h2>Which brings us to today&#8230;</h2>
<div>The problem with eating dog food is that sometimes, once you start to eat it, you realise why most people don&#8217;t.  In this case it&#8217;s scary, a leap of faith.  What guarantee do I have that someone else won&#8217;t rip off the idea and hit the App Store before I do?  Let&#8217;s face it, with full time employment and a hectic family life, I&#8217;ll be lucky to get this out before Christmas.</div>
</p>
<div>The closer I got to today, the more nervous I became about sharing details of my current game project.</div>
</p>
<div>Here&#8217;s the crux of the problem.  As with many iOS game ideas, my central game mecahanic is incredibly simple.  If I describe the core mechanic &#8211; which is not revolutionary, but I think is quite novel &#8211; then I&#8217;ve lost any chance of hitting the App Store with something a bit different.  This is especially true  Think about <a href="http://click.linksynergy.com/fs-bin/stat?id=tJcjmvCiUp8&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Ffruit-ninja%252Fid362949845%253Fmt%253D8%2526uo%253D4%2526partnerId%253D30" target="itunes_store">Fruit Ninja</a> (App Store link) for example.  It&#8217;s a great game that managed to be fresh and fun.  But if the devs had openly described the core mechanic and the theme (ninjas don&#8217;t like fruit) too early, they&#8217;ve literally given the game away.  Instead, when it was released, complete with a crazy, <a href="http://www.youtube.com/watch?v=0kMTFFgMPI8">viral video</a> on YouTube, the novelty factor was high and helped ensure their success.</div>
</p>
<h2>Faerie</h2>
<div><a href="http://acornheroes.com/wp-content/uploads/2010/07/Faerie4.jpg"><img class="alignright size-medium wp-image-466" title="Faerie4" src="http://acornheroes.com/wp-content/uploads/2010/07/Faerie4-154x300.jpg" alt="" width="154" height="300" /></a>So, let me introduce <em>Faerie</em> (a working title).  It&#8217;s still in the very early stages of development, but it&#8217;s had encouraging feedback so far from people who have seen it.</div>
<h3>Goals</h3>
<div>I wanted to make a game that my kids could play that would still be challenging to an adult.  I think that too often we don&#8217;t give kids enough credit for the innate intelligence they have.  So Faerie is to be a kid-friendly game with some genuine challenge for all ages.</div>
<h3>Theme</h3>
<div>Faeries are on the front line of the battle between mediocrity and excitement.  Every day, in every way they fight to brighten people&#8217;s lives.  They do this by gathering up and combining the little pieces of magic that are all around us but we never see.  As the player collects magic and scores points, this is reflected by the game&#8217;s environment becoming a brighter, happier place.  Don&#8217;t score fast enough and dreariness wins.</div>
<h3>Art Style</h3>
<div>Let&#8217;s show off some programmer art.  I owe a huge debt to Mike <a href="http://weheartgames.com/2010/06/screencast-app-icon-design-and-resolution-independence/">for</a> <a href="http://weheartgames.com/2010/07/screencast-clipping-masks/">his</a> <a href="http://weheartgames.com/2010/07/screencast-3-resizing-use-vector-shapes/">Photoshop</a> <a href="http://weheartgames.com/2010/07/screencast-4-making-skins-themes-with-photoshop-slices/">tutorials</a> which have helped me increase my Photoshop skill level. The player collects magic to make the sunrise more wonderful, and help people get a good start to their day.  The idea is that there would be multiple levels, each with their own backgrounds and stories.</div>
<h3>Mechanics</h3>
<div><a href="http://acornheroes.com/wp-content/uploads/2010/07/Faerie5.jpg"><img class="alignright size-medium wp-image-467" title="Faerie5" src="http://acornheroes.com/wp-content/uploads/2010/07/Faerie5-154x300.jpg" alt="" width="154" height="300" /></a>Faerie began as a desire to make a game that my kids could play that still felt challenging to play as an adult.  Combining Bejewelled style scoring with <a href="http://click.linksynergy.com/fs-bin/stat?id=tJcjmvCiUp8&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Fgeospark-warning-highly-addictive%252Fid337662397%253Fmt%253D8%2526uo%253D4%2526partnerId%253D30" target="itunes_store">geoSpark</a> (App Store link) style action was the plan, although I&#8217;m happy to say the resulting mechanic is quite different now &#8211; including elements from Tetris, Whack-a-mole and Bejewelled.  This is perhaps the most sensitive area for me, so I&#8217;ll leave it at that.</div>
<h3>So when&#8217;s it ready?</h3>
<div>Today on <a href="http://idevblogaday.com/">#iDevBlogADay</a> we&#8217;ve already seen Retro Dreamer&#8217;s upcoming <a href="http://retrodreamer.com/blog/2010/07/linkoidz-coming-soon/">Linkoidz</a> which should be due out soon.  Faerie isn&#8217;t anywhere near that ready, so you&#8217;ll have to wait, I&#8217;m afraid.  I&#8217;m hoping to get a first playable together some time this month, and if I&#8217;m really brave I&#8217;ll send it out to a few<br />
people for initial feedback (let me know if you&#8217;re interested in providing feedback on something that&#8217;s very rough still).</div>
</p>
<div>So, not quite the &#8216;Full&#8217; Monty, but now you know what I&#8217;m working on, please bug me to get it done before my kids grow up! <img src='http://acornheroes.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/07/the-partial-monty/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Updated RSS feed</title>
		<link>http://acornheroes.com/2010/07/updated-rss-feed/</link>
		<comments>http://acornheroes.com/2010/07/updated-rss-feed/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 03:19:43 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[About Us]]></category>
		<category><![CDATA[Setting up]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=426</guid>
		<description><![CDATA[Hi everyone. Just a quick note to say that I&#8217;ve switched our RSS feed over to Feedburner. The new feed is http://feeds.feedburner.com/AcornHeroes. What does this mean for you? Actually, nothing. The old feed will still work exactly as it has, this is just a behind the scenes, making it easier for ourselves sort of update. [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone.  </p>
<p>Just a quick note to say that I&#8217;ve switched our RSS feed over to Feedburner.  The new feed is <a href="http://feeds.feedburner.com/AcornHeroes">http://feeds.feedburner.com/AcornHeroes</a>.</p>
<p>What does this mean for you?  Actually, nothing.  The old feed will still work exactly as it has, this is just a behind the scenes, making it easier for ourselves sort of update.</p>
<p>So why am I saying this?  Well, if your a regular subscriber (thank you!) then if it&#8217;s not a hassle, moving over to the new feed will make our lives a little easier, and helps make this site just a little better.</p>
<p>If you&#8217;re not a subscriber, then I&#8217;d like to offer you this chance to subscribe.  We aim to offer useful, relevant information to independent game developers with a focus on iOS development in particular.</p>
<p>So, if you want to add or update our RSS feed, the new link is <a href="http://feeds.feedburner.com/AcornHeroes">http://feeds.feedburner.com/AcornHeroes</a> &#8211; but once again, nothing will break if you don&#8217;t, so feel free to do nothing at all <img src='http://acornheroes.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/07/updated-rss-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Game Developer&#8217;s Bookshelf</title>
		<link>http://acornheroes.com/2010/07/the-game-developers-bookshelf/</link>
		<comments>http://acornheroes.com/2010/07/the-game-developers-bookshelf/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 04:43:02 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=391</guid>
		<description><![CDATA[Me: &#8220;Hi, my name&#8217;s George&#8221; Everyone: &#8220;Hi George!&#8221; Me: &#8220;My name&#8217;s George, and I&#8217;m a book addict.  I love reading and I just can&#8217;t get enough.&#8221; Yep, I&#8217;m a book nerd, a big one.  And from discussions with my fellow iDevBlogADay-ers, I&#8217;m not the only one.  While the Internet is a great place to find [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding-left: 60px;"><em>Me:</em> &#8220;Hi, my name&#8217;s George&#8221;</div>
<div id="_mcePaste" style="text-align: left; padding-left: 60px;"><em>Everyone:</em> &#8220;Hi George!&#8221;</div>
<div id="_mcePaste" style="text-align: left; padding-left: 60px;"><em>Me:</em> &#8220;My name&#8217;s George, and I&#8217;m a book addict.  I love reading and I just can&#8217;t get enough.&#8221;</div>
<address><em><br />
</em></address>
<div id="_mcePaste">Yep, I&#8217;m a book nerd, a big one.  And from discussions with my fellow <a href="http://idevblogaday.com/">iDevBlogADay</a>-ers, I&#8217;m not the only one.  While the Internet is a great place to find a <a href="http://acornheroes.com/2010/07/the-things-i-learn-from-twitter-amaze-me/">wealth of information</a>, sometimes a book is the only place you can really cover a subject with the attention it deserves.  I have a few favourites, and after reading this week&#8217;s post from <a href="http://pocketcyclone.com/2010/07/20/book-treasures/">Markus</a>, I felt I should share.</div>
<h3>Obtaining a Fix</h3>
<div id="_mcePaste">Obviously, there&#8217;s the standard sources for good books &#8211; Amazon.com, Barnes &amp; Noble and Borders.  But here&#8217;s a couple of options I prefer that you might not know of.  O&#8217;Reilly have an online subscription service called <a href="http://safari.oreilly.com/">Safari</a>.  Depending on your subscription, you get 5 or more books that you can have complete access to at any one time.  There&#8217;s a large selection of publishers, all making their books available in an online form.  Often books are available here before publication in a &#8216;beta&#8217; form, which is great in a fast moving industry like ours.</div>
<address><em><br />
</em></address>
<div id="_mcePaste">Another one you may not have heard of is <a href="http://pragprog.com/">The Pragmatic Bookshelf</a> &#8211; who publish a range of books including a growing range of iOS related titles.  What&#8217;s really cool is that they offer books in both electronic and paper forms, and at any time you can log in and re-download a copy of any book you&#8217;ve purchased through them, in PDF, ePub or mobi formats.  Once again, &#8216;beta&#8217; versions of books are available.  The place is also run by <a href="http://pragprog.com/404">Gerbils</a>, which is unusual these days.</div>
<address><em><br />
</em></address>
<div>The Pragmatic guys frequently run special promotions, and it&#8217;s quite common to get up to 50% off many titles.  In particular if you sign up and then recommend a friend to sign up, you&#8217;ll both immediately get 40% off coupons to redeem on any purchase.  If you don&#8217;t have any friends who are sufficiently book-nerdy like you and me, drop me a line at george.sealy &#8216;at&#8217; gmail.com and I&#8217;ll send you an invite so we can both enjoy a discount <img src='http://acornheroes.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<h3>Some Great Books</h3>
<div id="_mcePaste">OK, enough prattle.  Here&#8217;s a small selection of  great books that I own and would happily recommend to anyone.</div>
<p><a href="http://www.amazon.com/gp/product/0123694965?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0123694965"><img class="alignleft size-full wp-image-434" style="margin: 20px;" title="41xdolUvXzL._SL160_" src="http://acornheroes.com/wp-content/uploads/2010/07/41xdolUvXzL._SL160_.jpg" alt="" width="123" height="160" /></a></p>
<p><strong><a href="http://www.amazon.com/gp/product/0123694965?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0123694965">The Art of Game Design : A Book of Lenses</a></strong></p>
<address><em>by Jesse Schell</em></address>
<address><em><br />
</em></address>
<div id="_mcePaste">I can&#8217;t recommend this book highly enough.  If you want to learn how games are designed, and how to make great games yourself, then this is the book for you.  Throughout the book, Jesse provides a collection of <em>lenses</em>.  Each lens captures one aspect of game design and provides a series of questions you can ask yourself about a game.  Typically the answers to these question provid insight into why certain aspects of a game aren&#8217;t working, and what can be done to improve it.</div>
<div id="_mcePaste">In the spirit of try before you buy, there are <a href="http://artofgamedesign.com/book/chapters.htm">several chapters available on line</a> for you to read.  Or read <a href="http://www.next-gen.biz/features/the-best-book-game-design-ever">this review</a>.</div>
<address><em><br />
</em></address>
<p><a href="http://www.amazon.com/gp/product/1430224592?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1430224592"><img class="alignright size-full wp-image-436" style="margin: 20px;" title="41BBVfpEPYL._SL160_" src="http://acornheroes.com/wp-content/uploads/2010/07/41BBVfpEPYL._SL160_1.jpg" alt="" width="121" height="160" /></a></p>
<h4><a href="http://www.amazon.com/gp/product/1430224592?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1430224592">Beginning iPhone 3 Development: Exploring the iPhone SDK</a></h4>
<address>by Dave Mark and Jeff LaMarche</address>
<address></address>
<address></address>
<address><em><br />
</em></address>
<div id="_mcePaste">If you&#8217;re new to iOS programming, this book will quickly become your best friend.  The book is well written and introduces XCode, Interface Builder and the iPhone SDK in a clear and useful way.  Many books give you an exact sequence of steps to follow to achieve a particular result, leaving you unsure how to do anything else.  This book though gives you enough understanding to branch out and try things on your own.  This book is often sitting on my desk when I&#8217;m working on iOS projects.  This book is also <a href="http://my.safaribooksonline.com/9781430224594">available on Safari</a>, along with many of the other good Apress iOS books.</div>
<address><em><br />
</em></address>
<div><a href="http://www.amazon.com/gp/product/1893115941?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1893115941"><img class="alignleft size-full wp-image-439" style="margin: 20px;" title="41AeNwwfk1L._SL160_" src="http://acornheroes.com/wp-content/uploads/2010/07/41AeNwwfk1L._SL160_.jpg" alt="" width="118" height="160" /></a></div>
<h4><a href="http://www.amazon.com/gp/product/1893115941?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1893115941">User Interface Design for Programmers</a></h4>
<address>by Joel Spolsky</address>
<address></address>
<address><em><br />
</em></address>
<div id="_mcePaste">I found this book before I&#8217;d ever heard of <a href="http://www.joelonsoftware.com/">Joel Spolsky</a>, and<a href="http://www.joelonsoftware.com/articles/fog0000000043.html"> his test</a>, which changed the way I go about software development.  In this book he describes his no nonsense approach to UI design.  The chapter names alone convey a wealth of information, for example <em>Design for Extremes</em> and <em>People Can&#8217;t Read</em>.  If you haven&#8217;t heard of Joel yet, set aside a few hours and head on over to <a href="http://www.joelonsoftware.com/">his site</a> and start working through some of his reading lists of articles, which includes most of the <a href="http://www.joelonsoftware.com/uibook/chapters/fog0000000057.html">content from the book</a>, so there&#8217;s no excuse for not reading this.</div>
<address><em><br />
</em></address>
<div><a href="http://www.amazon.com/gp/product/1568814135?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1568814135"><img class="alignright size-full wp-image-440" style="margin: 20px;" title="51hLW9JAF-L._SL160_" src="http://acornheroes.com/wp-content/uploads/2010/07/51hLW9JAF-L._SL160_.jpg" alt="" width="127" height="160" /></a></div>
<h4><a href="http://www.amazon.com/gp/product/1568814135?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1568814135">Game Engine Architecture</a></h4>
<address>by Jason Gregory</address>
<address></address>
<address><em><br />
</em></address>
<div id="_mcePaste">Jason Gregory is an industry veteran, and it shows.  If you have any interest in how a game engine is put together then you&#8217;ll like this one.  You&#8217;ll get a high level view of all the parts that make up an engine and how they interact along with specific examples from well known game engines &#8211; including the open source <a href="http://www.ogre3d.org/">OGRE</a> and Naughty Dog&#8217;s Uncharted engine.  While the book is based on Jason&#8217;s experience with PC and PS3 platforms, there&#8217;s plenty of valuable insight here that can be applied anywhere.  This book is particularly good if you are new to game programming &#8211; the older hands will probably find a lot that&#8217;s familiar &#8211; along with a few ideas that are new and useful.</div>
<address><em><br />
</em></address>
<div><a href="http://www.amazon.com/gp/product/020161622X?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=020161622X"><img class="alignleft size-full wp-image-441" style="margin: 20px;" title="41HXiIojloL._SL160_" src="http://acornheroes.com/wp-content/uploads/2010/07/41HXiIojloL._SL160_.jpg" alt="" width="127" height="160" /></a></div>
<h4><a href="http://www.amazon.com/gp/product/020161622X?ie=UTF8&amp;tag=acorhero-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=020161622X">The Pragmatic Programmer: From Journeyman to Master</a></h4>
<address>by Andrew Hunt</address>
<address></address>
<address><em><br />
</em></address>
<div id="_mcePaste">If there is a trend in my book choices, it is for clear, easy to read books.  The Pragmatic Programmer is one of those books that can be flicked through and read a section at a time.  It distills the experience and insight of the author into bite-sized chunks of wisdom that can help you be a better programmer.  This book isn&#8217;t so much about programming as it is about how you as a programmer approach your work, and how you can be more efficient and effective.  If I ever have enough money to employ people, this book will be required reading for all programmers.</div>
<address><em><br />
</em></address>
<h3>My Name is George</h3>
<div>I&#8217;m an addict, but it&#8217;s a reasonably harmless addiction that I&#8217;m willing to share. All of these books have a permanent place on my office bookshelf.  What are your favourites?  Let me know in the comments below, I&#8217;m always looking for my next fix!</div>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/07/the-game-developers-bookshelf/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Distributed Version Control &#8211; Getting Started</title>
		<link>http://acornheroes.com/2010/07/distributed-version-control-getting-started/</link>
		<comments>http://acornheroes.com/2010/07/distributed-version-control-getting-started/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 20:40:28 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=419</guid>
		<description><![CDATA[It&#8217;s not just for academic hippies There have been a lot of people talking up Distributed Version Control Systems (DVCS). Until recently, I&#8217;d assumed that it was the same people who have been talking up Linux for the last 15+ years. Don&#8217;t get me started on them. It seemed the principal argument used by many [...]]]></description>
			<content:encoded><![CDATA[<h3>It&#8217;s not just for academic hippies</h3>
<p>There have been a lot of people talking up Distributed Version Control Systems (DVCS).  Until recently, I&#8217;d assumed that it was the same people who have been talking up Linux for the last 15+ years.  Don&#8217;t get me started on <em>them</em>.  It seemed the principal argument used by many people was &#8216;<em>everyone has their own repository&#8217;</em>.  To me, that sounded like a recipe for disaster &#8211; I&#8217;m far happier with the concept of a central, <strong>authoritative</strong> repository.</p>
<p>So I was surprised when <a href="http://joelonsoftware.com">Joel Spolsky</a> came out in favour of Mercurial (or Hg), a DVCS.  Joel&#8217;s a fairly level headed, mainstream kind of person &#8211; what was he doing fraternizing with the Linux-loving hippies and beatniks?  After reading his Hg introduction, I realized I was in danger of becoming a convert too.  When you&#8217;re done here, you may want to go over to <a href="http://hginit.com">hginit.com</a> &#8211; you won&#8217;t find a better introduction to Hg or distributed version control in general.</p>
<h3>What&#8217;s so good about it?</h3>
<p>So, it turns out that DVCS is a viable alternative to regular, vanilla flavored version control. And by that I mean Subversion or CVS, the systems I&#8217;m most familiar with.  There&#8217;s a few main points that convinced me to give Hg a try:</p>
<ul>
<li>It&#8217;s not too dissimilar to &#8216;normal&#8217; source control, meaning it&#8217;s fairly simple to make the transition (add files, update, commit, revert etc work basically the same way)</li>
<li>Rather than worrying about &#8216;everyone&#8217; having a repository, the key thing is that you have <em>your own</em> local repository that&#8217;s just for you.  So you get the safety net of frequent check-ins without having to worry about &#8216;breaking the build&#8217;.</li>
<li>Branching is something a lot of people strenuously avoid with Subversion, because the tools just aren&#8217;t set up to handle it easily.  Because of the way Hg tracks changes, merging branches is a simpler and more reliable process.</li>
<li>Mercurial still supports the idea of a central repository, and in fact handles multiple staging servers (development, stable, release etc) fairly well.</li>
</ul>
<p>I&#8217;ve been using Hg on a couple of projects for a while now, and I like it.  The big wins for me are how simple it is to set up a new repository and how convenient it is to have a local repository for frequent check-ins.</p>
<h3>Getting started</h3>
<p>So what&#8217;s needed to get started?  Well the good news is that all the tools you need are freely available and well made.  First off, you really should read <a href="http://hginit.com">Joel&#8217;s introduction</a>.  After that, the command line tools are available <a href="http://mercurial.selenic.com">from here</a>.  Using the command line is a great way to learn a version control system and really understand what&#8217;s going on &#8211; and it&#8217;s surprisingly simple.</p>
<p>Sooner or later though, you&#8217;ll want to look at some sort of GUI though to speed the process up.  <a href="http://twitter.com/@bunnyhero">@bunnyhero</a> put me onto <a href="http://jasonfharris.com/machg">MacHg</a> which I&#8217;ve been using for a week or so now it&#8217;s been excellent.  There&#8217;s a <a href="http://jasonfharris.com/machg/screencasts/screencasts.html">good screencast</a> that covers the basic features of MacHg and will get you up and running straight away.</p>
<p>You may think that not having your version control inside XCode is a pain, but in fact I think it&#8217;s a huge bonus to separate IDE and version control.  I&#8217;ve never seen source control handled properly inside an IDE (I&#8217;m thinking Visual Studio, Eclipse and XCode here).  Version control is about files and folders, and I don&#8217;t want the IDE thinking it know better than me how to apply version control to a project by making &#8216;assumptions&#8217; to try and streamline the process.</p>
<p>And finally, one of the strengths of version control is that it forces you to maintain backups of your code base.  And the best backup is an off site one.  Setting this up is a pain, right?  Actually no, as once again Joel comes to the party and makes this easy.  His company <a href="http://fogcreek.com">Fogcreek</a> offer remotely hosted project management, bug tracking and version control tools, including support for Hg (they call their Hg toolset <a href="http://www.fogcreek.com/Kiln">Kiln</a>).</p>
<p>Obviously this is service you pay for, right?  Yes.  <em>Unless</em> you are a student or small company (or in fact anyone who doesn&#8217;t need more than two active users), in which case it&#8217;s <em><strong><a href="http://www.fogcreek.com/FogBugz/StudentAndStartup.html?isl=197759"><span style="color: #ff0000;">F</span><span style="color: #ffff00;">R</span><span style="color: #00ff00;">E</span><span style="color: #0000ff;">E</span></a></strong></em>.  Setup is trivial, and before you know it you can have a professional grade offsite Hg server of your very own.</p>
<p>While you&#8217;re at it, you also get their <a href="http://www.fogcreek.com/FogBugz">Fogbugz</a> tools as well, so simple bug tracking, scheduling, wiki, code review and customer support all come as part of the free package.  Nice.  I should point out I get nothing for recommending Fogcreek, I&#8217;m just a bit of a fanboy.</p>
<h3>Give it a go</h3>
<p>So there you are,  if you&#8217;re looking for an easy way to get into source control, or you&#8217;re sick of merging branches in Subversion, you might give Hg a go.  All the tools you need are freely available for a small scale team and the learning curve is not that steep.</p>
<p>One last detail &#8211;  I did have a little trouble getting MacHg to talk to Kiln .  The problem is that MacHg needs the URL to include your username and the repository URL, and separates them with an &#8216;@&#8217; symbol.  Kiln&#8217;s user names are typically your email address , so MacHg get&#8217;s a little confused when it sees something like:</p>
<pre>https://george.sealy@gmail.com@acornheroes.kilnhg.com/Repo/Repositories/Group/FaerieDev</pre>
<p>Fortunately, the solution is fairly straight forward, you can &#8216;escape&#8217; the &#8216;@&#8217; symbol in your user name like so:</p>
<pre>https://george.sealy%40gmail.com@acornheroes.kilnhg.com/Repo/Repositories/Group/FaerieDev</pre>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/07/distributed-version-control-getting-started/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Tuning Your Game Made Easy</title>
		<link>http://acornheroes.com/2010/07/tuning-your-game-made-easy/</link>
		<comments>http://acornheroes.com/2010/07/tuning-your-game-made-easy/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 18:50:32 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Tuning]]></category>

		<guid isPermaLink="false">http://acornheroes.com/?p=402</guid>
		<description><![CDATA[Some days it’s hard to think of something to write about, and other days something just falls in your lap. Happily this week it was the latter. It all started with Miguel (as these things often do) &#8211; a.k.a. @mysterycoconut on Twitter &#8211; posting this article about connecting to an iDevice via telnet while running [...]]]></description>
			<content:encoded><![CDATA[<p>Some days it’s hard to think of something to write about, and other days something just falls in your lap.  Happily this week it was the latter.  It all started with Miguel (as these things often do) &#8211; a.k.a. <a href="http://twitter.com/mysterycoconut">@mysterycoconut</a> on Twitter &#8211; posting <a href="http://mysterycoconut.com/blog/2010/07/tweak-away/">this article</a> about connecting to an iDevice via telnet while running your App.  Using this technique it becomes possible to rapidly tweak parameters on the fly or in fact do all sorts of crazy stuff.</p>
<p>Needless to say I jumped on this idea to aid in tuning my current game prototype. I’ve just reached the stage where rapid tweaking of variables is going to help focus and refine the game play.  Miguel suggests hooking a Lua scripting engine into your code, but I thought it would be fun to create my own, plus most of my code is C++ (rather than Objective-C) and I’ve found binding Lua to C++ to be a fiddly process in the past.</p>
<p>The corresponding code for this article can be found <a href="http://acornheroes.com/Code/EasyTuning.zip">here</a>.  Note that the DebugServer code comes from Miguel&#8217;s article, and the AsyncSocket code comes from <a href="http://code.google.com/p/cocoaasyncsocket/">here</a>.   I&#8217;ve added a minimal amount to Miguel’s code to pass received commands on to the DebugUtils functions found in Debug.[h|mm].  I haven’t had time to create a complete sample project, but the code provided should drop into any existing code base with minimal fuss.  If the coding style looks a little strange, you may want to also read <a href="http://gamesfromwithin.com/the-always-evolving-coding-style">this</a> and <a href="http://acornheroes.com/2010/06/trying-something-new/">this</a>.</p>
<p>So, let’s start at the end and work backwards, which I often find to be an effective technique.  When tuning a game we spend a lot of time tweaking variables and constants – maximum speed, rate of fire, gravity, item prices, animation durations etc.  Wouldn’t it be nice to open up a telnet session to your App and enter a command like “gravity = -8”?  Alternatively, maybe there’s a set pattern of enemies that causes a rare bug.  Wouldn’t it be nice to enter a “SetupWeirdEnemyPattern” command for easy testing?</p>
<p>So, we have two common scenarios – tweaking a variable and executing a function that alters the game state in a slightly more involved way.  The code below allows us to do this.  Variables and functions can be “registered” and given a name, which we can then use to adjust values or execute functions via our telnet connection.  To make it simple to pass in parameters to these functions, we pass in a set of text parameters using argc and argv, just like the main() function of a C++ program.</p>
<p>Let’s have a look at the public interface to this code:</p>
<pre class="brush:cpp">

typedef bool (*DebugCommandFunc)(int argc, char *argv[]);

namespace DebugUtils
{
    void Initialise();

    bool ProcessCommand(const char *command);

    bool RegisterCommand(const char *commandName, DebugCommandFunc commandFunc);

    bool RegisterVariable(const char *variableName, bool *var);
    bool RegisterVariable(const char *variableName, int *var);
    bool RegisterVariable(const char *variableName, float *var);
}
</pre>
<p>Not much there, is there?  The guts of it is in the ProcessCommand() function, where we pass in a string, and magic happens.  Or, to provide an example:</p>
<pre class="brush:cpp">

bool ResetGameCommand(int argc, char *argv[])
{
// Do stuff here to reset the game state
}

DebugUtils::RegisterCommand(“ResetGame”, ResetGameCommand);
</pre>
<p>And later, through a telnet connection, we enter <em>“ResetGame”</em>, which in turn calls:</p>
<pre class="brush:cpp">

DebugUtils::ProcessCommand(“ResetGame”);
</pre>
<p>And, just like magic, we reset the game state.</p>
<p>Or as another example, we could register a game variable, say…</p>
<pre class="brush:cpp">

DebugUtils::RegisterVariable(“gold”, &amp;gameState.pileOfDubloons);
</pre>
<p>And then, through the telnet connection, we can tweak this value mid-game, by entering:</p>
<p><em>“gold = 10000”</em>, or <em>“gold *= 2.0”</em></p>
<p>I’ve intentionally kept this system as simple as possible, but there’s a lot of power here.  It’s very simple to register variables or add short pieces of code that can be run as needed.  Just a few examples &#8211; turning on debug drawing to see bounding boxes of physics objects, changing the value of gravity or a jump pack’s thrust, loading an arbitrary level, turning off collision detection – the sky’s the limit.</p>
<p>The key thing here is to let you spend as much time as possible refining and tuning your game, because as Jesse Schell describes in his excellent book <a href="http://www.amazon.com/gp/product/0123694965?ie=UTF8&#038;tag=acorhero-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0123694965">The Art of Game Design: A book of lenses</a><img src="http://www.assoc-amazon.com/e/ir?t=acorhero-20&#038;l=as2&#038;o=1&#038;a=0123694965" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />:</p>
<blockquote><p>The Rule of the Loop: The more times you test and improve your design, the better your game will be.</p></blockquote>
<p>In other words, by removing the code-compile-run stage from tuning our game, we can create a better game in less time. Hopefully this code, combined with Miguel&#8217;s will provide a simple way to help you refine and debug your game.  Happy tuning!</p>
<p><em>P.S.</em> I was planning to include a description of how I used TDD (Test Driven Development), but figured this post was long enough.  If it’s something you’re interested in though, leave a comment or drop me a note on Twitter (<a href="http://twitter.com/GeorgeSealy">@GeorgeSealy</a>) and I’ll put together an article.</p>
<p><em>P.P.S.</em> Yes, there’s a few things that could be added to this code to make it even more useful.  At the moment it’s not possible to pass a parameter that’s a string with spaces or new lines in it.  To do this, you just extend the tokenizing code to respect quoted parameters like “This is a string”.</p>
<p><em>P.P.S.</em> I’ve resisted the temptation to allow more complex calculations such as “percentComplete = 100 * itemsFound / totalItems”.  Most of the time all you want to do is tweak values.  If you need this much power, hook in Lua as Miguel suggests, don’t roll your own as it becomes increasingly difficult to maintain as a project matures.</p>
<p><em>P.P.P.S.</em> I&#8217;ve also just realised one of the more useful things I&#8217;ve left out &#8211; if you just supply the name of a variable on its own, then the variable&#8217;s value should be either returned via telnet or printed out using NSLog or similar.  There&#8217;s nothing worse than finding the perfect value for something and then being unable to see what it is!</p>
<p><em>P.P.P.P.S.</em> The observant amongst you may have noticed that the link to Jesse Schell’s book is an Amazon Affiliate link, meaning if you follow that link and subsequently purchase something I may get a small commission.  I will only ever put such links to books that I have bought myself or at least read cover to cover and would recommend.</p>
]]></content:encoded>
			<wfw:commentRss>http://acornheroes.com/2010/07/tuning-your-game-made-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
