<?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>GBGames - Thoughts on Indie Game Development &#187; Geek / Technical</title>
	<atom:link href="http://gbgames.com/blog/category/geek-technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://gbgames.com/blog</link>
	<description>An Indie Game Developer's somewhat interesting thoughts</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:30:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>An Online Conference You Can Attend #AltDevConf</title>
		<link>http://gbgames.com/blog/2012/02/an-online-conference-you-can-attend-altdevconf/</link>
		<comments>http://gbgames.com/blog/2012/02/an-online-conference-you-can-attend-altdevconf/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 10:30:40 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Geek / Technical]]></category>
		<category><![CDATA[Marketing/Business]]></category>
		<category><![CDATA[Personal Development]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1849</guid>
		<description><![CDATA[<p>If you&#8217;re not familiar with AltDevBlogADay, you should be. Each day, a game developer posts on a variety of game development topics. There&#8217;s a huge backlog of content there now, and while the recent redesign has made it difficult to find the category you want (you have to click on a post to see only <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2012/02/an-online-conference-you-can-attend-altdevconf/">An Online Conference You Can Attend #AltDevConf</a></span><p><a href="http://gbgames.com/blog/2012/02/an-online-conference-you-can-attend-altdevconf/">An Online Conference You Can Attend #AltDevConf</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re not familiar with <a href="http://altdevblogaday.com">AltDevBlogADay</a>, you should be. Each day, a game developer posts on a variety of game development topics. There&#8217;s a huge backlog of content there now, and while the recent redesign has made it difficult to find the category you want (you have to click on a post to see only some of the tags available as of this writing), it&#8217;s great getting regular, up-to-date, state-of-the-art tips and tricks from the people in the trenches. Authors can be mainstream game programmers, indie developers, academics, or anyone who has something valuable to share.</p>
<p><a href="http://gbgames.com/blog/wp-content/uploads/2012/02/altdevconf.jpg"><img src="http://gbgames.com/blog/wp-content/uploads/2012/02/altdevconf.jpg" alt="AltDevConf" title="AltDevConf" width="303" height="163" class="alignnone size-full wp-image-1850" /></a></p>
<p>It seems to be such a successful site that they&#8217;ve decided to host an online conference. <a href="http://altdevconf.org/">AltDevConf</a> will be held on February 11th and 12th (that&#8217;s this coming weekend), featuring three tracks: education, programming, and design &#038; production. </p>
<blockquote><p>Our goal is twofold: To provide free access to a comprehensive selection of game development topics taught by leading industry experts, and to create a space where bright and innovative voices can also be heard. We are able to do this, because as an online conference we are not subject to the same logistic and economic constrains imposed by the traditional conference model.</p></blockquote>
<p>As it doesn&#8217;t look like I&#8217;ll be attending GDC this year (I&#8217;m still hoping to win an All Access Pass with my <a href="https://twitter.com/#!/GBGames/status/160509840450519040">GDC magnets</a>), AltDevConf seems like a high-quality substitute. While it won&#8217;t be the same as rubbing elbows with other indies or meeting cool celebrities in the gaming world, I&#8217;m excited about it.  </p>
<p>Do you plan to attend? Will you be speaking? </p>
<p><a href="http://gbgames.com/blog/2012/02/an-online-conference-you-can-attend-altdevconf/">An Online Conference You Can Attend #AltDevConf</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2012/02/an-online-conference-you-can-attend-altdevconf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My Offsite Backup Solutions</title>
		<link>http://gbgames.com/blog/2012/01/my-offsite-backup-solutions/</link>
		<comments>http://gbgames.com/blog/2012/01/my-offsite-backup-solutions/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 10:30:27 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Geek / Technical]]></category>
		<category><![CDATA[Marketing/Business]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1831</guid>
		<description><![CDATA[<p>To go along with my last post on indie maintenance and disaster plans, I&#8217;d like to mention how I currently back up my important data.</p> <p> Local Backups</p> <p>I have two active computers. My main development machine is my currently dying laptop. My desktop has a backup of my laptop&#8217;s data. Using rsync and SSH, <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2012/01/my-offsite-backup-solutions/">My Offsite Backup Solutions</a></span><p><a href="http://gbgames.com/blog/2012/01/my-offsite-backup-solutions/">My Offsite Backup Solutions</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>To go along with my last post on <a href="http://gbgames.com/blog/2012/01/indie-maintenance-and-disaster-plans/">indie maintenance and disaster plans</a>, I&#8217;d like to mention how I currently back up my important data.</p>
<p><b> Local Backups</b></p>
<p>I have two active computers. My main development machine is my currently dying laptop. My desktop has a backup of my laptop&#8217;s data. Using rsync and SSH, I can transfer files between devices easily, which was really helpful when I needed to replace the desktop in 2010. I simply rsynced files to my laptop, then rsynced them back to the new desktop. As my laptop has been failing recently, I&#8217;ve been using any lucidity on its part as an opportunity to rsync files to my desktop in anticipation of the laptop dying at any moment.</p>
<p>I also have a 1TB hard drive connected to the router, which means any computers on my network could make use of it. Unfortunately, it has to be formatted as NTFS and requires the use of Samba, which means it isn&#8217;t a perfect solution, and it also means that I use it way less than I should.</p>
<p>So there&#8217;s data redundancy within my computer network. If one machine or drive fails, the important data is also available on the other, and I could always find a way to make better use of my 1TB drive so that losing both computers wouldn&#8217;t be a catastrophic data loss.</p>
<p>But what happens if I get robbed and lose all of this equipment? Or if a fire breaks out? Or some other disaster that takes out all of the data since it is all in the same office? </p>
<p><b>Remote Solutions</b></p>
<p>Since my main project, <a href="http://www.StopThatHero.com/">Stop That Hero!</a>, uses git for version control, I paid for a Micro account on <a href="http://www.github.com/">GitHub</a>, which gives me 5 private repositories and the ability to add one collaborator for just $7/month. So if I lose everything, at least I can continue to work on the project once I get a new computer. </p>
<p>What about other data?</p>
<p>While I have a <a href="http://db.tt/qU7VNgma">DropBox</a> account, I only have limited space available (although signing up for your own account with that link gives us each 250MB extra). DropBox offers tiered pricing plans and a team/business plan, but I can&#8217;t justify the expense at this time. I&#8217;ve been using DropBox for private data backups and as a way to quickly provide a link to a file. I know a few Flash game developers have used DropBox to put up their game for <a href="http://FlashGameLicense.com">FlashGameLicense.com</a>.  </p>
<p>An alternative to DropBox is <a href="https://spideroak.com/download/referral/c33f79a7f0253ca08ee2b84351e05561">SpiderOak</a>. It offers way more space than DropBox, and if you choose to pay for more space, you get more than double the capacity for the same price. Plus, data encryption works both ways, when sending or receiving. According to the SpiderOak site, they claim to be a &#8220;zero knowledge&#8221; backup provider:</p>
<blockquote><p>This means that we do not know anything about the data that you store on SpiderOak &#8212; not even your folder or filenames. On the server we only see sequentially numbered containers of encrypted data.</p></blockquote>
<p>Now, this encryption means that it takes a lot longer to backup files. Since you get so much more space (2GB to start, and we each get a free GB if you use the link above), backing up a few GBs of data can take a good part of your day when you start out. Plus, unlike DropBox, you aren&#8217;t tied to the DropBox folder. You can configure whatever folders and files you want to backup, and you can still share files publicly. You can configure SpiderOak to automatically back up changes at a schedule you set, and it will keep track of previous versions of files for you, too.</p>
<p>I&#8217;ve been fairly happy with SpiderOak so far. The only issue I ran into was related to how it was backing up my Projects folder while I was working on it. I rebuilt my project, and apparently SpiderOak was in the middle of processing the folder my project lives in, and it choked. It was probably because a file like Game.o was deleted and replaced, and it didn&#8217;t know how to handle it mid-processing. I managed to get it unstuck, but it took a support email and a perusal of the support forums to find out how. To prevent problems in the future, explicitly tell it not to backup the folder where your project build lives. </p>
<p>So these are some free solutions with paid options that allow you to sync multiple computers and share with friends. What if you&#8217;re looking for something more cost efficient as well as private? I have a friend who pays for a dedicated remote solution. <a href="http://www.carbonite.com/">Carbonite</a> is $59/year for one computer, which implies that you can&#8217;t use it to sync multiple computers or share files with friends, but it&#8217;s another option available to you. <a href="http://mozy.com/">Mozy</a> is an alternative, and it&#8217;s basic plan is $5.99/month for 50GB with options to pay a little extra to sync multiple computers. There&#8217;s also a Mozy Pro set of plans for servers as well as desktops that charge per gigabyte on top of a flat fee.  </p>
<p>What does your backup plan look like? </p>
<p><a href="http://gbgames.com/blog/2012/01/my-offsite-backup-solutions/">My Offsite Backup Solutions</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2012/01/my-offsite-backup-solutions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Indie Maintenance and Disaster Plans</title>
		<link>http://gbgames.com/blog/2012/01/indie-maintenance-and-disaster-plans/</link>
		<comments>http://gbgames.com/blog/2012/01/indie-maintenance-and-disaster-plans/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 20:29:08 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Geek / Technical]]></category>
		<category><![CDATA[Marketing/Business]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1825</guid>
		<description><![CDATA[<p>My Dell Precision M90, which has been running like a champ for more than half a decade despite my cats&#8217; attempts to get their fur clogged in its fans, is finally dying. I&#8217;ve been seeing graphical glitches for some time, but I&#8217;ve been able to continue working, and the glitches eventually go away. Except when <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2012/01/indie-maintenance-and-disaster-plans/">Indie Maintenance and Disaster Plans</a></span><p><a href="http://gbgames.com/blog/2012/01/indie-maintenance-and-disaster-plans/">Indie Maintenance and Disaster Plans</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>My Dell Precision M90, which has been running like a champ for more than half a decade despite my cats&#8217; attempts to get their fur clogged in its fans, is finally dying. I&#8217;ve been seeing graphical glitches for some time, but I&#8217;ve been able to continue working, and the glitches eventually go away. Except when they don&#8217;t. And recently, the machine won&#8217;t boot correctly.</p>
<p><a href="http://twitpic.com/8a1y6j" title="Well this isn&#039;t a good sign. on Twitpic"><img src="http://twitpic.com/show/thumb/8a1y6j.jpg" width="150" height="150" alt="Well this isn&#039;t a good sign. on Twitpic"/></a></p>
<p>The culprit seems to be a failing video card, which is way too expensive to replace. It&#8217;s frustrating since doing so would probably give this machine another few years of life.</p>
<p>I&#8217;ve been very happy with this machine, but it&#8217;s been slowly getting worse, and I realized that I had no plans for replacing it. So I&#8217;ve been either putting off the research so I can do the work I need to do, or I&#8217;ve been desperately trying to get the machine back up and running so I can continue to do that work, all the while knowing that I am going to need to spend some time (and money) on finding a replacement.</p>
<p>A large company probably has plans for this sort of thing, with IT departments bringing in spare equipment or ordering replacements. In fact, some companies have entire disaster preparedness plans in place. Replacing equipment quickly to ensure business continuity is just a part of such plans. </p>
<p>Since I purchased this laptop through Dell Small Business, I was able to get next-day on-site tech support that I only needed to take advantage of once towards the end of the extended warranty last year, and I was also able to replace the A/C adapter quickly after the cats chewed through the old cord a few years ago. Even knowing that the warranty was expiring, I didn&#8217;t really think through how I would continue to work without the laptop, which I should have realized was as inevitable as a hard drive dying.</p>
<p>And now that I think about it, perhaps the cats should worry about a replacement plan as well&#8230;</p>
<p>As an indie or solo entrepreneur, what do you do it? How prepared are you for equipment failure? Do you only start to worry about it the day your computer fails to boot, or do you anticipate the day your development equipment needs maintenance and replacement? Or do you constantly replace your machines with the latest and greatest and so don&#8217;t need to worry about longevity?</p>
<p><a href="http://gbgames.com/blog/2012/01/indie-maintenance-and-disaster-plans/">Indie Maintenance and Disaster Plans</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2012/01/indie-maintenance-and-disaster-plans/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Integrating LodePNG with an SDL Project</title>
		<link>http://gbgames.com/blog/2012/01/integrating-lodepng-with-an-sdl-project/</link>
		<comments>http://gbgames.com/blog/2012/01/integrating-lodepng-with-an-sdl-project/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 10:30:34 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Geek / Technical]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1793</guid>
		<description><![CDATA[<p>In efforts to port Stop That Hero! to the Mac, I ran into a strange issue involving PNG image data. </p> <p>See, the level layout in &#8220;Stop That Hero!&#8221; is defined by a 50&#215;33 PNG. The colors of pixels in the PNG correspond to tiles and structures in the game. Grass tiles are represented in <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2012/01/integrating-lodepng-with-an-sdl-project/">Integrating LodePNG with an SDL Project</a></span><p><a href="http://gbgames.com/blog/2012/01/integrating-lodepng-with-an-sdl-project/">Integrating LodePNG with an SDL Project</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>In efforts to port <a href="http://StopThatHero.com/">Stop That Hero!</a> to the Mac, I ran into a strange issue involving PNG image data. </p>
<p>See, the level layout in &#8220;Stop That Hero!&#8221; is defined by a 50&#215;33 PNG. The colors of pixels in the PNG correspond to tiles and structures in the game. Grass tiles are represented in the PNG as green pixels, water is blue-green, mountains are gray, and so on. </p>
<p>This PNG (blown up since 50&#215;33 is so tiny):</p>
<p><a href="http://www.flickr.com/photos/29086141@N03/6664440291/" title="Level 4 PNG by gbgames, on Flickr"><img src="http://farm8.staticflickr.com/7029/6664440291_dbcb24f43a.jpg" width="300" height="192" alt="Level 4 PNG"/></a></p>
<p>results in this level layout:</p>
<p><a href="http://www.gbgames.com/blog/images/STH_Level4GamePlay.png"><img alt="Stop That Hero! Bringing evil back..." src="http://www.gbgames.com/blog/images/STH_Level4GamePlay.png" title="Stop That Hero! Bringing evil back..." class="alignnone" width="400" height="301" /></a></p>
<p>I use libSDL_image in order to load image formats other than BMP, and on Windows and GNU/Linux, everything works as expected.</p>
<p>On the Mac, however, I was seeing a problem. It was as if most of the tile data was not getting loaded correctly. Instead of seeing grass, fields, forests, and mountains, I was only seeing mountains. And structure data was also not loading correctly. The player&#8217;s castle wasn&#8217;t appearing either, so the game always ends in defeat. </p>
<p>After ruling out endian issues (Intel-based Macs aren&#8217;t going to require any data-parsing changes from Intel-based Windows or GNU/Linux), I found that the pixel colors being returned from a loaded PNG weren&#8217;t what I expected.</p>
<p>I expect red-green-blue(RGB) data to be (0, 255, 0) for grass tiles, but the color that I was seeing was slightly different. </p>
<p>And it turned out that I wasn&#8217;t alone. A thread on the libSDL mailing list discussed a <a href="http://forums.libsdl.org/viewtopic.php?p=30317">similar pixel bug on Mac OS X</a>, and it turned out to be related to libSDL_image&#8217;s use of Apple&#8217;s ImageIO for the backend. I&#8217;m still not quite 100% clear on what the actual problem is, but the best I can figure out is that ImageIO tries to helpfully convert the image you&#8217;re loading so that it is more optimized for rendering on the specific Mac running the code. It&#8217;s not a problem if all you want to do is render images to the screen, but is a problem if you&#8217;re depending on the pixel data to be accurately decoded. </p>
<p>Last week <a href="http://forums.libsdl.org/viewtopic.php?p=31258">a fix was introduced</a> to solve this issue, but as it isn&#8217;t in the release version yet, and I didn&#8217;t want to convert my data or change how I was doing things, I decided a better way would be to replace libSDL_image in my own code. Thanks to a <a href="https://plus.google.com/108534848495359079135/posts/GXffGBymzau">conversation on Google+</a>, I was introduced to <a href="http://www.nothings.org/">stb_image</a> and <a href="http://lodev.org/lodepng/">LodePNG</a>, both of which are liberally licensed, comprehensive, PNG-handling modules of code. By comprehensive, I mean that unlike libSDL_image, I don&#8217;t also have to require zlib. You just drop in a couple of files into your project, and you&#8217;re done. </p>
<p>I opted for LodePNG because unlike stb_image, it not only loads PNGs but also saves them, and I want to make sure I don&#8217;t have to switch libraries again when I get around to creating a level editor. Also, quite frankly, it was less intimidating than stb_image being a .c file that leaves the production of the associated .h as an exercise for the programmer. </p>
<p>LodePNG had some examples associated with it, and while one example uses libSDL, it wasn&#8217;t clear how to load a PNG into an SDL_Surface. The example simply rendered the PNG to the screen. It was not what I wanted, and I could not find any code out on the Internet that used LodePNG and libSDL together. </p>
<p>So, in the interest of filling this gap, here&#8217;s how to load a PNG with LodePNG and store it into an SDL_Surface:</p>
<blockquote>
<pre>
SDL_Surface * loadImage(const char * filename)
{
    //Using LodePNG instead of SDL_image because of bug with Mac OS X
    //that prevents PNGs from being loaded without corruption.

    std::vector&lt;unsigned char&gt; image;
    unsigned width, height;
    unsigned error = LodePNG::decode(image, width, height, filename); //load the image file with given filename

    SDL_Surface * surface = 0;
    if (error == 0)
    {
        Uint32 rmask, gmask, bmask, amask;

#if SDL_BYTEORDER == SDL_BIG_ENDIAN
        rmask = 0xff000000;
        gmask = 0x00ff0000;
        bmask = 0x0000ff00;
        amask = 0x000000ff;
#else
        rmask = 0x000000ff;
        gmask = 0x0000ff00;
        bmask = 0x00ff0000;
        amask = 0xff000000;
#endif
        int depth = 32;
        surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, depth, rmask, gmask, bmask, amask);

        // Lock the surface, then store the pixel data.
        SDL_LockSurface(surface);

        unsigned char * pixelPointer = static_cast&lt;unsigned char *&gt;(surface->pixels);
        for (std::vector&lt;unsigned char&gt;::iterator iter = image.begin();
                    iter != image.end();
                    ++iter)
        {
            *pixelPointer = *iter;
            ++pixelPointer;
        }

        SDL_UnlockSurface(surface);

        SDL_Surface * convertedSurface = SDL_DisplayFormatAlpha(surface);
        if (convertedSurface != NULL)
        {
            SDL_FreeSurface(surface);
            surface = convertedSurface;
        }
    }

    return surface;
}
</pre>
</blockquote>
<p>Technically, the piece of code related to convertedSurface isn&#8217;t necessary, but SDL_DisplayFormat and SDL_DisplayFormatAlpha convert the surface to one that is optimized for rendering. And it doesn&#8217;t modify the pixel data, which means that if you depend on it for map layout or for doing interesting effects at run-time, it just works, like you expected. </p>
<p><a href="http://gbgames.com/blog/2012/01/integrating-lodepng-with-an-sdl-project/">Integrating LodePNG with an SDL Project</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2012/01/integrating-lodepng-with-an-sdl-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why It Is Important to Document Even the Smallest Decisions</title>
		<link>http://gbgames.com/blog/2011/11/why-it-is-important-to-document-even-the-smallest-decisions/</link>
		<comments>http://gbgames.com/blog/2011/11/why-it-is-important-to-document-even-the-smallest-decisions/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 21:07:20 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Geek / Technical]]></category>
		<category><![CDATA[Linux Game Development]]></category>
		<category><![CDATA[Personal Development]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1757</guid>
		<description><![CDATA[<p>A week or so ago, I was configuring the hero summoning queue for my villages in &#8220;Stop That Hero!&#8221; (still available for pre-order!), and I couldn&#8217;t figure out why I had a special &#8220;END_QUEUE&#8221; for the last item in my queues. None of my code handled it, so it got ignored, and removing it didn&#8217;t <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2011/11/why-it-is-important-to-document-even-the-smallest-decisions/">Why It Is Important to Document Even the Smallest Decisions</a></span><p><a href="http://gbgames.com/blog/2011/11/why-it-is-important-to-document-even-the-smallest-decisions/">Why It Is Important to Document Even the Smallest Decisions</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>A week or so ago, I was configuring the hero summoning queue for my villages in <a href="http://www.StopThatHero.com/">&#8220;Stop That Hero!&#8221; (still available for pre-order!)</a>, and I couldn&#8217;t figure out why I had a special &#8220;END_QUEUE&#8221; for the last item in my queues. None of my code handled it, so it got ignored, and removing it didn&#8217;t change anything adversely that I could see, so I removed it since I couldn&#8217;t remember why I put it there in the first place.</p>
<p>Today, while working on a new level layout, I created a village that summoned only one farmer. When play-testing, I found that right when the farmer appears, the game ends in victory for the player.</p>
<p><a href="http://www.flickr.com/photos/29086141@N03/6391343759/" title="Premature Victory by gbgames, on Flickr"><img src="http://farm7.staticflickr.com/6058/6391343759_bb5a4cabd4_m.jpg" width="240" height="180" alt="Premature Victory"/></a></p>
<p>That&#8217;s odd&#8230;why would that happen?</p>
<p>My victory monitoring code checks all entities to see if there are any that are not on the player&#8217;s team. If there aren&#8217;t, then it checks all structures that summon entities owned by non-player teams to see if they are currently summoning anything. The idea is that at the beginning of the level, when no heroes have been summoned, the game doesn&#8217;t end in victory since they&#8217;re still coming, and victory only occurs when there are no more heroes being summoned AND there no more heroes left in the level. </p>
<p>The issue I was seeing is that right when a village spawns a farmer, the farmer doesn&#8217;t exist yet. It&#8217;s simply a new command to create a farmer. But the village no longer has a farmer in its queue and is empty. So the victory condition goes off and creates the end-game-in-victory-for-player command. So that&#8217;s why I see the farmer when the victory screen comes up. The farmer gets created and the game ends because both commands are run in the same update step.</p>
<p>And that&#8217;s why I had an &#8220;END_QUEUE&#8221; summon that doesn&#8217;t do anything. It&#8217;s to prevent this situation from happening. Now I remember. I ran into this issue before. The END_QUEUE summon is ignored, but the victory condition monitor sees that there is still something in the queue. By the time the END_QUEUE is &#8220;summoned&#8221; and gone, the entity creation should have happened for the previous item in the queue.</p>
<p>It was a stupid abuse of the system that I should have handled better the first time, but I didn&#8217;t think much of it. I needed to get things done, so I did the quick solution and promptly forgot about it.</p>
<p>Since I didn&#8217;t document what &#8220;END_QUEUE&#8221; was supposed to do when I came up with it, I spent part of my day trying to figure it out. </p>
<p>So there you go. Document your decisions, no matter how small. In fact, maybe the small decisions are even more important to document than the bigger ones.</p>
<p><a href="http://gbgames.com/blog/2011/11/why-it-is-important-to-document-even-the-smallest-decisions/">Why It Is Important to Document Even the Smallest Decisions</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2011/11/why-it-is-important-to-document-even-the-smallest-decisions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do You Have $9 to Kickstart Bhaloidam?</title>
		<link>http://gbgames.com/blog/2011/10/do-you-have-9-to-kickstart-bhaloidam/</link>
		<comments>http://gbgames.com/blog/2011/10/do-you-have-9-to-kickstart-bhaloidam/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 10:30:49 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Geek / Technical]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1750</guid>
		<description><![CDATA[<p>Corvus Elrod of Semionaut&#8217;s Notebook fame is doing something big: he&#8217;s pursuing his dream. </p> <p>Corvus has done more involving story and play than anyone else I know. He has a wealth of knowledge about games, story, play, and community. He&#8217;s worked for decades exploring various aspects of &#8220;participatory storytelling,&#8221; and he talks about the <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2011/10/do-you-have-9-to-kickstart-bhaloidam/">Do You Have $9 to Kickstart Bhaloidam?</a></span><p><a href="http://gbgames.com/blog/2011/10/do-you-have-9-to-kickstart-bhaloidam/">Do You Have $9 to Kickstart Bhaloidam?</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Corvus Elrod of <a href="http://corvus.zakelro.com/">Semionaut&#8217;s Notebook</a> fame is doing something big: he&#8217;s pursuing his dream. </p>
<p>Corvus has done more involving story and play than anyone else I know. He has a wealth of knowledge about games, story, play, and community. He&#8217;s worked for decades exploring various aspects of &#8220;participatory storytelling,&#8221; and he talks about the meaning of game mechanics in his Notebook, among other topics. On his old blog, he hosted the Bloggers of the Round Table, which always had fascinating, thoughtful posts on all sorts of topics related to games. Every time I interact with him, I feel privileged because I always come away with a new idea or thought. </p>
<p>So it is with pleasure that I ask you to <a href="http://www.kickstarter.com/projects/corvuse/bhaloidam-an-indie-tabletop-storytelling-game">pledge to fund his current project, Bhaloidam</a>. </p>
<p>What is Bhaloidam? It&#8217;s an open and accessible storytelling platform, but Corvus can explain it better than I can in this short video:</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/tNQ_fdQakEo" frameborder="0" allowfullscreen></iframe></p>
<p>I could say it is like a powerful yet intuitive Dungeons and Dragons, but it is much more than a role-playing game system, and I would be doing Corvus a disservice. </p>
<blockquote><p>Bhaloidam is the expression of my belief in the power of story and play and my belief in the importance of our communities.</p></blockquote>
<p>If you want to see Bhaloidam in action and get a feel for it yourself, you can <a href="http://bhaloidam.com/2011/10/17/online-gameplay-demos/">schedule an online game play demo</a>. </p>
<p>The <a href="http://www.kickstarter.com/projects/corvuse/bhaloidam-an-indie-tabletop-storytelling-game">Kickstarter project</a> is, at the time of this writing, 60% funded, but there&#8217;s only a week left to get the remaining 40%. Do you have $9 to pledge? </p>
<blockquote><p>
Bhaloidam is the culmination of all my creative, philosophical, spiritual, and intellectual, personal, and professional pursuits. It allows me to be an actor, a cartoonist, a computer animator, a writer, a director, a web designer, a storyteller, and while it doesn’t allow me to be an architect, the application of mathematics to creative expression scratches what I imagine is much the same itch.</p>
<p>&#8230;</p>
<p>So, Bhaloidam (both as a storytelling platform and a philosophy) is it for me. I am Bhaloidam. Along the way I’m sure to design more games (In fact, I’ve three in the works), but it’s Bhaloidam that lies at the heart of my career. It’s Bhaloidam that reflects not only who I am, but who I have been and who I want to be.</p></blockquote>
<p>You can read more at the <a href="http://bhaloidam.com/news/">official Bhaloidam site</a>. With a <a href="http://www.kickstarter.com/projects/corvuse/bhaloidam-an-indie-tabletop-storytelling-game">$9 pledge</a>, you can help make Bhaloidam happen, and you&#8217;ll get an electronic copy of the 72-page, full-color, comic-format Bhaloidam handbook. For $9 more, you&#8217;ll get a printed copy.</p>
<p>There are also many other options available at different perk levels. For $45, for example, you&#8217;ll get the &#8220;skein pack&#8221;, which includes 1 printed copy of the Bhaloidam handbook, 4 Lifewheels, set of 360 tokens, 4 timing track pawns, and a set of 3 custom dice. You can also choose to give it to a friend as a gift.</p>
<p>So I&#8217;d like to ask you to do two things:</p>
<ol>
<li> <a href="http://www.kickstarter.com/projects/corvuse/bhaloidam-an-indie-tabletop-storytelling-game">Pledge at least $9 to fund Bhaloidam</a>. There are 12 different perk levels, from the basic ebook to the $900 &#8220;Storyteller Special.&#8221; </li>
<li> Tell at least one other person about Bhaloidam. Send them to the <a href="http://bhaloidam.com/news/">Bhaloidam site</a>, tell them about the <a href="http://www.kickstarter.com/projects/corvuse/bhaloidam-an-indie-tabletop-storytelling-game">Bhaloidam Kickstarter project</a>, and invite them to the <a href="http://bhaloidam.com/2011/10/17/online-gameplay-demos/">online game play demos</a> Corvus is hosting. </li>
</ol>
<p>Let&#8217;s get Bhaloidam completely funded!</p>
<p><a href="http://gbgames.com/blog/2011/10/do-you-have-9-to-kickstart-bhaloidam/">Do You Have $9 to Kickstart Bhaloidam?</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2011/10/do-you-have-9-to-kickstart-bhaloidam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop That Hero! Development Summary</title>
		<link>http://gbgames.com/blog/2011/09/stop-that-hero-development-summary/</link>
		<comments>http://gbgames.com/blog/2011/09/stop-that-hero-development-summary/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 10:30:56 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Geek / Technical]]></category>
		<category><![CDATA[Linux Game Development]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1737</guid>
		<description><![CDATA[<p>The last time I wrote about Stop That Hero! development was in July. Here&#8217;s a quick summary of the work I&#8217;ve done since then:</p> <p>Fixed memory bugs</p> <p>I fixed a number of issues in July, specifically with weird corruption issues that seemed to result from the use of std::vector&#60;bool&#62; which is apparently not a real <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2011/09/stop-that-hero-development-summary/">Stop That Hero! Development Summary</a></span><p><a href="http://gbgames.com/blog/2011/09/stop-that-hero-development-summary/">Stop That Hero! Development Summary</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The last time I wrote about <a href="http://www.StopThatHero.com/">Stop That Hero!</a> development was in July. Here&#8217;s a quick summary of the work I&#8217;ve done since then:</p>
<p><strong>Fixed memory bugs</strong></p>
<p>I fixed a number of issues in July, specifically with weird corruption issues that seemed to result from the use of std::vector&lt;bool&gt; which is apparently not a real vector of boolean values. I was easily able to discover where memory leaks were occurring with Valgrind.</p>
<p>Recently, I ran into a bizarre unit test failure when adding code to a module that had nothing to do with the unit test, and I discovered that I had introduced a bunch of memory leaks that were finally manifesting in such issues. It wasn&#8217;t hard to fix since I once again was able to use Valgrind, but it was tedious work. A lot of it was fixing dumb mistakes, too. I have no idea why I thought I could get away with the code I wrote when I wrote it.</p>
<p>Unless there are corruption problems, memory bugs are not usually a big deal during development. Still, it would be nice if I used tools that made it easier to avoid the problems in the first place. I use UnitTest++, but these memory leak issues would have been caught had I used a tool such as CPPUTest which fails tests if memory leaks.</p>
<p><strong>Added more minions, entities, and projectiles</strong></p>
<p>Once I made combat revolve around projectiles, I added fireball-launching dragons and warlocks. Warlocks will eventually have a magic spell they cast, but they launch fireballs because that was the only projectile I had at the time. </p>
<p>Recently, I added new heroes. Archers shoot arrows, and wizards cast lightning bolts. I eventually want to add villagers and knights and get rid of the generic Hero character.</p>
<p><a href="http://www.flickr.com/photos/29086141@N03/6186306849/" title="More Heroes Added by gbgames, on Flickr"><img src="http://farm7.static.flickr.com/6180/6186306849_1be60e5a25_m.jpg" width="240" height="180" alt="More Heroes Added"/></a></p>
<p><strong>Optimized rendering</strong></p>
<p>I&#8217;ve had the same update/rendering code for a long time, and on a whim, I added some logging to my game to find out why I wasn&#8217;t able to get 60 FPS even though I didn&#8217;t think I was doing much. </p>
<p>It turned out, I wasn&#8217;t doing much. All of my code ran within a millisecond, but the actual SDL call that blits to the window took between 30-50 ms to run!  The good news is that my own code isn&#8217;t slowing me down, but mathematically it&#8217;s impossible that SDL MUST render this slow since so many other SDL games run much faster. So I looked to find out what other people did to make it work.</p>
<p>Here&#8217;s the code I was using to set the video mode:<br />
<code>m_screen = sdlInstance->SDL_SetVideoMode(m_x, m_y, m_bitDepth, SDL_DOUBLEBUF);</code></p>
<p>And here&#8217;s a much faster version based on a thead at <a href="http://www.ubuntuforums.org/">Ubuntu Forums</a> that I apparently did not bookmark:<br />
<code>m_screen = sdlInstance->SDL_SetVideoMode(m_x, m_y, m_bitDepth, SDL_SWSURFACE | SDL_ASYNCBLIT | SDL_DOUBLEBUF | SDL_ANYFORMAT | SDL_SRCALPHA);</code></p>
<p>So I went from 30-50 ms to 8 ms. The game runs so much more smoothly now, and it didn&#8217;t take a lot of work at all.</p>
<p><strong>Switched away from pie menu</strong></p>
<p>Pie menus are great for usability, but only if you can guarantee that the menu can be displayed in its entirety around the mouse cursor. Since one goal with &#8220;Stop That Hero!&#8221; was to make the interface as simple as possible, I didn&#8217;t want a scrolling world. The entire world fits on the screen at once. To use pie menus, I&#8217;d have to reduce the world size to provide a border all so that buttons could fit on the screen if a tower was selected near the edges. </p>
<p>So I removed the pie menu and went back to a traditional UI at the top of the screen. </p>
<p><strong>Added resources and minion costs</strong></p>
<p>Before, I was adding minions to the game whenever I wanted. Now there are resource costs, and it takes time to summon a minion from a tower. The player starts with a base set of resources, and the current system adds 1 resource every second. It&#8217;s simple, and it works. I can experiment with resource mechanics, such as adding rewards for killing heroes or if certain minions collect items and bring them back to the player&#8217;s castle, but the basic system is in place. </p>
<p><strong>Made object creation more generic/data driven</strong></p>
<p>I initially tried to make the game as quickly as possible, so instead of trying to genericize object creation, I created a bunch of separate commands: CreateHeroCommand, CreateDragonCommand, CreateOrcCommand, etc.</p>
<p>While it worked, it was also very limiting. Each time I added a new type of entity or in-game object, I had to create a new command. Maybe that&#8217;s fine if I know what entities and objects I want to create up front, but it limits the design. Maybe I want to make weak squires, regular soldiers, and strong knights as variations on each other. The effort to write the code for the separate creation commands would be tedious and slow. </p>
<p>So I replaced all of those CreateXYZCommands with CreateObjectFromTemplate. Instead of having coded commands to create an orc, I create a template called Orc, which defines components and data that an orc would have. CreateObjectFromTemplate(&#8220;Orc&#8221;) then creates the components with the correct data, and an orc appears in the game world. </p>
<p>Templates can be created and changed much more easily than hardcoded commands, which means adding and tweaking minions, heroes, and other in-game objects is easier, which means game design and balancing is easier. It also allows me to data-drive the game a lot more, which means more interesting entities and game situations. </p>
<p><strong>Added timer-based summoning queues</strong></p>
<p>Both heroes and minions take time to appear. Minions are summoned and there is a summoning bar that lets you know how finished the current summon is. By using the same summoning queue code, I now have a Village which pops out heroes over time. </p>
<p>Timers seemed like a special case of general triggers. It would be nice to have dwarves pop out of caves if any entities come near or have other similar scripting in the game, but my initial attempt at general triggers might have been trying to do too much. Maybe for another game. </p>
<p><strong>What&#8217;s Next?</strong></p>
<p>The game is still silent, so eventually I would like to add some sound effects and music. Animations and special effects would really punch up the visuals, which need a consistent art direction. It&#8217;s all functional programmer art and will get replaced. </p>
<p>But the biggest thing left to do is improve the AI. Dragons can attack from distance, yet they still try to run up to the heroes the way melee fighters do. Also, entities tend to bunch up. 10 orcs attacking a hero tend to look like a single orc attacking the hero, and it is hard to see what&#8217;s happening. </p>
<p>My initial attempt at solving these problems resulted in unacceptable slowness last week, but I&#8217;ve identified what&#8217;s going on and think I have a fix for it. </p>
<p>But hey, this is AI work. I already know I can&#8217;t expect that I&#8217;ll figure it out in a matter of hours or days. There&#8217;s going to be a lot of changes, tweaks, and fixes until it looks right. </p>
<p>And besides game development work, there&#8217;s the work of marketing and selling the game. There&#8217;s a <a href="http://www.facebook.com/StopThatHero">&#8220;Stop That Hero!&#8221; Facebook page</a>, and I just sent out a newsletter to my list announcing the upcoming release. I&#8217;m hoping to get a pre-alpha release out soon.</p>
<p><a href="http://gbgames.com/blog/2011/09/stop-that-hero-development-summary/">Stop That Hero! Development Summary</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2011/09/stop-that-hero-development-summary/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>See Stop That Hero! in Chicago</title>
		<link>http://gbgames.com/blog/2011/08/see-stop-that-hero-in-chicago/</link>
		<comments>http://gbgames.com/blog/2011/08/see-stop-that-hero-in-chicago/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 18:00:20 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Geek / Technical]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1726</guid>
		<description><![CDATA[<p>Indie City Games is hosting the Open House Indie Games Expo in Chicago this Saturday.</p> <p>Members of the general games-playing public are invited to show up, meet local indie developers, and play the games they’ve been hard at work creating. It’s fun, it’s free, and absolutely everyone is invited!</p> <p>I&#8217;ll be demoing Stop That Hero! <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2011/08/see-stop-that-hero-in-chicago/">See Stop That Hero! in Chicago</a></span><p><a href="http://gbgames.com/blog/2011/08/see-stop-that-hero-in-chicago/">See Stop That Hero! in Chicago</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Indie City Games is hosting the <a href="http://indiecitygames.com/2011/08/open-house-games-expo-august-20th/">Open House Indie Games Expo</a> in Chicago this Saturday.</p>
<blockquote><p>Members of the general games-playing public are invited to show up, meet local indie developers, and play the games they’ve been hard at work creating. It’s fun, it’s free, and absolutely everyone is invited!</p></blockquote>
<p>I&#8217;ll be demoing <a href="http://www.stopthathero.com/">Stop That Hero!</a> for the first time in public. </p>
<p><strong>When? </strong> 1PM – 4PM, Saturday August 20th, 2011<br />
<strong>Where?</strong> 243 S. Wabash Ave Room 924</p>
<p><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=243+S.+Wabash+Ave+chicago+il&amp;aq=&amp;sll=37.0625,-95.677068&amp;sspn=59.769082,135.263672&amp;vpsrc=0&amp;ie=UTF8&amp;hq=&amp;hnear=243+S+Wabash+Ave,+Chicago,+Illinois+60604&amp;z=14&amp;ll=41.878349,-87.625644&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=243+S.+Wabash+Ave+chicago+il&amp;aq=&amp;sll=37.0625,-95.677068&amp;sspn=59.769082,135.263672&amp;vpsrc=0&amp;ie=UTF8&amp;hq=&amp;hnear=243+S+Wabash+Ave,+Chicago,+Illinois+60604&amp;z=14&amp;ll=41.878349,-87.625644" style="color:#0000FF;text-align:left">View Larger Map</a></small></p>
<p>Do you plan on attending? </p>
<p><a href="http://gbgames.com/blog/2011/08/see-stop-that-hero-in-chicago/">See Stop That Hero! in Chicago</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2011/08/see-stop-that-hero-in-chicago/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Meaningful Game Play Game Jam</title>
		<link>http://gbgames.com/blog/2011/08/meaningful-game-play-game-jam/</link>
		<comments>http://gbgames.com/blog/2011/08/meaningful-game-play-game-jam/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 16:00:27 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Geek / Technical]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1722</guid>
		<description><![CDATA[<p>Josh Larson of God At Play wrote about meaningful game play. Josh&#8217;s definition:</p> <p>Meaningful game: a game that has significance or provides purpose for how one lives life.</p> <p>He specifically argues that there seems to be a lack of games with deeper meaning, and that there are not enough of them to satisfy the people <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2011/08/meaningful-game-play-game-jam/">Meaningful Game Play Game Jam</a></span><p><a href="http://gbgames.com/blog/2011/08/meaningful-game-play-game-jam/">Meaningful Game Play Game Jam</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Josh Larson of God At Play wrote about <a href="http://www.godatplay.com/2011/07/a-meaningful-gameplay-game-jam/">meaningful game play</a>. Josh&#8217;s definition:</p>
<blockquote><p>Meaningful game: a game that has significance or provides purpose for how one lives life.</p></blockquote>
<p>He specifically argues that there seems to be a lack of games with deeper meaning, and that there are not enough of them to satisfy the people who want to play deeper, more meaningful games. He identified the difficulty a game designer has when setting out to make a meaningful game. Where does one begin? Have there been attempts before? It&#8217;s hard to know what works and what doesn&#8217;t without actually doing it yourself because body of work available to build on is scarce.</p>
<p>His suggestion is that there should be game jams dedicated to Meaningful Game Play, where such experiments can be prototyped and critically analyzed. The goal would be to create a resource for game designers who wish to develop deeper, more meaningful games. </p>
<p>The first Meaningful Game Play Game Jam starts today at the BitMethod offices in Des Moines, IA. Details can be found at the newly launched <a href="http://www.meaningfulgameplay.com/2011/08/meaningful-gameplay-game-jam-1/">Meaningful Gameplay website</a>. </p>
<p>I&#8217;ll be there. Do you plan on attending? Do you want to participate in a Meaningful Game Play Game Jam? </p>
<p><a href="http://gbgames.com/blog/2011/08/meaningful-game-play-game-jam/">Meaningful Game Play Game Jam</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2011/08/meaningful-game-play-game-jam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Summary of Recent Stop That Hero! Developments</title>
		<link>http://gbgames.com/blog/2011/07/a-summary-of-recent-stop-that-hero-developments/</link>
		<comments>http://gbgames.com/blog/2011/07/a-summary-of-recent-stop-that-hero-developments/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 10:30:48 +0000</pubDate>
		<dc:creator>GBGames</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Geek / Technical]]></category>

		<guid isPermaLink="false">http://gbgames.com/blog/?p=1682</guid>
		<description><![CDATA[<p>It&#8217;s been a long time since I blogged about anything, and any &#8220;Stop That Hero!&#8221; posts were sparse, so let me update you on what I&#8217;ve been doing over the last couple of months. </p> <p>When I made the original Ludum Dare #18 entry, I had just finished reading through two AI books: AI for <span style="color:#777"> . . . &#8594; Read More: <a href="http://gbgames.com/blog/2011/07/a-summary-of-recent-stop-that-hero-developments/">A Summary of Recent Stop That Hero! Developments</a></span><p><a href="http://gbgames.com/blog/2011/07/a-summary-of-recent-stop-that-hero-developments/">A Summary of Recent Stop That Hero! Developments</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I blogged about anything, and any &#8220;Stop That Hero!&#8221; posts were sparse, so let me update you on what I&#8217;ve been doing over the last couple of months. </p>
<p>When I made the original Ludum Dare #18 entry, I had just finished reading through two AI books: <a href="http://www.amazon.com/gp/product/0596005555/ref=as_li_tf_tl?ie=UTF8&#038;tag=gb0f-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399381&#038;creativeASIN=0596005555">AI for Game Developers</a><img src="http://www.assoc-amazon.com/e/ir?t=gb0f-20&#038;l=as2&#038;o=1&#038;a=0596005555&#038;camp=217145&#038;creative=399381" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> and <a href="http://www.amazon.com/gp/product/0123747317/ref=as_li_tf_tl?ie=UTF8&#038;tag=gb0f-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399381&#038;creativeASIN=0123747317">Artificial Intelligence for Games, Second Edition</a><img src="http://www.assoc-amazon.com/e/ir?t=gb0f-20&#038;l=as2&#038;o=1&#038;a=0123747317&#038;camp=217145&#038;creative=399381" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />. My LD version of &#8220;Stop That Hero!&#8221; was the proving ground for what I learned. Three days of &#8220;why won&#8217;t this work?!&#8221; frustration concluded with everything coming together, and I was proud of it.</p>
<p>As I worked on the full version of the game, I found that one of the struggles I&#8217;ve had with <i>STH!</i> is with regards to software architecture. The entity AI was especially unintuitive to work with because I had written a bunch of disparate systems that weren&#8217;t aware of each other but depended on all of them working together.  </p>
<p>The Movement system assumed that the MovementComponent had its direction set correctly and moved the entity&#8217;s position according to its speed. The Targeting system would find the nearest targetable object. And the Pathfinding system would find a path to that targetable object. Now, they sound like they work together fine, and for those three responsibilies (movement, targeting, and pathfinding), they were great. </p>
<p>But path following was the responsibility of the pathfinding system, which updated an entity&#8217;s MovementComponent&#8217;s direction based on where the next node in the path was. Targeting was a bit weird, too. For example, the Hero targets treasure chests, castles, and towers. In the above system, the Hero would go towards the nearest targetable object, which means he&#8217;d pick up health even if he didn&#8217;t need it simply because he was closer to it than anything else, and I had no way to change it easily.</p>
<p>Part of the problem is my inexperience with creating AI systems. Another part is my inexperience with component-based systems. And a third part was my inexperience with software architecture in general.</p>
<p>Months ago, someone suggested I read <a href="http://www.amazon.com/gp/product/1556220782/ref=as_li_qf_sp_asin_tl?ie=UTF8&#038;tag=gb0f-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399381&#038;creativeASIN=1556220782">Programming Game AI by Example</a><img src="http://www.assoc-amazon.com/e/ir?t=gb0f-20&#038;l=as2&#038;o=1&#038;a=1556220782&#038;camp=217145&#038;creative=399381" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> by Mat Buckland.  What this book had over the other two books I mentioned was actual working code and examples to read through. If you&#8217;re new to game AI, I would highly recommend Buckland&#8217;s book. </p>
<p>After reading through it and the source code, I rearchitected the AI of my game. Now instead of having disparate systems that somehow work together, making tweaks and changes unintuitive and hard, I have goal-driven agents.  Entities have a Brain component, and different Brains have different kinds of goal evaluations. A sword-wielding hero, for example, might decide between conquering the nearest tower, going for the nearest health, or fighting the target enemy, and those decisions will depend on the health of the hero, the distance to a tower, and how strong the enemy is. A slime might be a simpleton and will merely try to reach its target enemy. A warlock might try to keep some distance from his enemy while staying within range to fire magic bolts or do whatever else warlocks do.  And so on.</p>
<p>As you can see, changing the AI of an entity is much easier and intuitive with Buckland&#8217;s goal-driven agents. I understand that it is not the state-of-the-art in game AI, but it is way better than what I had, it is good enough for this project, and it wasn&#8217;t that hard to implement. The hard part is writing the code for the different goals and goal evaluators, which is more tedious than difficult.</p>
<p>As for other updates, I added the concept of teams to make conquering and fighting easier to manage. I was very unhappy with how the Targeting component was being abused in figuring out if a hero was at a tower or if enemies were within range of each other. I had envisioned levels where the player isn&#8217;t fighting against heroes but other villains. Slimes should be able to target slimes from another team, but before I added a Team component, there was no way to know. </p>
<p>In May, I added combat mechanics and death. Granted, I already showed a <a href="http://gbgames.com/blog/2011/06/stop-that-hero-dev-video-slimes-throw-chests/">video of combat mechanics in action</a>, but still. Weapons are implemented as projectiles for simplicity. If I want melee attacks, I&#8217;ll just set the range to be a short distance.  </p>
<p>And since I was having trouble telling if the attacks were doing anything unless the target died, I added little health bars to provide feedback. When an entity&#8217;s health drops to 0, it dies. As in the original prototype, the hero has 3 lives (after all, all video game heroes have 3 lives), but I&#8217;m rethinking that idea based on a lot of other ideas I have for the game. </p>
<p>Originally, I was thinking about having melee attacks only, but when I added slime trails, projectiles made sense, and at that point, I realized that melee attacks can be implemented as projectiles. Yay, simplicity!</p>
<p>Also, yay, feature creep? Every feature that gets added means more time is needed to make the game. Isn&#8217;t it a bit late to make such a fundamental change to the game? The project is already way, way behind the original schedule. Why make it harder to ship?</p>
<p>Here&#8217;s my take: I&#8217;m less interested in shipping as fast as I can and more interested in shipping a fun, compelling game. By adding projectiles and slime trails, I&#8217;ve made the game noticeably more interesting.  </p>
<p>Frankly, the game needed more interesting things to do. Since starting the project in October, it is only recently that I&#8217;ve done so much work specifically on experimenting with the game design as opposed to putting in scaffolding. Yes, I&#8217;ll be the first to admit that I took way too long to get to this point, but I woefully underestimated the technical requirements and did not have a full understanding of the scope of the project when I started.</p>
<p>All that said, in preparation for the launch of the game, I created a website for it. Go to <a href="http://www.stopthathero.com/">StopThatHero.com</a>, subscribe to the free email newsletter, and Like the <a href="http://www.facebook.com/StopThatHero">Stop That Hero! Facebook page</a>. </p>
<p>The website is not polished yet, but then again, neither is the game. There is a development blog where I will talk about STH!-specific work, and I&#8217;ll use the main blog here to talk about my business or anything else as before. </p>
<p>And now, I&#8217;ll disappear into my work again. There&#8217;s more that I haven&#8217;t mentioned above, but I will say that I&#8217;ve been redoing a bit of the front-end work in my attempt to separate the GUI from the actual game logic. While it might sound like I&#8217;m trying to do things &#8220;right&#8221; instead of &#8220;good enough for game dev&#8221;, I found that the separation is already making it much easier to move forward. Like I said, I&#8217;ve been weak in software architecture. I think other game developers assume I know more about how to hack something out that works well enough, but the truth is, the more I try to slap something together in the interest of going fast, the more I end up painting myself into corners. So I&#8217;ve been reading up on GUI architectures and reading through code to see how others handle it, and it&#8217;s been eye-opening. </p>
<p><a href="http://gbgames.com/blog/2011/07/a-summary-of-recent-stop-that-hero-developments/">A Summary of Recent Stop That Hero! Developments</a> is a post from: <a href="http://gbgames.com/blog">GBGames - Thoughts on Indie Game Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gbgames.com/blog/2011/07/a-summary-of-recent-stop-that-hero-developments/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

