<?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>Kory Heath Designs &#187; Game Design</title>
	<atom:link href="http://www.koryheath.com/category/game-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.koryheath.com</link>
	<description>Game Design, The Universe, and Everything</description>
	<lastBuildDate>Sat, 02 Jul 2011 18:32:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Katamari vs. Peggle</title>
		<link>http://www.koryheath.com/2009/12/09/katamari-vs-peggle/</link>
		<comments>http://www.koryheath.com/2009/12/09/katamari-vs-peggle/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 11:26:35 +0000</pubDate>
		<dc:creator>Kory Heath</dc:creator>
				<category><![CDATA[Game Design]]></category>

		<guid isPermaLink="false">http://www.koryheath.com/?p=483</guid>
		<description><![CDATA[Katamari Damacy is a game built around a brilliant core concept, but its overarching goal structure nearly ruins the experience for me. Here&#8217;s the brilliant part: you push around a growing ball which can grab literally any object in the game world if it grows large enough. Here&#8217;s the annoying part: in each of the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-507" title="KatamariPeggle" src="http://www.koryheath.com/wp-content/uploads/2009/12/KatamariPeggle.png" alt="KatamariPeggle" width="250" height="100" />Katamari Damacy is a game built around a brilliant core concept, but its overarching goal structure nearly ruins the experience for me. Here&#8217;s the brilliant part: you push around a growing ball which can grab literally any object in the game world if it grows large enough. Here&#8217;s the annoying part: in each of the main &#8220;Make a Star&#8221; levels of the game, if you don&#8217;t grow your Katamari big enough within a given amount of time, you have to start the level over again from the beginning.</p>
<p>It&#8217;s easy to turn a fun, sandboxy pastime into a game by adding a time-pressure to it, but that&#8217;s almost always the least interesting way to do it, and it usually has negative side-effects. For instance, Katamari&#8217;s final level is 25 minutes long, and most players will need to play through it multiple times in order to win. At the end of my first 25-minute attempt, my Katamari wasn&#8217;t even close to the goal of 300 meters. That was okay—at least I&#8217;d gotten the lay of the land, and had a better idea of what I needed to do. When the timer ran out at the end of my second attempt, my Katamari was 298 meters large, and rolling at high speed toward a juicy island full of skyscrapers. Oof. Now all I have to do is spend another 25 minutes doing the exact same thing I just did for the last 25 minutes, but a tiny bit faster. This is not good game design.</p>
<p>There&#8217;s a more emergent negative consequence of this goal-structure: if you get off to a bad start in a level, you can know before you&#8217;re even halfway through that you can&#8217;t succeed. In such a case, playing out the rest of the level feels like a waste of time. This is analogous to playing through the last painful stretch of Monopoly when it&#8217;s obvious that you&#8217;re going to lose. Since Katamari Damacy is a single-player game, I can at least quit and restart without annoying a bunch of other players. But if I&#8217;m doing this on almost every level, there&#8217;s something wrong with the game design.</p>
<p>The designers of Peggle were faced with a similar design challenge. In Peggle, you&#8217;ve got a pachinko-machine screen full of pegs, and you&#8217;ve got ten shots to try to hit all of the orange ones. On the surface, this feels nothing like Katamari Damacy, but in fact, the two games bear a deep structural similarity. In Katamari Damacy, you&#8217;re trying to collect a given amount of stuff in a given amount of time, and in Peggle, you&#8217;re trying to hit a given number of pegs with a given number of shots. The games share a pair of design problems: how do we make it fun to replay levels after failing, and how do we keep players from sometimes feeling hopeless halfway through a level? Peggle&#8217;s designers actually managed to solve these problems.</p>
<p><span id="more-483"></span>They solved the first problem by randomly distributing the orange, blue, and green pegs at the beginning of each level. The physical layout of the pegs is the same each time—that&#8217;s what defines the level—but the distribution of peg-colors within that layout is different each time you play it. You never really play the same level twice, because each replay presents you with a unique situation that you&#8217;ve never seen before. Studying the initial layout of a Peggle level is fun in the same way that studying the initial layout of a Settlers of Catan island is fun.</p>
<p>And then there&#8217;s the Free Ball Bucket—a steely well that sweeps back and forth across the bottom of every level. The first time I played Peggle, I wondered what it was. After a ball fell into it, I understood, and thought &#8220;I wonder why the designers did that?&#8221; A few turns later, I realized that it was a brilliant solution to a serious design problem, and is in fact the key to making the whole game work. No matter how badly you&#8217;re doing in a level—no matter how many shots you&#8217;ve wasted on poorly-aimed or ill-conceived plans—it&#8217;s always possible, in principle, that the Free Ball Bucket will save your ass and keep you going long enough to mop up the remaining stragglers. In fact, the more dire your situation, the more glorious your comeback will be if you manage to pull it off. That&#8217;s top-notch game design, and like all non-band-aidy design solutions, it doesn&#8217;t just solve the immediate problem at hand, but ends up adding strategic depth to the entire game.</p>
<p>There&#8217;s no easy way to apply Peggle&#8217;s design solutions to Katamari Damacy. I don&#8217;t think that randomizing the item layout at the beginning of each Katamari level would improve the game, and while it might be nice to have some way to increase your timer in the middle of a level, it&#8217;s still hard to think of a way to do this that&#8217;s always capable of providing hope and that improves the fundamental gameplay. I don&#8217;t have a good solution to offer for Katamari&#8217;s design problem, but my design experience tells me that there there must be a solution—in fact, multiple solutions—out there. The key is to insist on looking for them.</p>
<p>I don&#8217;t mean to argue that Peggle is an objectively better game than Katamari Damacy. Katamari Damacy is brilliant. I love the music, I love the art, I love the writing, and I love the gameplay. I just wish the designers had found some way of avoiding the &#8220;do it within X minutes&#8221; paradigm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.koryheath.com/2009/12/09/katamari-vs-peggle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Evocativism</title>
		<link>http://www.koryheath.com/2009/10/21/evocativism/</link>
		<comments>http://www.koryheath.com/2009/10/21/evocativism/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 05:48:27 +0000</pubDate>
		<dc:creator>Kory Heath</dc:creator>
				<category><![CDATA[Game Design]]></category>

		<guid isPermaLink="false">http://koryheath.wordpress.com/?p=43</guid>
		<description><![CDATA[My perspective on video games has changed a bit. I used to care primarily about interesting game mechanics, fascinating challenges, and compelling stories. I still care about those things, but nowadays I tend to think of them as means to an end rather than as ends in and of themselves. Nowadays, I care most about [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-480" title="FlowerScreenshot" src="http://www.koryheath.com/wp-content/uploads/2009/12/FlowerScreenshot.jpg" alt="FlowerScreenshot" width="345" height="194" />My perspective on video games has changed a bit. I used to care primarily about interesting game mechanics, fascinating challenges, and compelling stories. I still care about those things, but nowadays I tend to think of them as means to an end rather than as ends in and of themselves. Nowadays, I care most about the <em>feelings, moods, and emotions</em> that video games evoke, with a particular emphasis on wonder, awe, and mystery. I&#8217;ve invented a name for this perspective: I&#8217;m calling it <em>evocativism</em>.</p>
<p>I&#8217;ve appropriated the word &#8220;evocative&#8221; in the same way that <em>expressionism</em> appropriates the word &#8220;expressive&#8221;. All painting is expressive, so it seems presumptuous to label one particular style <em>expressionist</em>. Similarly, all video games—even <a href="http://www.tetris.com/">Tetris</a>—evoke emotions. However, games like <a href="http://en.wikipedia.org/wiki/Myst">Myst</a>, <a href="http://en.wikipedia.org/wiki/Another_World_%28video_game%29">Another World</a>, <a href="http://en.wikipedia.org/wiki/Silent_Hill_%28video_game%29">Silent Hill</a>, <a href="http://en.wikipedia.org/wiki/Ico">Ico</a>, <a href="http://en.wikipedia.org/wiki/Shadow_of_the_colossus">Shadow of the Colossus</a>, <a href="http://nifflas.ni2.se/index.php?page=1002Knytt">Knytt</a>, <a href="http://thatgamecompany.com/games/cloud/">Cloud</a>, <a href="http://thatgamecompany.com/games/flow/">flOw</a>, <a href="http://thatgamecompany.com/games/flower/">Flower</a>, <a href="http://en.wikipedia.org/wiki/Portal_%28video_game%29">Portal</a>, <a href="http://braid-game.com/">Braid</a>, and <a href="http://www.hemispheregames.com/osmos/">Osmos</a> seem to put a <em>primary</em> emphasis on evoking <em>certain kinds of</em> feelings, moods, and emotions, and that distinctive focus is what I&#8217;m referring to as &#8220;evocativist&#8221;.</p>
<p>One of these days, before I starve to death, I&#8217;d like to try my hand at designing and implementing one of these evocativist games. My approach would exhibit:</p>
<ul>
<li>An emphasis on exploration and discovery.</li>
<li>An emphasis on evoking a sense of wonder, awe, and mystery.</li>
<li>An emphasis on natural environments and natural ambient sound effects.</li>
<li>An emphasis on minimalism and non-verbalism.</li>
<li>An emphasis on &#8220;artificial life&#8221; over &#8220;artificial intelligence&#8221;.</li>
<li>A de-emphasis on pre-designed narrative.</li>
<li>A de-emphasis on violence.</li>
<li>A de-emphasis on frustration.</li>
<li>An emphasis on procedurally generated content.</li>
</ul>
<p>None of these characteristics is <em>essential</em> to my definition of &#8220;evocativist&#8221;. These just happen to be the characteristics I&#8217;m interested in focusing on. Each deserves multiple blog-posts, but here are a few introductory thoughts, just to get the ball rolling.</p>
<p><span id="more-43"></span><br />
<h3>Exploration and Discovery</h3>
<p>This is kind of a no-brainer. Computer games are better than any other artistic medium at creating experiences of exploration and discovery, and, arguably, they&#8217;re better at it than they are at creating most of the other kinds of experiences that games try to create. Although the most obvious type of exploration involves moving through a (virtual) physical space, you can also &#8220;explore&#8221; a game&#8217;s mechanics and their dynamic consequences. Portal involves the physical exploration of the <span id="main" style="visibility: visible;"><span id="search" style="visibility: visible;">Aperture</span></span> Science lab, but it also involves an exploration of how the portal guns work, and what you can do with them. Even ignoring the &#8220;story&#8221;, the character of GlaDOS, and the subtext of <em>escape</em>, exploring the dynamics of the portals can evoke a sense of wonder.</p>
<h3>Wonder, Awe, and Mystery</h3>
<p>There&#8217;s a prejudice that states that games are not good at evoking emotion in general. However, games about exploration and discovery almost always evoke a sense of wonder for me, at least to some degree. Games are <em>good at</em> evoking a sense of wonder. In addition, I think they&#8217;re good at evoking a sense of loneliness, isolation, and desolation. And recent games like Flower show that they can be great at evoking a sense of exuberance and joy.</p>
<p>Video games have traditionally been bad at evoking complex <em>social</em> emotions. Paintings and symphonies are also bad at this, so our medium is in good company. Many designers are interested in cracking this problem. Although I&#8217;m interested in seeing what others come up with, I&#8217;m not interested (at the moment) in working on the problem myself. I&#8217;m willing to let novels and movies deal with complex social emotions, since that&#8217;s what they&#8217;re good at. If a computer game can evoke anything like the emotion I feel when looking at the ocean, or a tide-pool full of sea anemones, or the Grand Canyon, or the night sky, that fully justifies it as an artistic medium. (See Flower and Osmos.)</p>
<h3>Nature</h3>
<p>Wikipedia says: &#8220;Characteristics of Impressionist paintings include visible brush strokes, open composition, emphasis on light in its changing qualities (often accentuating the effects of the passage of time), ordinary subject matter, the inclusion of movement as a crucial element of human perception and experience, and unusual visual angles.&#8221;</p>
<p>&#8220;Ordinary subject matter&#8221; is not a logically necessary item on this list. There&#8217;s no <em>technical</em> reason why Monet couldn&#8217;t have used &#8220;visible brush strokes&#8221;, &#8220;open composition&#8221;, and &#8220;emphasis on light in its changing qualities&#8221; to paint pictures of rotting corpses. But <em>practically</em> speaking, artists who are inclined to use those techniques are probably also going to be inclined to paint scenes of natural beauty. Similarly, game designers with evocativist leanings are probably going to be inclined to focus on beautiful natural environments (Shadow of the Colossus, Flower), or game mechanics that exhibit nature-like dynamics  (flOw, Osmos).</p>
<p>I don&#8217;t really need to elevate this into a matter of principle. I haven&#8217;t played Left 4 Dead, but it seems to exhibit some evocativist tendencies. The movie Blade Runner presents an evocative non-natural environment (although there the absence of nature is part of the point). I&#8217;m happy to chalk up my interest in natural beauty as a personal (and maybe even temporary) artistic preference.</p>
<h3>Minimalism and Non-Verbalism</h3>
<p>More artistic preference here. There&#8217;s no technical reason why an evocativist work couldn&#8217;t be wordy and baroque. But in practice, aside from completely text-based works of interactive fiction, virtually all of the evocative experiences I&#8217;ve had while playing video games have happened while the game was staying the hell out of my way and letting me wordlessly experience something. I enjoy silent protagonists, and many of my favorite games contain companions that either don&#8217;t speak the player&#8217;s language, or don&#8217;t speak at all. I hate explanations. I&#8217;m a big fan of silence in general—aurally, narratively, and expositionally. And when it comes to game mechanics, I&#8217;m fanatical about simplicity and elegance.</p>
<h3>Artificial Life</h3>
<p>This idea goes hand-in-hand with the previous one. I find it significantly easier to connect emotionally to characters in video games who mostly don&#8217;t speak but act in procedural and life-like ways, than to characters who do speak (whether or not they also act in life-like ways). Somehow, attempting to simulate dialog just shatters my suspension of disbelief. I think the technology just isn&#8217;t there yet. I view Yorda in Ico, and all of the beasts in Shadow of the Colossus (including the horse), as instances of artificial life rather than artificial intelligence, but maybe that&#8217;s a meaningless distinction in the game-development world.</p>
<h3>No Pre-Designed Narrative</h3>
<p>This is a tricky one. Years ago, when I loved text adventures and LucasArts games, I thought I loved story. Now I almost consider myself to be anti-story, although that doesn&#8217;t really capture the truth, either. I do know that in every one of the &#8220;evocativist games&#8221; I listed above (except probably Portal), I find the &#8220;plot&#8221; or &#8220;story&#8221; (if it exists) to be the weakest element of the game—at best irrelevant to my emotional experience, and at worst an eye-rolling distraction.</p>
<p>I do like the idea of creating a game environment in which events occur that players later spin into narratives. I don&#8217;t like the idea of drama-managers. I do like the idea of a game that provides a succession of relatively short (and probably procedurally generated) play experiences with beginning, middles, and ends, rather than one long slog through a pre-designed campaign. I like the idea of providing an overarching narrative <em>context</em> for such an experience, but I don&#8217;t like the idea of providing a (pre-designed) narrative spine along with lots and lots of (also pre-designed) side-quests.</p>
<p>I have a lot more thinking to do about this one.</p>
<h3>No Violence</h3>
<p>It&#8217;s hard to talk about this one without sounding self-righteous, so let me first say that I have no moral problems with violence in video games. Instead, I have two non-moral problems with it. First of all, it&#8217;s boring. It&#8217;s been done to death (no pun intended). The world doesn&#8217;t need yet another person (me) making yet another game about killing stuff. But secondly, and more importantly, killing stuff in video games evokes certain feelings. These feelings aren&#8217;t &#8220;wrong&#8221;. Maybe they&#8217;re even cathartic. But they&#8217;re also in conflict with the kinds of feelings that I want to evoke in my own hypothetical game (like joy, wonder, etc.), so they actively work against my primary purpose.</p>
<p>Once again, this isn&#8217;t a matter of principle. Shadow of the Colossus is one of my favorite games, and it&#8217;s pretty violent. The game evokes a sense of desolation, isolation, and despair in me, and that&#8217;s partially due to the game&#8217;s violent gameplay. I&#8217;m totally ok with that. But those aren&#8217;t the kinds of emotions I&#8217;m interested in evoking. If it turns out that the best way to evoke some particular emotion that I&#8217;m going for is to allow (or force) the player to kill something, I&#8217;ll do it. But I&#8217;m not interested in filling my world with things to shoot, stab, or head-stomp, just because I can&#8217;t think of anything else engaging for the players to do while they&#8217;re exploring.</p>
<h3>No Frustration</h3>
<p>The ubiquitous fail/redo paradigm is my least favorite aspect of video games. I can&#8217;t stand making two successful jumps, failing to make the third jump, and then redoing the first two jumps in order to try the third one again. I&#8217;ll admit, it&#8217;s hard to see how to avoid this in a game like Ico. The roguelikes represent a theoretically sound alternative, but permadeath is frustrating in a different way. My general take is to start with the Rogue model of playing in a procedurally generated world in which all player&#8217;s actions are irrevocable, but make it so that the gameplay doesn&#8217;t revolve around killing, and the player can never die (thus eliminating the frustration of permadeath). Of course, this leads to the central game-design challenge of coming up with something interesting for players to do in such a game.</p>
<h3>Procedurally Generated Content</h3>
<p>I&#8217;ve sort of talked about this one throughout, but to recap: I&#8217;d like to create games which procedurally generate worlds to explore and play in, and which provide relatively short (say, 1-2 hour) play experiences with beginning, middles, and ends, but which involve styles of gameplay which are different than those found in the typical Roguelike or side-scrolling platformer. It would require multiple blog posts to explain why I&#8217;m interested in this, but the short explanation is that I see a lot of potential for creating emotional and atmospheric experiences with proceedural &#8220;vignettes&#8221; rather than long, designed experiences.</p>
<p>Of course, that explanation hides a host of technological and conceptual difficulties. Not only is it very difficult to procedurally generate compelling game spaces, but the game-design challenge of coming up with compelling things for the player to do within these spaces may be even more difficult. Nevertheless, this is the territory I&#8217;m interested in exploring.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.koryheath.com/2009/10/21/evocativism/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Building Blockhouse</title>
		<link>http://www.koryheath.com/2009/09/15/building-blockhouse/</link>
		<comments>http://www.koryheath.com/2009/09/15/building-blockhouse/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 06:44:51 +0000</pubDate>
		<dc:creator>Kory Heath</dc:creator>
				<category><![CDATA[Blockhouse]]></category>
		<category><![CDATA[Game Design]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://koryheath.wordpress.com/?p=8</guid>
		<description><![CDATA[By the time I decided that I was going to implement Blockhouse as a commercial iPhone app, the game design was already done. Tilt or swipe in one of the four cardinal directions to cause all blocks to slide as far as they can, and try to put them on their respective targets. What could [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-66" title="BlockhouseLevels" src="http://www.koryheath.com/wp-content/uploads/2009/09/BlockhouseLevels.png" alt="BlockhouseLevels" width="150" height="318" />By the time I decided that I was going to implement <a href="http://www.koryheath.com/blockhouse">Blockhouse</a> as a commercial iPhone app, the game design was already done. Tilt or swipe in one of the four cardinal directions to cause all blocks to slide as far as they can, and try to put them on their respective targets. What could be easier? Many aspects of the aesthetic design and the user-interface were still up in the air, but I had an inkling of where I was headed: chicklet-style blocks and walls, bright candy colors, minimalist interface. Implementing this stuff wasn&#8217;t going to be particularly difficult.</p>
<p>I knew that the hard part was going to be actually designing 100 unique puzzles. The only way I could think of to do this was to create some kind of puzzle-building tool that would allow me evolve, tinker, and tweak these puzzles into shape. As it turns out, I spent about six weeks on this task before I even wrote a line of iPhone code. The result was a rather clunky but serviceable OS X app called BlockhouseBuilder.</p>
<p>This was the first time I&#8217;d ever implemented a Mac app. Indeed, I&#8217;d only been using a Mac since about May of 2008, which is when I&#8217;d jumped into iPhone development with both feet. I knew there was going to be a bit of a learning curve. My goal was to make a fully-functioning document-based app, which would allow me to edit puzzles in groups of 100, save them, cut and paste them, undo and redo all editing actions, etc.</p>
<p>None of that was easy, but nevertheless I managed to cobble together an editor that allowed me to create and edit the layout of walls and blocks within a puzzle. It also allowed me to choose the grid-size of each puzzle, and I wrangled for a while about what range of sizes I should allow. Eventually I decided on an aspect ratio of 3:4 for all puzzles. This fit the screen of the iPhone well, leaving some room at the top for UI buttons. It also allowed for a nice range of puzzle sizes: 3&#215;4, 6&#215;8, 9&#215;12, 12&#215;16, and so on.</p>
<p><span id="more-8"></span>The really hard part was coming up with some way of displaying the abstract structure of the puzzles I was creating. I wanted to actually see the &#8220;puzzle-graph&#8221;—a visual representation of every possible position that the blocks could get into, along with the connections between them.</p>
<p>This turned out to be a tough nut for me to crack. There are algorithms for displaying arbitrary graphs, but they aren&#8217;t simple, and they often result in winding connections and crossed lines. I wanted all of the orthogonal relationships between states to be retained—in other words, if you can get to one puzzle state by swiping to the right, I wanted that state to appear directly to the right in the puzzle graph. I suspected that someone had already solved this graphing problem—if not for tilt-mazes, then for something isomorphic to them—but I didn&#8217;t know enough about graph theory to know where to look, or even to know for sure that what I wanted to do was possible in all cases.</p>
<p>I tried a number of different methods—even some evolutionary ones—but none of them quite did the trick. After working on the problem full-time for almost a week, I started to panic. What if the solution was simply beyond me? I couldn&#8217;t afford to keep pouring 8-hour days into it, and yet I couldn&#8217;t see how to do what I needed to do without it.</p>
<p>Fortunately, an new idea occurred to me involving a mix of two different techniques I&#8217;d tried earlier. I tried arranging all the puzzle positions along horizontal and vertical &#8220;struts&#8221; or &#8220;dowels&#8221;, like the beads of an abacus. Each strut contained all the puzzle positions that were connected to each other horizontally or vertically. Each puzzle position was connected to exactly one horizontal strut and one vertical strut. This created a large connected mesh of all the puzzle positions. This mesh was often too compact, overlapping itself at many points, but I could fix that by iteratively pushing the struts away from each other until no two horizontal or vertical struts lay on the same line. The result was a fast algorithm that displayed a flattened, 2D representation of the entire layout of a puzzle, with all orthogonal connections intact. Success!</p>
<p>Here&#8217;s a screenshot of BlockhouseBuilder  in action, displaying puzzle #16 from the release version of Blockhouse.</p>
<p style="text-align: center;"><img class="size-full wp-image-72 aligncenter" title="BlockhouseBuilder" src="http://www.koryheath.com/wp-content/uploads/2009/09/BlockhouseBuilder.png" alt="BlockhouseBuilder" width="700" height="429" /></p>
<p>The lower left portion of the window displays tiny images of all 100 puzzles and allows me to move between them, change their order, or cut-and-paste entire puzzles from one slot to another. The upper left portion of the window displays a close up of the selected puzzle, which allows me to add and remove blocks and walls, and change their colors. The main window displays the graph of all possible positions that this puzzle can get into, including the starting position (outlined in blue), the ending position (outlined in yellow), and the shortest path between them (represented by the weird black arrows). I can select any starting and ending positions in the graph, and it will instantly show me the shortest path between those two positions. I also created some buttons that automatically find the ending position that&#8217;s <em>furthest away</em> from the current starting position (in number of moves), the starting position that&#8217;s furthest away from the current ending position, or the longest path between any two positions in the entire puzzle. This was helpful, because in general I wanted the starting and ending positions of a puzzle to be as many moves apart as possible. Finally, I created a button that allowed me to export the collection of 100 puzzles to a property-list file, which I could then include in the iPhone application bundle.</p>
<p>Once I solved the graphing problem and implemented the above functionality, I started adding other features that I knew I was going to need in order to design 100 interesting puzzles. First, I added a bunch of criteria that all puzzles had to meet in order to be exported. Most importantly, all puzzles had to be &#8220;connected&#8221;. In other words, for any given puzzle, it had to be possible to reach every puzzle state from every other puzzle state. I wanted every puzzle to remain solvable, no matter how you moved the blocks. I did include a reset button in the final game, but it&#8217;s always optional. Mostly, it&#8217;s there so that people can easily input the online solutions when they give up on a puzzle, but sometimes it&#8217;s just nice to get a fresh start on a puzzle when you&#8217;re stuck in a rut.</p>
<p>I also implemented some other criteria. For instance, I didn&#8217;t want the starting blocks to obscure any portion of their destination footprints. I planned on representing the block destinations using painted marks on the floor of each puzzle, and I wanted these marks to be visible at the beginning of each puzzle. There are plenty of perfectly good puzzles in which two blocks (for instance) swap positions, but I decided to disallow these. Beyond this, there are other criteria that are too obscure to even bother describing.</p>
<p>I didn&#8217;t know what percentage of puzzles would still be valid after pruning out all of the ones that didn&#8217;t meet my criteria. There was some risk that it would be very low, which would make it a lot harder to come up with interesting puzzles. Fortunately for me, this turned out not to be the case.</p>
<p>After about six weeks of working on BlockhouseBuilder, I was finally ready to actually start working on the iPhone app that would read the property-list file and let me play the puzzles I was creating. The bulk of that work took about a month, and then I spent another couple of weeks integrating the two, adding more features to BlockhouseBuilder as the iPhone app required them.</p>
<p>When it finally came time to start designing all 100 puzzles in earnest, I still felt pretty overwhelmed by the task, even with my fancy new tool at hand. Therefore, I added an &#8220;Evolve&#8221; button to BlockhouseBuilder. This button caused the program  to create thousands of variations of the layout of the current puzzle, looking for various criteria, like a particular ratio between the longest path and the total number of positions. With the click of a button I could have the program spit out a random variation of the current puzzle that was &#8220;better&#8221; in some way. Determining what counted as &#8220;better&#8221; was a black art, and I didn&#8217;t bother building a UI to tweak these values, because I had no idea what variables I should even be tweaking. Instead, I just kept changing the actual code for the &#8220;Evolve&#8221; button, recompiling BlockhouseBuilder, and playing around with the results. So I&#8217;d set up the basic situation—the size of the grid, the shapes of the blocks—and then I&#8217;d start hitting this button over and over again, cranking out a ton of evolved variations. Of course, on top of this I did a lot &#8220;artificial selection&#8221; (i.e. tossing out results that were unacceptable for various reasons), and manual high-level tweaking.</p>
<p>It was kludgey, but it worked. Exploring the puzzle-space in this way was fascinating, and because of the evolutionary nature of the process, I didn&#8217;t automatically know the solution to each new puzzle that I came up with. Not only did this allow me to play (and enjoy) hundreds of these puzzles myself, but it allowed me to directly test how difficult various puzzles were. It also allowed me to answer a few questions I&#8217;d been curious about for years. For instance, what&#8217;s a good ratio of path length to total number of puzzle positions? I found that it was somewhere between 1:2 and 1:3. In other words, if it takes 15 moves to solve a puzzle, I wanted there to be about 30 or 40 total positions in the puzzle. How hard do puzzles get as you increase the total number of positions? I found that 100 total positions is usually too hard. Most of the puzzles that I included in the final product have between 30 and 80 total positions. On the other hand, there isn&#8217;t a one-to-one correspondence between total number of positions and difficulty. I found some 40-position double-block puzzles that I was incapable of solving after multiple hours of trying.</p>
<p>As I explored the space, the puzzles I came up with fell into four distinct categories, each of which had its own flavor. The most basic type of puzzle contained only a single square block. These puzzles were only interesting on grid-sizes of 9&#215;12 or larger, and I decided that they should all be explicitly maze-like. As it turns out, my evolutionary process wasn&#8217;t very good at coming up with maze-like puzzles, so I had to do a lot of manual editing on these. Another type of puzzle contained only a single polyomino. These puzzles were also only interesting on grid-sizes of 9&#215;12 or larger, but unlike the puzzles in the previous category, these puzzles didn&#8217;t work well as mazes. Instead, they worked well in more open spaces peppered with single-square walls. Another type of puzzle consisted of two or more single-square blocks, each in its own walled-off compartment. These had a unique flavor, and were too difficult if larger than 6&#215;8. The fourth type of puzzle consisted of two polyominoes together in the same compartment. Most of these puzzles were way too difficult if larger than 6&#215;8, but they became easier if the blocks were large, because large blocks fill the space and cut down on the total number of positions possible. This was my favorite type of puzzle, and they make up about half of all the puzzles in the final product.</p>
<p>All in all, it was a fascinating project, and I hope some people get a kick out of <a href="http://www.koryheath.com/blockhouse">the result</a>. You can count on seeing Blockhouse 2 at some point. The puzzle-space is huge, and I&#8217;ve got BlockhouseBuilder burning a hole in my pocket&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.koryheath.com/2009/09/15/building-blockhouse/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

