<?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>Paradice Software</title>
	<atom:link href="http://www.paradicesoftware.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.paradicesoftware.com/blog</link>
	<description>Developing a role-playing game since 1981</description>
	<lastBuildDate>Sat, 07 Jan 2012 08:56:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Pathfinding</title>
		<link>http://www.paradicesoftware.com/blog/?p=249</link>
		<comments>http://www.paradicesoftware.com/blog/?p=249#comments</comments>
		<pubDate>Sun, 01 Jan 2012 08:54:02 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Icefall]]></category>
		<category><![CDATA[A*]]></category>
		<category><![CDATA[dijkstra]]></category>
		<category><![CDATA[pathfinding]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=249</guid>
		<description><![CDATA[Let&#8217;s take a look at pathfinding. Pathfinding is the process where the game can determine a suitable or optimal path from one point to another by traversing the game&#8217;s terrain. It&#8217;s a critical part of almost all games (RPGs, RTSs, turn-based strategy.. basically anything that has a variable terrain or map is going to need [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s take a look at pathfinding. Pathfinding is the process where the game can determine a suitable or optimal path from one point to another by traversing the game&#8217;s terrain. It&#8217;s a critical part of almost all games (RPGs, RTSs, turn-based strategy.. basically anything that has a variable terrain or map is going to need a way to determine paths across it)</p>
<p>Pathfinding is <strong>hard</strong> in the sense that it takes a lot of computing power to accomplish. And it doesn&#8217;t get easier with newer hardware either &#8211; as computers get faster, games generally incorporate more complex terrain and more inhabitants, so pathfinding stays complex. For example, the average RTS devotes 30% of CPU time to video (prepping stuff for the GPU, plus UI etc), 30% on AI &amp; scripts, and 30% on pathfinding (the remaining 10% on everything else).</p>
<p>Icefall uses two different pathfinding algorithms to improve efficiency. Being turn-based, I don&#8217;t have to worry about time-critical calculations, so paths should always be optimal path (it&#8217;s acceptable for realtime games to take a &#8216;best guess&#8217; or suboptimal path &#8211; you can see this in games like Dragon Age or Diablo: if you click somewhere far away or obscured by obstacles, your character will try to walk there but they get stuck). Let&#8217;s talk about how Icefall&#8217;s pathfinding works specifically.</p>
<h3>A* Pathfinding Algorithm</h3>
<p><strong>A*</strong> (<a title="A* Algorithm" href="http://en.wikipedia.org/wiki/A*" target="_blank">Wikipedia entry</a>) is the method Icefall uses to calculate the player&#8217;s path. If you click on a distant doorway or shop, your character will move towards it using the fewest steps possible, regardless of how convoluted the actual path is.It works by starting at the player&#8217;s current location, and looking at all of the neighbouring squares (all the squares that the player could reach in a single move). For each of those squares, it looks at the *absolute* distance between this position and the goal position (that the player is trying to reach). The absolute distance is just &#8216;the distance in a straight line, assuming there were no obstacles&#8217;.</p>
<p>This (simplified) example shows a very simple dungeon with a start and goal square. The three initial candidate squares have been marked with red circles (this is called &#8216;the open list&#8217; of squares), and the number within represents the absolute distance between each square and the goal.</p>
<div id="attachment_255" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2012/01/Pathfinding1.png"><img class="size-medium wp-image-255" title="Pathfinding1" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2012/01/Pathfinding1-300x233.png" alt="" width="300" height="233" /></a><p class="wp-caption-text">Initial step of A* evaluation </p></div>
<p>The algorithm selects one of the squares from the open list that has the lowest absolute cost. So in this case, it could select either of the &#8220;6&#8243; squares. Let&#8217;s say it picks the bottom one (to try and go in a straight line). The process is then repeated, with all of the neighboring squares from our new square evaluated for their <em>absolute distance to goal</em> &#8211; but with a new step. We add to that distance the number of squares that we have already taken to get there (in this case, 1, since we&#8217;ve only moved once so far). Note that we also briefly consider the start square, and the other two red circles, but we discard them because they&#8217;re already in our &#8216;open&#8217; list.</p>
<div id="attachment_260" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2012/01/Pathfinding2.png"><img class="size-medium wp-image-260" title="Pathfinding2" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2012/01/Pathfinding2-300x233.png" alt="" width="300" height="233" /></a><p class="wp-caption-text">After evaluating the bottom &#39;6&#39; square</p></div>
<p>We&#8217;ve found two new candidate squares to add to the &#8216;open list&#8217; &#8211; both are of <em>absolute distance to goal</em> 5 and have a <em>distance travelled</em> of 1 (+1 in the diagram). Because we&#8217;ve now fully evaluated that bottom &#8217;6&#8242; square, it&#8217;s moved from the open list to what we call the &#8220;closed list&#8221; (which just makes sure we don&#8217;t end up re-evaluating squares that we&#8217;ve already done).</p>
<p>Now, the process continues by picking one of the squares in the open list with the lowest<em> absolute distance</em> + <em>distance already travelled</em>. If multiple squares have the same total, we pick a square with the highest <em>distance already travelled</em> first &#8211; this ensures that if there is a direct path to the goal, we find it immediately. If we continue this for a few move evaluations, we&#8217;ll end up with something like this.</p>
<div id="attachment_262" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2012/01/Pathfinding3.png"><img class="size-medium wp-image-262" title="Pathfinding3" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2012/01/Pathfinding3-300x233.png" alt="" width="300" height="233" /></a><p class="wp-caption-text">After evaluating 4 more squares</p></div>
<p>We evaluated the next two squares in the dead end, as they both had a combined total of 6, and they had the highest <em>distance already travelled</em> values. But then we reached a dead-end there (there were no valid moves from that 3/+3 square), so we next evaluate the remaining 5/+1 square. on the open list. It finds two new squares to add, a 6/+2 and a 5/+2. After this picture, the lowest total value that&#8217;s still open is actually the original red circle (it has a cost of 6. Our other open squares have values 7/0, 6/+2, and 5/+2). When evaluating it&#8217;s neighbors, we find that it has a shorter route to the square directly above it. Instead of 6/+2, it can be replaced with 6/+1 &#8211; this is fewer squares travelled to reach the same goal. So this square value is replaced in the open list. Evaluation then continues. Eventually, we&#8217;ll end up with the following table, and the optimal path.</p>
<p>&nbsp;</p>
<div id="attachment_266" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2012/01/Pathfinding4.png"><img class="size-medium wp-image-266" title="Pathfinding4" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2012/01/Pathfinding4-300x233.png" alt="" width="300" height="233" /></a><p class="wp-caption-text">Final path determined</p></div>
<p>In this contrived example, we end up evaluating almost every square, but the important part of this algorithm is that it will ALWAYS find the MOST EFFICIENT path possible. Apply these steps to any path (assuming the path can actually be reached), and you will get the best possible result in the end (note that this path has effectively &#8220;skipped the corners&#8221; in the tunnel, without us having to do any special coding to take this into account).</p>
<p>&nbsp;</p>
<h3>Summary</h3>
<p>So, that&#8217;s how Icefall calculates paths for the player. Seems easy enough, but you can see a lot of squares may end up being evaluated (especially in a big dungeon that has dead ends). So, how do we calculate the pathfinding for monsters? Since there may be dozens or hundreds of these in an Icefall dungeon&#8230;? Stay tuned for next time!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=249</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New audio engine</title>
		<link>http://www.paradicesoftware.com/blog/?p=244</link>
		<comments>http://www.paradicesoftware.com/blog/?p=244#comments</comments>
		<pubDate>Tue, 13 Sep 2011 10:11:13 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Icefall]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[redesign]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=244</guid>
		<description><![CDATA[Lately, I have been rewriting some of the subsystems in Icefall. Now that the core of the gameplay is in place, it is time to go back and implement flexible/efficient versions of systems I originally coded in very fast to get the basic game up and running. Mainly this involves recoding subsystems to do things [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, I have been rewriting some of the subsystems in Icefall. Now that the core of the gameplay is in place, it is time to go back and implement flexible/efficient versions of systems I originally coded in very fast to get the basic game up and running. Mainly this involves recoding subsystems to do things like handle errors more gracefully, respect the user settings (and respond correctly when these are changed on the fly), and cover everything in detailed comments so that future generations can understand how it worked.</p>
<p>The audio engine is the latest of these. It has been redesigned and now supports multiple channels of audio, with their own volume/mute controls, and a master control that lets you mute everything in one fell swoop. The game also ploughs on if it tries to initialise the audio library and fails &#8211; now it just skips loading any audio resources, disables and greys out all the audio UI settings, and carries on. Much better than popping an &#8220;Audio engine failed to initialise. Icefall will now exit&#8221; error message <img src='http://www.paradicesoftware.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s a screenshot of the new Audio page in the Options dialog (game music and sounds respond to any of these being changed, in real time):</p>
<div id="attachment_245" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/09/AudioOpts.jpg"><img class="size-medium wp-image-245 " title="Audio Options" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/09/AudioOpts-300x248.jpg" alt="Icefall's Audio Options dialog menu" width="300" height="248" /></a><p class="wp-caption-text">Audio Options</p></div>
<p><span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=244</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Net Status</title>
		<link>http://www.paradicesoftware.com/blog/?p=236</link>
		<comments>http://www.paradicesoftware.com/blog/?p=236#comments</comments>
		<pubDate>Mon, 30 May 2011 10:34:37 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[FPC]]></category>
		<category><![CDATA[Ping]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[WinNetStatus]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=236</guid>
		<description><![CDATA[A small break from Icefall. My network has been a bit flakey recently, and it was irritating because it wasn&#8217;t always immediately obvious when it died. So I wrote a little application that can sit in the notification area and send a regular ping to a designated address/site, and make a sound if it suddenly [...]]]></description>
			<content:encoded><![CDATA[<p>A small break from Icefall. My network has been a bit flakey recently, and it was irritating because it wasn&#8217;t always immediately obvious when it died. So I wrote a little application that can sit in the notification area and send a regular ping to a designated address/site, and make a sound if it suddenly dies (and when it comes back).</p>
<p>Also, I&#8217;ve been using C# for a couple of projects, and I wanted to step back from the managed, garbage collected goodness for a while. So I decided to forego all UI toolkits and just write direct Win32 API calls to create all my UI elements. Painful, yes! But fun too <img src='http://www.paradicesoftware.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here&#8217;s the application:</p>
<div id="attachment_237" class="wp-caption aligncenter" style="width: 556px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/05/WinNetStatus.png"><img class="size-full wp-image-237" title="WinNetStatus Application" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/05/WinNetStatus.png" alt="" width="546" height="173" /></a><p class="wp-caption-text">WinNetStatus Application</p></div>
<p>It also includes full FreePascal source code. I managed to remove <strong>all</strong> external dependencies on other code, so it will compile solely from the FPC Win32 RTL. I&#8217;ve also commented almost every line, so on the off chance someone is as crazy as me and wants to see how to program the raw Win32 API from FPC, this is probably a good example!</p>
<p>You can download the application (and source code) from <a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/05/WinNetStatus.zip" target="_blank">this link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=236</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UI Testing</title>
		<link>http://www.paradicesoftware.com/blog/?p=230</link>
		<comments>http://www.paradicesoftware.com/blog/?p=230#comments</comments>
		<pubDate>Thu, 10 Feb 2011 10:30:20 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Good coding guidelines]]></category>
		<category><![CDATA[Icefall]]></category>
		<category><![CDATA[HUD]]></category>
		<category><![CDATA[Playtesting]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=230</guid>
		<description><![CDATA[Sometimes, you produce a UI that makes perfect sense to you, but when you introduce it to another player, they can&#8217;t follow it. That happened to me with Icefall&#8217;s UI bar. Originally, my layout placed the player character&#8217;s health and mana bars in the bottom left corner, with the player&#8217;s current target displayed next to [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you produce a UI that makes perfect sense to you, but when you introduce it to another player, they can&#8217;t follow it.</p>
<p>That happened to me with Icefall&#8217;s UI bar. Originally, my layout placed the player character&#8217;s health and mana bars in the bottom left corner, with the player&#8217;s current target displayed next to them. The action buttons and experience bar were in the bottom centre, and the status window was on the right:</p>
<div id="attachment_229" class="wp-caption aligncenter" style="width: 508px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/02/Hud1.jpg"><img class="size-full wp-image-229 " title="Original UI Layout" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/02/Hud1.jpg" alt="Original UI Layout" width="498" height="111" /></a><p class="wp-caption-text">Original UI Layout, with player/target health bars at the bottom left.</p></div>
<p>This made sense to me, and was based on Angband displaying the player/monster health stats in that corner. However, when I got a couple of friends to play it, both of them struggled to track the player&#8217;s health without me explicitly pointing it out, and one got the health bar confused with the experience bar in the centre.</p>
<p>So, as a result of this, I did some tweaking of the layout and the UI graphics. I&#8217;ve put the player and target information in the centre, and shuffled the action bars to the left hand side. I have to admit, after playing for a while, this configuration makes more sense:</p>
<div id="attachment_228" class="wp-caption aligncenter" style="width: 508px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/02/Hud2.jpg"><img class="size-full wp-image-228 " title="New UI Layout" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2011/02/Hud2.jpg" alt="" width="498" height="111" /></a><p class="wp-caption-text">New UI Layout, with player/target health bars in the centre</p></div>
<p>I also took the opportunity to update the UI backdrop to make the player/target area jump out a little more with a &#8220;leather canvas&#8221;-type frame.</p>
<p>The lesson? Always test the UI on people who have never seen the game before, and be resigned to the fact that you might have to change it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=230</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Icefall Progress</title>
		<link>http://www.paradicesoftware.com/blog/?p=221</link>
		<comments>http://www.paradicesoftware.com/blog/?p=221#comments</comments>
		<pubDate>Sat, 20 Nov 2010 10:32:31 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Icefall]]></category>
		<category><![CDATA[draw]]></category>
		<category><![CDATA[textures]]></category>
		<category><![CDATA[walls]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=221</guid>
		<description><![CDATA[Hi again. Although I haven&#8217;t posted anything for a long time, I have still been (occasionally) developing Icefall. There are three new concepts which I have introduced since my last Icefall post &#8211; two enhancements to the visual engine, and one to the game core. Today I&#8217;ll talk about one of the visual enhancements &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again.</p>
<p>Although I haven&#8217;t posted anything for a long time, I have still been (occasionally) developing Icefall. There are three new concepts which I have introduced since my last Icefall post &#8211; two enhancements to the visual engine, and one to the game core. Today I&#8217;ll talk about one of the visual enhancements &#8211; seamless textured walls.</p>
<p>If you look carefully at some earlier Icefall screenshots, you&#8217;ll see the white and teal-coloured wall graphics. I actually thought these were pretty cool at the time (certainly an improvement over most Angband clones&#8217; &#8220;single tile for every wall&#8221;, as they had a slight 3D aspect, and wall tiles &#8220;linked up&#8221; with those next to them. The only thing I wasn&#8217;t happy about was when there was a wall that was exactly two tiles thick, and the player could see both sides (e.g. they were two separate rooms), these &#8216;wall texture&#8217; bubbles would appear in the centre of the wall &#8211; this was because the tiles didn&#8217;t check their diagonal neighbours, so they had to assume there wasn&#8217;t wall there (checking in the old engine would have meant I would need 256 different wall tiles for every combination of neighbours, instead of 16 when they only link up horizontally and vertically).</p>
<div id="attachment_222" class="wp-caption aligncenter" style="width: 248px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/11/Oldwall.png"><img src="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/11/Oldwall.png" alt="" title="Icefall Old wall graphics" width="238" height="230" class="size-full wp-image-222" /></a><p class="wp-caption-text">Old-style Icefall wall tiles</p></div>
<p>But, this was fixable! I have recreated the whole wall-drawing algorithm so that it now takes three passes instead of one. The first pass draws a nice &#8216;wall texture&#8217; (the actual texture can vary depending on the level, so the deeper you go into the dungeon, the walls themselves will start to look more sinister).</p>
<p>Secondly, an &#8220;outward-facing&#8221; wall texture is applied. This fixes up all the edges between wall tiles and ground tiles, similar to what happened before except that this tileset has no diagonal corners. Finally, another pass is made over all wall-edges, looking solely for diagonals and filling those in as needed.</p>
<p>Although this takes more GPU power than the old method, GPU power is not something I&#8217;m really worried about for Icefall, as the visual engine overall draws the game world very efficiently. (I must talk about this sometime if I haven&#8217;t already). And the results, hopefully you will agree, look a lot nicer!</p>
<div id="attachment_224" class="wp-caption aligncenter" style="width: 265px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/11/Newwall.png"><img src="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/11/Newwall.png" alt="" title="Icefall New Wall" width="255" height="229" class="size-full wp-image-224" /></a><p class="wp-caption-text">New wall-drawing algorithm. </p></div>
<p>Next time (which I promise will not be as far away as this update was from the last!), I will talk about displaying the player character themselves &#8211; as they&#8217;re now displayed in the gameworld with the equipment/weapons they have equipped!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=221</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xbox 360 &#8211; KINECT</title>
		<link>http://www.paradicesoftware.com/blog/?p=218</link>
		<comments>http://www.paradicesoftware.com/blog/?p=218#comments</comments>
		<pubDate>Tue, 22 Jun 2010 08:23:04 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=218</guid>
		<description><![CDATA[A quick look at the Xbox 360 Kinect&#8230; looks good. Note that it&#8217;s much faster response time on the guy in the red sweater compared to the chick in the black and white. At previous demos, the demonstrators have been wearing red too. Apparently, they worked firstly on fine-tuning the system to minimise latency on [...]]]></description>
			<content:encoded><![CDATA[<p>A quick look at the Xbox 360 Kinect&#8230; looks good. Note that it&#8217;s much faster response time on the guy in the red sweater compared to the chick in the black and white. At previous demos, the demonstrators have been wearing red too. Apparently, they worked firstly on fine-tuning the system to minimise latency on red, and they&#8217;re working to bring other colours/patterns up to the same speed between now and launch (November). I think this shows the latency could be VERY acceptable!</p>
<p><object width="384" height="283" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="movie" value="http://widget.nbc.com/videos/nbcshort_at.swf?CXNID=1000004.10045NXC&#038;widID=4727a250e66f9723&#038;clipID=1235148&#038;showID=243&#038;siteurl=http://www.nbc.com?vty=fromWidget_Video&#038;dst=nbc|widget|NBC Video&#038;__source=nbc|widget|NBC Video"/><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="http://widget.nbc.com/videos/nbcshort_at.swf?CXNID=1000004.10045NXC&#038;widID=4727a250e66f9723&#038;clipID=1235148&#038;showID=243&#038;siteurl=http://www.nbc.com?vty=fromWidget_Video&#038;dst=nbc|widget|NBC Video&#038;__source=nbc|widget|NBC Video" quality="high" bgcolor="#000000" width="384" height="283" align="middle" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=218</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Citadel Beta released!</title>
		<link>http://www.paradicesoftware.com/blog/?p=206</link>
		<comments>http://www.paradicesoftware.com/blog/?p=206#comments</comments>
		<pubDate>Tue, 09 Mar 2010 11:01:40 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Citadel]]></category>
		<category><![CDATA[Icefall]]></category>
		<category><![CDATA[Beta]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=206</guid>
		<description><![CDATA[People who know me on Facebook may be aware that I recently took a break from Icefall to focus on networking code. I plan for networking to form an important part of Icefall&#8217;s gameplay: the game itself is not realtime multiplayer, however I plan for an &#8216;Auction House&#8217;, scoreboards/leaderboards/server-firsts, player-to-player mail, and other online community-type [...]]]></description>
			<content:encoded><![CDATA[<p>People who know me on Facebook may be aware that I recently took a break from Icefall to focus on networking code.</p>
<p>I plan for networking to form an important part of Icefall&#8217;s gameplay: the game itself is not realtime multiplayer, however I plan for an &#8216;Auction House&#8217;, scoreboards/leaderboards/server-firsts, player-to-player mail, and other online community-type features.</p>
<p>BUT I have never worked with any networking code of any complexity before, and I determined that trying to &#8216;learn while I go&#8217; during the Icefall development process would not be the best idea. Hence, Citadel!</p>
<p>Citadel is a &#8216;tower-defense&#8217; game. For those unfamiliar with the concept, essentially an endless wave of bad guys (in this case, tanks, jets, armoured cars, and trikes) try to get to and destroy your tower. Your job is to build a system of defensive towers to prevent them from doing that. The towers themselves automatically aim and fire, the strategy lies in placing the right towers and walls in the right places to do as much damage to the invaders as possible.</p>
<p>Each wave of invaders is tougher than the last, and eventually they will overwhelm your defenses. However, each invader you kill will give you some credits to spend on additional defense, and you receive more credits for tougher invaders. So the object is to last as long as possible, try to save money for the strongest towers (the Tesla Coil), and ultimately get a big score.</p>
<p>As far as tower-defense games go, Citadel currently isn&#8217;t that sophisticated (it&#8217;s a beta version, after all!) and doesn&#8217;t have upgradable towers or multiple game types or anything like that, but it does have a unique feature that I couldn&#8217;t find in any other Tower Defense games anywhere: it can do multiplayer. Get a friend on a LAN, or over the internet (hook up a voice-chat program like MSN or Ventrilo!) and you can join forces to get the highest scores. It&#8217;s competitive co-operative: you share the same base and it&#8217;s game over when an invader reaches it, but who does the most damage to the creates gets the most credits for the kill, and the most score at the end.</p>
<p>NOTE: The invaders MUST ALWAYS HAVE *some way* to get through. Even if they have to go ridiculously long ways around crazily long mazes and queue up single file, it is against the rules of tower defense games to block them off completely. If you do that, it&#8217;s immediately game over!</p>
<p>Try the demo! If you don&#8217;t like it, that&#8217;s fine &#8211; but if it works (especially the networking part), or if it doesn&#8217;t work and you tell me about it and I work with you to make it work, then you&#8217;re helping me to make sure Icefall&#8217;s online components are awesome when they come out!</p>
<div id="attachment_208" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/03/Citadeltitle.png"><img class="size-medium wp-image-208" title="Citadel - Menu" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/03/Citadeltitle-300x225.png" alt="The Citadel Main Menu" width="300" height="225" /></a><p class="wp-caption-text">The Citadel Main Menu</p></div>
<div id="attachment_209" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/03/Citadelaction.png"><img class="size-medium wp-image-209" title="Citadel - Gameplay" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/03/Citadelaction-300x225.png" alt="Early into a Citadel game" width="300" height="225" /></a><p class="wp-caption-text">Early into a Citadel game</p></div>
<p><a href="http://www.paradicesoftware.com/storage/CitadelSetup.exe">Download the beta demo here</a> and let me know in the comments what you think, if it works, or (more importantly!) if it doesn&#8217;t work, or (MOST importantly!) what your high score is <img src='http://www.paradicesoftware.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=206</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3rd Party Code</title>
		<link>http://www.paradicesoftware.com/blog/?p=203</link>
		<comments>http://www.paradicesoftware.com/blog/?p=203#comments</comments>
		<pubDate>Sat, 06 Mar 2010 22:46:42 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Good coding guidelines]]></category>
		<category><![CDATA[3rd party]]></category>
		<category><![CDATA[libraries]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=203</guid>
		<description><![CDATA[As a general rule, I like to write all of the code used by my games/programs myself. Not because I think I am the best programmer in the world, but because &#8211; for me &#8211; one of the main reasons I program is to learn more about how software functions on the very lowest levels, [...]]]></description>
			<content:encoded><![CDATA[<p>As a general rule, I like to write all of the code used by my games/programs myself. Not because I think I am the best programmer in the world, but because &#8211; for me &#8211; one of the main reasons I program is to learn more about how software functions on the very lowest levels, and if I used extensive 3rd party code (like Unreal Engine for my game, for example) a lot of that stuff that I *want* to learn about would be abstracted away, or worse: still present but obscured and intermingled with the 3rd party code itself.</p>
<p>Coincidentally, this is the same reason I don&#8217;t use managed languages like C#. I quite like knowing about things that managed code wants to hide! The increase in development time is not that important to me, I have no external deadlines to meet.</p>
<p>However, there are points beyond which it&#8217;s not practical for me to write the code myself, because it&#8217;s either A) incredibly complex, B) boring, C) proprietary, or D) so ubiquitous that it really doesn&#8217;t need reinventing. e.g.: writing code to decode an MP3 file into raw audio. I could *potentially* do this, but as it belongs to all four categories, I&#8217;m really comfortable with not doing it myself!</p>
<p>Currently in my Freepascal development I am using three 3rd Party Code libraries every day. And they are all excellent, both in terms of features and being easy enough that I can &#8216;plug them in&#8217; to my own lx7 game engine with very little work. Here they are:</p>
<h3>DirectX &#8211; by Clootie</h3>
<p>No, not DirectX itself (that deserves a whole separate subject!), but a port of all the headers/structures/glue code necessary to use DirectX in Freepascal. This gives me low level access to every function and interface used by DirectX itself, and the port is so perfect I was able to build my own graphics engine on top of Direct3D just by studying the (C++) DirectX SDK. Nothing is missing! Everything works! You probably won&#8217;t appreciate how rare this is if you normally use C++.<br />
<a href="http://www.clootie.ru/">http://www.clootie.ru/</a></p>
<h3>BASSfpc</h3>
<p>BASS is an Audio Library that makes it *dead easy* to play sound and music files of many different types. BASSfpc is the FPC port of this. BASS handles MP3s, WAVs, OGGs, and about a million other sound types, and it does it efficiently and with the bare minimum of code needed (literally about 4 lines of code to init the library and start playing an MP3!).<br />
<a href="http://www.un4seen.com/">http://www.un4seen.com/</a></p>
<h3>LNet</h3>
<p>The newest addition to my Libs folder. LNet provides a set of classes to implement networking, at the very lowest level, without adding any additional features or complexity. That&#8217;s exactly what I needed, because I want to add my own features and complexity! There are many many network libraries out there, but (for Freepascal at least) LNet definately gets my vote, for being simple, class-based, and extremely elegant.<br />
<a href="http://lnet.wordpress.com/">http://lnet.wordpress.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=203</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Icefall Progress</title>
		<link>http://www.paradicesoftware.com/blog/?p=197</link>
		<comments>http://www.paradicesoftware.com/blog/?p=197#comments</comments>
		<pubDate>Sat, 09 Jan 2010 11:05:31 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Icefall]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=197</guid>
		<description><![CDATA[Long time, no update. My holiday from my real job is almost at an end, but the good news is that I have spent a lot of time with Icefall and it&#8217;s actually starting to come together! I had developed a lot of separate pieces of game infrastructure (random map generation, character creation, character death&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Long time, no update. My holiday from my real job is almost at an end, but the good news is that I have spent a lot of time with Icefall and it&#8217;s actually starting to come together!</p>
<p>I had developed a lot of separate pieces of game infrastructure (random map generation, character creation, character death&#8230; etc), and over the last couple of days I have successfully integrated them all into the main Icefall build. This means that what I have now, for the first time, is a *fully* playable game! You start out creating a character, you can explore, find items, kill monsters, and be killed in turn. </p>
<p>There&#8217;s still thousands of features missing (I had thought I was pretty well progressed on the UI side of things, but now the framework is in place, I can see there are quite a few gaps I need to fill in) but now I have something that feels like a game, I can start iterating on it and trying it out. </p>
<p>The game has killed me several times already &#8211; I have added a few &#8216;tough&#8217; monsters for the deep dungeon, but I haven&#8217;t really added any high-level equipment yet. So it&#8217;s possible for my character to be wearing all the best items in the game and still get owned by the monsters. This will be fixed as I add in more content <img src='http://www.paradicesoftware.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>I didn&#8217;t meet my goal of having it completed over Christmas, but at least I have made significant progress. Overall, I&#8217;m pretty happy with how far along it is.</p>
<p>Finally, anyone who has played a roguelike will be very familiar with the death screen. Here&#8217;s Icefall&#8217;s current version (more information about how/when/why you died will be added in future):</p>
<div id="attachment_200" class="wp-caption aligncenter" style="width: 600px"><img src="http://www.paradicesoftware.com/blog/wp-content/uploads/2010/01/Death.png" alt="The Icefall death screen quickly becomes familiar." title="Death Screen" width="590" height="392" class="size-full wp-image-200" /><p class="wp-caption-text">The Icefall death screen quickly becomes familiar.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=197</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Holidays</title>
		<link>http://www.paradicesoftware.com/blog/?p=195</link>
		<comments>http://www.paradicesoftware.com/blog/?p=195#comments</comments>
		<pubDate>Sat, 26 Dec 2009 09:53:13 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Icefall]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=195</guid>
		<description><![CDATA[Sorry, no posts for a while! I&#8217;m on holiday for Christmas, although I will be spending some time working on finishing up Icefall, I probably won&#8217;t be posting that much. See you in the new year!]]></description>
			<content:encoded><![CDATA[<p>Sorry, no posts for a while! I&#8217;m on holiday for Christmas, although I will be spending some time working on finishing up Icefall, I probably won&#8217;t be posting that much.<br />
See you in the new year!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=195</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game Golden Rule #2: Settings &amp; Controls</title>
		<link>http://www.paradicesoftware.com/blog/?p=193</link>
		<comments>http://www.paradicesoftware.com/blog/?p=193#comments</comments>
		<pubDate>Tue, 15 Dec 2009 07:18:21 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Game Golden Rules]]></category>
		<category><![CDATA[Good coding guidelines]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=193</guid>
		<description><![CDATA[This is the second entry in my set of &#8220;10 Game Development Golden Rules&#8221;. Hopefully, this one is less contentious than the first! The rule is: Provide gamma and volume controls, and separate music from sound. Pretty simple. But essential! The good news is, the AAA titles pretty much universally support this now. And it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second entry in my set of &#8220;10 Game Development Golden Rules&#8221;. Hopefully, this one is less contentious than the first!</p>
<p>The rule is:</p>
<h3>Provide gamma and volume controls, and separate music from sound.</h3>
<p>Pretty simple. But essential! The good news is, the AAA titles pretty much universally support this now. And it&#8217;s a good thing, as I use these settings all the time. </p>
<p>I have an Xbox 360 but, unlike most Xbox 360s, mine isn&#8217;t connected to a TV &#8211; it plugs into a second DVI port on one of my 22&#8221; widescreen PC monitors. This is awesome because I can run it at 1680&#215;1050 and games look beautiful! (handy bonus: I can web-surf on my other screen while waiting for Matchmaking in Halo 3)</p>
<p>BUT my monitor has a very different colour profile than your average TV, and games with a lot of contrasting light/dark elements can look really bad by default. Gamma controls in your game are pretty essential for me to see the graphics the way the designer intended. I&#8217;m sure there are other people in similar situations or even wildly different situations who also need gamma settings. Your game needs to support them too!! And since there&#8217;s nothing on the &#8220;con&#8221; side of the ledger that could make it a bad idea, you have no excuse!</p>
<p>Providing separate controls for sound/music: Music is awesome but people like to be able to hear the game sounds sometimes! Particularly in a &#8216;competitive&#8217; environment, or simply when your game is providing an audio narrative (GTA4 is an excellent example &#8211; the &#8220;in-car radio&#8221; music is huge and contributes to the GTA atmosphere, but you <strong>need</strong> to turn the music volume down to be able to hear what mission you&#8217;re being given via the cellphone). If I&#8217;m playing an FPS single-player, I might turn the music up, but in multiplayer I want to use every audio cue the game gives me for competitive advantage, so I need to kill the music or at least turn it down. </p>
<p>Just like with the gamma controls, the good news is this is pretty universal now. But there are still Flash games that don&#8217;t separate them (and, even worse: there are plenty that have no Volume settings at all &#8211; sound is either On or Off). Sound might *add* to the game experience, but I&#8217;d like to set it so that it doesn&#8217;t completely drown out my background music, thanks! Vista and Windows 7 allow you to set the volume controls at the &#8220;application&#8221; level, which solves the problem for me specifically, but it doesn&#8217;t help anyone using XP (or anyone who doesn&#8217;t know about that feature). Support them too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=193</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Assets as Text Files!</title>
		<link>http://www.paradicesoftware.com/blog/?p=191</link>
		<comments>http://www.paradicesoftware.com/blog/?p=191#comments</comments>
		<pubDate>Sun, 06 Dec 2009 09:42:48 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Good coding guidelines]]></category>
		<category><![CDATA[Icefall]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=191</guid>
		<description><![CDATA[OK, this trick is probably universally known, but I&#8217;ve only just discovered it (by the classic programmer method of reinventing it), so on the chance there are others who are unfamiliar with this technique, it&#8217;s worth describing. Any sufficiently complex game is going to have &#8220;assets&#8221;: data external to the main program that the game [...]]]></description>
			<content:encoded><![CDATA[<p>OK, this trick is probably universally known, but I&#8217;ve only just discovered it (by the classic programmer method of reinventing it), so on the chance there are others who are unfamiliar with this technique, it&#8217;s worth describing.</p>
<p>Any sufficiently complex game is going to have &#8220;assets&#8221;: data external to the main program that the game depends on to function. This includes &#8220;art assets&#8221; (textures, images, music, etc) as well as more application-specific &#8220;data assets&#8221; which contain data in a format unique to your application (e.g. Icefall has &#8220;item types&#8221; of all the different equipment players can find/buy/receive).</p>
<p>Handling art assets is relatively easy: you create/modify them in Photoshop (or equivalent), you save them as PNGs or JPGs, and you&#8217;re done! You might wrap them all up in a custom file format to compress/encrypt/streamline them, but that&#8217;s pretty simple and you can do that at the very end of development.</p>
<p>Data assets are different. There aren&#8217;t any programs around that can edit &#8220;Icefall item types&#8221; files. I need to write my own &#8220;Item Types Editor&#8221;, which understands this format and can load, modify and save it. This leads to two problems:</p>
<p>1. I have to spend time writing an Editor. (the actual format load/save code could be shared with Icefall itself, but there&#8217;s all the UI!).</p>
<p>2. If I ever change the &#8220;item types&#8221; format, all the data I&#8217;ve previously created is now in jeopardy. (What I typically do is modify the &#8216;save&#8217; code only, run the editor and  load each asset (old-code), and re-save it (new-code), then when that&#8217;s done I can modify the &#8216;load&#8217; code.</p>
<p>Depending on the type of data asset, using Asset Text Files may be superior. I DON&#8217;T mean your game should store all of it&#8217;s data assets in plain text (yuck!). Here&#8217;s what I mean:</p>
<p>Whip up a simple plaintext &#8216;syntax&#8217; that stores all of the information you want to include in your data asset. Then,  instead of creating an &#8220;Editor&#8221; with bulky UI code, create a command line utility that can parse your plaintext files and spit out your compiled data asset files. If you borrow your main game code for load/save, all you have to write is the text parser, and that can be as easy as you like: you&#8217;re dictating the syntax it has to interpret.</p>
<p>The BEST part of this system is that it makes changing the format of the assets later on very very easy. Oops, I forgot a field for my item types? No worries. Add the extra field to your text file sources (bringing to bear the full power of your fantastic Programmer Text Editor / IDE you&#8217;re using &#8211; the programmers&#8217; Photoshop), a quick change to the asset compiler to recognise the new format, and hit execute.</p>
<p>You get other benefits too: you can put &#8216;logic&#8217; into your compiler without having to put it in you main game. (e.g. scale the values, dictate whatever &#8220;optional&#8221; or &#8220;Default&#8221; fields, anything!</p>
<p>It doesn&#8217;t work for everything (e.g. Icefall&#8217;s &#8220;Level Map&#8221; is huge and an Editor really is the right option for that) &#8211; but when it&#8217;s appropriate, I have found it works brilliantly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=191</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The quest for an intuitive interface</title>
		<link>http://www.paradicesoftware.com/blog/?p=188</link>
		<comments>http://www.paradicesoftware.com/blog/?p=188#comments</comments>
		<pubDate>Fri, 04 Dec 2009 21:09:54 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Icefall]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=188</guid>
		<description><![CDATA[One of the hardest bits about creating Icefall was getting the User Interface (UI) just right. Icefall&#8217;s chief inspirations are &#8220;old-school&#8221; role-playing games like Angband (aka Roguelikes: Nethack, Moria, Omega, ADOM all fall into this category). But these old-school games all rely on essentially a text-mode interface with a myriad of hotkeys. I want to [...]]]></description>
			<content:encoded><![CDATA[<p>One of the hardest bits about creating Icefall was getting the User Interface (UI) just right.<br />
Icefall&#8217;s chief inspirations are &#8220;old-school&#8221; role-playing games like Angband (aka Roguelikes: Nethack, Moria, Omega, ADOM all fall into this category). But these old-school games all rely on essentially a text-mode interface with a myriad of hotkeys. I want to make Icefall more accessible than that. So I took the UI elements from &#8216;modern&#8217; RPGs like World of Warcraft, Titan Quest, and Dragon Age: Orgins: hotbars, cooldowns, drag &amp; drop.</p>
<p>Of course these &#8216;modern&#8217; interfaces are much more work to get right than a classic keyboard-driven one. Even though I&#8217;ve spent more time on this aspect than any other, it&#8217;s still not perfect. Here&#8217;s an example I found yesterday:</p>
<div id="attachment_189" class="wp-caption aligncenter" style="width: 411px"><img class="size-full wp-image-189" title="Icefall Backpack user interface" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2009/12/Backpack_armor.png" alt="Icefall Backpack user interface" width="401" height="352" /><p class="wp-caption-text">Icefall Backpack user interface</p></div>
<p>Looks easy enough. To equip the Apprentice Jerkin, players can either click and drag it to their Character Sheet, or else right-click it to equip. The problem: there are two, identical jerkins in the player&#8217;s inventory. Click and drag works fine, but if you right-click the second one, a strange thing happens: the *other* jerkin is equipped instead, and disappears from inventory.</p>
<p>Why? Well, right clicking an item in Icefall triggers a codepath to essentially &#8220;Activate Item: Apprentice Jerkin&#8221;. It&#8217;s set up this way so that players can also drag equipment to their hotbar, and equip it directly from there. All good so far. BUT: internally, the inventory is stored as an array, and is stored from left-to-right, top-to-bottom. So when the &#8220;Activate Item&#8221; codepath is triggered, it goes looking for an Apprentice Jerkin to activate, and it finds the other jerkin (the one in the row above) first &#8211; so it activates it!</p>
<p>A rare situation, a completely logical consequence of the way I implemented right-click behaviour. Technically correct (There are no downfalls to the player if the &#8216;wrong&#8217; jerkin is equipped: they&#8217;re identical by definition) and yet it feels completely wrong and would likely alienate a casual user. So I&#8217;m going to have to find a workaround <img src='http://www.paradicesoftware.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=188</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Icefall Character Creation</title>
		<link>http://www.paradicesoftware.com/blog/?p=179</link>
		<comments>http://www.paradicesoftware.com/blog/?p=179#comments</comments>
		<pubDate>Mon, 30 Nov 2009 10:36:38 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Icefall]]></category>
		<category><![CDATA[Decision]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=179</guid>
		<description><![CDATA[Because screenshots are always interesting, here is a screenshot of the &#8220;Character Creation&#8221; part of Icefall. This is one of the very first screens new players will see, as they opt to begin a new adventure the first thing to do is decide who they&#8217;re going to be. (I deliberately replaced the description text with [...]]]></description>
			<content:encoded><![CDATA[<p>Because screenshots are always interesting, here is a screenshot of the &#8220;Character Creation&#8221; part of Icefall. This is one of the very first screens new players will see, as they opt to begin a new adventure the first thing to do is decide who they&#8217;re going to be. (I deliberately replaced the description text with Latin, don&#8217;t want to give away too many plot points at this stage!)</p>
<div class="mceTemp mceIEcenter">
<div id="attachment_178" class="wp-caption aligncenter" style="width: 641px"><img class="size-full wp-image-178 " title="Character Creation" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2009/11/CreateChar.png" alt="Icefall Character Creation, Nov 30 2009" width="631" height="314" /><p class="wp-caption-text">Icefall Character Creation, Nov 30 2009</p></div>
</div>
<p>Note: the &#8220;portrait&#8221; is currently a giant, upscaled version of the tiles used for the characters ingame. I would love to have larger character portraits, but my artistic skill just isn&#8217;t there&#8230;. hopefully I will find or convince someone at some point to help out <img src='http://www.paradicesoftware.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<h3>Class Selection</h3>
<p>In Icefall, Class is a much more important choice than Race: Race has a few minor effects on stats, starting location, etc, but Class affects how you will approach the game: how you will defeat monsters and complete quests.</p>
<p>I strongly considered a &#8220;class-free&#8221; model, where the player starts with a generic character and shapes it over time just by their choices of equipment and &#8216;specialisations&#8217; (Titan Quest is a good example of this approach), but it made things too complicated, and you don&#8217;t gain too much in the approach anyway: in Titan Quest, if you don&#8217;t specialise correctly, you&#8217;ll end up a sort of &#8220;jack-of-all trades&#8221; type character who is not good enough at any one thing to get very far. So you may as well make the choice up-front, so that you and the game can work together to give you the type of experience you want. Choose a Ranger? Great, I&#8217;m going to give you some ranger-related quests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=179</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Development Speed = Effort / (Complexity * Quality)</title>
		<link>http://www.paradicesoftware.com/blog/?p=176</link>
		<comments>http://www.paradicesoftware.com/blog/?p=176#comments</comments>
		<pubDate>Fri, 27 Nov 2009 06:57:07 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=176</guid>
		<description><![CDATA[I took a few days&#8217; break from Icefall to develop a quickfire helper application for myself (a simple media-centre type program to organise, search and filter the various videos and music I have lurking around, with a few handy unique features like automatic IMDB-Lookup for descriptions, saves me typing them off the DVD cover). After [...]]]></description>
			<content:encoded><![CDATA[<p>I took a few days&#8217; break from Icefall to develop a quickfire helper application for myself (a simple media-centre type program to organise, search and filter the various videos and music I have lurking around, with a few handy unique features like automatic IMDB-Lookup for descriptions, saves me typing them off the DVD cover).</p>
<p>After working on Icefall for so long, I was amazed at how quickly I was developing the code for the new program! When writing Icefall, I might create a single new source file in a night&#8217;s work, or maybe make 4 or 5 moderate improvements to existing code. On the media app, I was churning out half a dozen new source files at a time, and I had the entire application virtually finished in about three days.</p>
<p>Thinking about my observations of the difference, I eventually came up with the following formula:</p>
<h3>Development Speed = Effort / (Complexity * Quality)</h3>
<p>For a given amount of effort, I can get a lot more done on the media app, because A: it&#8217;s far less complex, and B: I care much less about the quality of the code. Multiply those factors together and you can see why Icefall development is approximately an order of magnitude slower: it&#8217;s a complex system, all the code has to be correct, robust, speedy, and extensible.</p>
<p>I&#8217;m convinced this is part of the reason why so many &#8220;we&#8217;re going to create the perfect application, that does everything and is open source&#8221; projects never reach version 1.0. With all the effort in the world, they&#8217;re just throwing huge numbers on the wrong side of the divisor. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=176</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Icefall UI Evolution</title>
		<link>http://www.paradicesoftware.com/blog/?p=170</link>
		<comments>http://www.paradicesoftware.com/blog/?p=170#comments</comments>
		<pubDate>Fri, 20 Nov 2009 23:25:57 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Icefall]]></category>
		<category><![CDATA[Decision]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=170</guid>
		<description><![CDATA[Taking a break from coding topics, today&#8217;s post explores how Icefall&#8217;s dialog User Interface (UI) has evolved over the course of it&#8217;s development. My automatic-backup tool keeps every version of Icefall available, so I fired up a few old versions and took some screenshots to illustrate the process. Original Design This screenshot is actually from the [...]]]></description>
			<content:encoded><![CDATA[<p>Taking a break from coding topics, today&#8217;s post explores how Icefall&#8217;s dialog User Interface (UI) has evolved over the course of it&#8217;s development. My automatic-backup tool keeps every version of Icefall available, so I fired up a few old versions and took some screenshots to illustrate the process.</p>
<h3>Original Design</h3>
<p><img class="aligncenter size-medium wp-image-166" title="UI Dialog: Original" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2009/11/Stage1-300x239.jpg" alt="UI Dialog: Original" width="300" height="239" /></p>
<p>This screenshot is actually from the realtime Icefall prototype. I needed a quick way to change screen resolutions for testing, so this is it. Some interesting features: The green background would slowly sway while the dialog was open, and there was a shimmering gold border around whichever element had keyboard focus.</p>
<h3>Revision</h3>
<p><img class="aligncenter size-medium wp-image-167" title="Icefall: Revision" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2009/11/Stage2-300x266.jpg" alt="Icefall: Revision" width="300" height="266" /></p>
<p>Fast forward to the turn-based rewrite of Icefall, and this is the original Video Options dialog. Some big changes: the background texture is more subdued, there is a panel on the left to select what <strong>type </strong>of options to view, and the gold-edge focus indicator has gone (now, the focused element is just highlighted a little more). Buttons and checkboxes have also had a minor makeover, e.g. the buttons are now rounded.</p>
<h3>Revision 2</h3>
<p><img class="aligncenter size-medium wp-image-168" title="UI Dialog: Revision 2" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2009/11/Stage3-300x248.jpg" alt="UI Dialog: Revision 2" width="300" height="248" /></p>
<p>What changed here? The window frame! Gone is the &#8216;rusted steel&#8217; frame from the top and bottom of the window, replaced with an ice-blue frame that encloses all four sides. I wanted to get more &#8220;ice theme&#8221; into the UI for the game, and at the same time I needed a UI frame that covered the left and right too, because not all UI elements use the slate background (the spellbook, for example, uses a &#8216;book&#8217; background, and it looked a little strange with no enclosing frame). I also think this looks better than the previous one.</p>
<h3>Current Design</h3>
<p><img class="aligncenter size-medium wp-image-169" title="UI Design: Final" src="http://www.paradicesoftware.com/blog/wp-content/uploads/2009/11/Stage4-300x248.jpg" alt="UI Design: Final" width="300" height="248" /></p>
<p>Good, the rate-of-change of the dialog is slowing down, which means we&#8217;re getting closer to completion! The only change here is to the background of the listbox. The &#8216;green waves&#8217; looked ok in the original version, but as the look and feel of the rest of the dialog evolved, it began to look more and more out of place. When the dialog frames turned ice-blue, it was a good opportunity to build on that existing colourspace and again lend more of an &#8216;icey&#8217; theme to things by using a dark, ice-blue texture. This is what this dialog looks like in current builds. Hopefully, you agree with me that it&#8217;s the best looking of them all?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=170</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Textures than Memory</title>
		<link>http://www.paradicesoftware.com/blog/?p=155</link>
		<comments>http://www.paradicesoftware.com/blog/?p=155#comments</comments>
		<pubDate>Wed, 18 Nov 2009 05:10:19 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Good coding guidelines]]></category>
		<category><![CDATA[Icefall]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[Freepascal]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=155</guid>
		<description><![CDATA[Icefall uses literally dozens of textures&#8230; (and it will probably be &#8216;hundreds&#8217; by the time the game is completed). Textures are used for everything, from the mouse cursor, menus, fonts, buttons, to the game world itself, spells/action icons, monsters, equipment&#8230; everything. Although my own main PC has 512MB of video (texture) RAM, not everyone does! [...]]]></description>
			<content:encoded><![CDATA[<p>Icefall uses literally dozens of textures&#8230; (and it will probably be &#8216;hundreds&#8217; by the time the game is completed).</p>
<p>Textures are used for everything, from the mouse cursor, menus, fonts, buttons, to the game world itself, spells/action icons, monsters, equipment&#8230; everything.</p>
<p>Although my own main PC has 512MB of video (texture) RAM, not everyone does! And<br />
following on from my <a href="http://www.paradicesoftware.com/blog/index.php/2009/11/minimum-requirements/">minimum requirements</a> post, I don&#8217;t really want someone&#8217;s video card memory size to be a limiting factor if everything else meets the requirements, so Icefall needs a way to manage things when there are more textures than there is video memory.</p>
<p>I don&#8217;t want each bit of code that uses textures to worry about whether they&#8217;re loaded or not, so the logical choice is to encapsulate all of the texture handling into one place: I call the class that handles this the <em>TContentManager</em> (&#8220;content&#8221; because it also handles sounds, fonts, music, etc.).</p>
<p>When the game code asks the <em>TContentManager</em> for a texture: the first thing it does is look to see if that texture is already available in video memory: if so, it just hands out a reference. Easy! If not, it retrieves the filename for that texture from Icefall&#8217;s <em>ResourceDatabase</em>, and attempts to load the texture from disk. If that fails, it looks at <strong>why</strong> it failed: if it&#8217;s <em>D3DERR_OUTOFVIDEOMEMORY</em>, the next step is to unload some other texture and try again, repeating until the load succeeds or we have no loaded textures left. (If it still doesn&#8217;t load, or if the texture load fails for some other reason, it&#8217;s goodbye Icefall).</p>
<p>Programmatically:</p>
<blockquote><pre>
function TContentManager.GetTexture(ID: TTextureID): TLXTexture;
var
   HRes: HRESULT;
   NewTexture: TLXTexture;
   FileName: String;
begin
   if TextureLoaded(ID) then
      exit(Texture[ID]);

   FileName := ResourceManager.Textures[ID].FileName;
   repeat
      HRes := LXLoadTexture(FileName,NewTexture);
      case HRes of
         D3D_OK:
            Texture[ID] := NewTexture;
         D3DERR_OUTOFVIDEOMEMORY:
            UnloadTexture(0);
      else
         // Fatal error!
      end;
   until TextureLoaded(ID);
   result := Texture[ID];
end function;
</pre>
</blockquote>
<p><em>UnloadTexture</em> is a method that unloads a texture. It takes a <em>TTextureID</em> as a parameter, but passing 0 in this case tells the method we want it to choose a texture to unload itself. This is where it gets interesting.</p>
<p>Before I got to this, I originally had set up a few states so that they explicitly called <em>TContentManager.UnloadTexture</em> to release textures when the game left that state (e.g. the game would unload the &#8216;Option-selection&#8217; texture when the player closed the Options dialog). However, this turned out to be sub-optimal for several reasons:</p>
<ul>
<li>Players might well leave and re-enter states (like Options) several times to accomplish whatever it is they&#8217;re trying to do.</li>
<li>It doesn&#8217;t make use of extra video memory: it keeps loading from disk (or the disk-cache anyway) while the extra video memory stays idle.</li>
<li>I had to explicitly declare what textures I was done with. Not a problem really but &#8216;just another thing&#8217; that I had to do when changing states.</li>
</ul>
<p>So now I no longer explicitly release anything. <em>UnloadTexture</em> always chooses the texture to unload that was least-recently used (a linked list makes this a very fast and efficient check &#8211; no timers or array scanning involved). In practise &#8220;least recently used&#8221; turns out to be about 97% optimal (when simulated against a 100% optimal algorithm which is permitted to see the future when deciding what to unload) so it&#8217;s virtually perfect &#8211; substantially better than my explicit declarations were. </p>
<p>If for some crazy reason the user doesn&#8217;t want Icefall consuming all of their video RAM*, I can chuck in a call to <em>IDirect3DDevice9.GetAvailableTextureMem</em> and trigger <em>UnloadTexture</em> if it&#8217;s below some specific amount. Alternatively, I could keep a sum of the amount of texture memory I&#8217;m using, and trigger <em>UnloadTexture</em> if that amount threatens to exceed 32MB or whatever (I haven&#8217;t decided yet).</p>
<p>The point is, if you find yourself manually balancing resources, it&#8217;s probably an excellent idea to profile your resource usage and see if you can find a pattern that will let you just automate the whole thing**. You&#8217;ll save yourself much time and your code will be cleaner and more flexible.</p>
<p>*Note: this only actually matters on Vista or Windows 7. Under the Windows XP model, multiple applications can&#8217;t share texture memory anyway. As soon as an application takes focus, DirectX invalidates all texture resources belonging to everything else (forcing them to reload from system-memory or disk when they get restored). The WDDM (Windows Display Driver Model) in Vista &#8220;understands&#8221; video memory, and can share it amongst applications. This is one of the reasons DirectX 10+ can&#8217;t be backported to XP: XP has no concept of video card resources.</p>
<p>**If you&#8217;re creating a game frame-rate locked or just frame-rate dependent, you might still need to explicitly acquire and release resources (e.g. between levels), because a 10ms pause at an unexpected point in your game could be noticeable or detrimental. Either that, or move the resource acquistion to another thread and have low-quality &#8216;emergency&#8217; textures to display while the real ones load&#8230; this is a very common technique for FPS games. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=155</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scary Windows development stories</title>
		<link>http://www.paradicesoftware.com/blog/?p=148</link>
		<comments>http://www.paradicesoftware.com/blog/?p=148#comments</comments>
		<pubDate>Mon, 16 Nov 2009 08:44:20 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Good coding guidelines]]></category>
		<category><![CDATA[Taxes]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=148</guid>
		<description><![CDATA[I&#8217;m currently reading a book about the evolution of Windows. One of the most interesting things I keep finding is how stupid some 3rd party application developers must have been&#8230;. for example, it seems to have been common practice that if you wanted your app to grab a particular Windows setting (let&#8217;s say the Fonts [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently reading a book about the evolution of Windows. One of the most interesting things I keep finding is how stupid some 3rd party application developers must have been&#8230;. for example, it seems to have been common practice that if you wanted your app to grab a particular Windows setting (let&#8217;s say the Fonts directory), instead of a quick MSDN search, which turns up both the <em>SHGetFolderPath</em> and <em>SHGetKnownFolderPath</em> functions (either of which is exactly what you want), these programmers fired up RegEdit and searched for the path of their own Fonts folder&#8230; the first key they found, they used as the parameter for a call to  <em>RegOpenKeyEx</em> and they read the value that way.</p>
<p>To me, that is not only a frighteningly ignorant and dangerous way to develop software (you&#8217;re not going to discover caveats &#038; usage notes by browsing RegEdit!) but <strong>of course</strong> this is not the supported way to do it (how could any sane developer think otherwise?), and <strong>of course</strong> that app would have broken immediately on any new of Windows had MS not added a compatibility shim to watch for that program checking that buggy key, and substituting in a quick call to obtain the real value&#8230;</p>
<p>This isn&#8217;t backyard programmers writing in VBA in Excel to accomplish some one-off business task, either.. it&#8217;s commercial software that did this, written by professional developers and sold to unsuspecting customers for big cash. Scary stuff.</p>
<p>The only question worth pondering here is: was this &#8216;grab something promising out of the Registry&#8217; technique better or worse than just hard-coding &#8220;C:\Windows\Fonts\&#8221; into the application? (I&#8217;m not 100% sure but it seems very likely there&#8217;s a shim out there for programs that did that, too.) </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game Golden Rule #1: Support Windowed-mode</title>
		<link>http://www.paradicesoftware.com/blog/?p=141</link>
		<comments>http://www.paradicesoftware.com/blog/?p=141#comments</comments>
		<pubDate>Thu, 12 Nov 2009 06:50:43 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Game Golden Rules]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[Taxes]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=141</guid>
		<description><![CDATA[I thought I&#8217;d cover this rule first, because I listed it as number one and also because it&#8217;s probably one of the most controversial. Let&#8217;s begin: a simple Why/Why Not argument should suffice for this one: Why Allow Windowed-mode: It&#8217;s more convenient for your users. Some users multitask (gasp!), even while playing games. This is [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d cover this rule first, because I listed it as number one and also because it&#8217;s probably one of the most controversial. Let&#8217;s begin: a simple Why/Why Not argument should suffice for this one:</p>
<h3>Why Allow Windowed-mode:</h3>
<p><strong>It&#8217;s more convenient for your users.</strong> Some users multitask (gasp!), even while playing games. This is much harder to do when your game is Fullscreen. I suspect this is a part of why games like Minesweeper and Solitaire get so much play-time. They&#8217;re built into the OS, sure, but you can also fire them up and play while you&#8217;re waiting for something to download/compile/whatever. Very handy!</p>
<p><strong>It&#8217;s more convenient for you.</strong> Debugging is hard, and debugging fullscreen is harder! My own game engine (in debug builds) has a feature to throw a debugging/log window up so I can watch internal game messages etc: you can&#8217;t do this if your game is always fullscreen. Not only that, but if your game crashes at some Direct3D stuff (which can happen in early builds, before you lock down your video interface code), it&#8217;s very tricky to find a cause when you&#8217;re staring at a blank screen. A blank window on the desktop gives you more context and options.</p>
<p><strong>It makes paying certain Windows taxes more obvious.</strong> If you&#8217;re running in Windowed mode while developing, you&#8217;re going to be hitting the titlebar close button, you&#8217;ll be minimising/maximising your game Window, or maybe just clicking other apps, stealing your game&#8217;s focus. Because you&#8217;re doing these things, you&#8217;re much more likely to take the time to ensure your game handles them correctly. Fullscreen games are required to handle these situations too, you know: but some of them never get around to it! (Civilization 3, which is always &#8220;fullscreen&#8221;, can experience a rather ugly crash if I dare to click something on my second monitor while I&#8217;m playing).</p>
<p><strong>It&#8217;s future proof.</strong> You might think your fullscreen game is pretty cool, what with it supporting resolutions right up to 1920&#215;1080, but who knows what the future holds? How well will your fullscreen game look on some giant desktop running 12,000&#215;12,000 pixels? Or do you just expect no one will be playing it then? (if you don&#8217;t, then code this way: you&#8217;re sure to be correct). Windowed mode doesn&#8217;t solve this completely, but it gives your users more options.</p>
<p>Ok, hopefully you can that there are always scenarios where that option would be valuable, but you might not be convinced to allow it in <strong>your</strong> game. Let&#8217;s take a look at some reasons why not:</p>
<h3>Why NOT allow Windowed-mode:</h3>
<p><strong>It&#8217;s hard to code.</strong> Oh no, now all of your video code has two scenarios to account for! Well, actually, no it doesn&#8217;t. Once you&#8217;ve initialised Direct3D correctly, none of your other code even needs to *know* it&#8217;s drawing to a windowed area of the desktop. And initialising Direct3D to support either Windowed or Fullscreen mode is <strong>easy</strong>! I&#8217;ll bet you $5 that the sum total of video code required to support this option is LESS than the amount of code required to present the option to the user and store the result.</p>
<p><strong>Fullscreen is more atmospheric. Atmosphere is important in my game!</strong> By all means then, make fullscreen the default. Plenty of games do. I&#8217;m just asking for the <strong>option!</strong></p>
<p><strong>But I want to retain control.</strong> Fuck off! The user is in control: it&#8217;s their computer. Besides, if the user really wants to window you, they can do it: they can fire up a virtual machine and lock you inside it: good luck getting into fullscreen mode then. Of course, if it&#8217;s that important to them, they&#8217;re more likely to just uninstall you and go play something with a windowed option.</p>
<p>And there you have it. Why I believe every game should support Windowed-mode!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=141</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paying your Windows Taxes</title>
		<link>http://www.paradicesoftware.com/blog/?p=123</link>
		<comments>http://www.paradicesoftware.com/blog/?p=123#comments</comments>
		<pubDate>Wed, 11 Nov 2009 05:09:57 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Game Golden Rules]]></category>
		<category><![CDATA[Taxes]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.paradicesoftware.com/blog/?p=123</guid>
		<description><![CDATA[In Windows (like every operating system), when you&#8217;re writing an application or game there are certain things that your application is responsible for handling: some of them are easy, some of them take a little bit more effort. On his excellent blog, Microsoft&#8217;s Raymond Chen calls these responsibilities &#8220;Taxes&#8221;, and there are good reasons why [...]]]></description>
			<content:encoded><![CDATA[<p>In Windows (like every operating system), when you&#8217;re writing an application or game there are certain things that your application is responsible for handling: some of them are easy, some of them take a little bit more effort. On his excellent blog, Microsoft&#8217;s <a href="http://blogs.msdn.com/oldnewthing/archive/2005/08/22/454487.aspx">Raymond Chen</a> calls these responsibilities &#8220;Taxes&#8221;, and there are good reasons why you should pay them. Windows taxes include things like:</p>
<ul>
<li>Respond to Windows messages correctly</li>
<li>Respect user action (don&#8217;t silently cancel a Sleep request)</li>
<li>Non-standard installs (don&#8217;t assume C:\Windows!)</li>
<li>Run fine as a Standard User</li>
<li>Respect the user&#8217;s settings</li>
</ul>
<p>Raymond talks about more complex taxes too (internationalisation, heirarchical file systems), but I&#8217;m sticking to what I&#8217;m comfortable with!</p>
<p>Unfortunately, amongst all applications, games appear to be the worst at being good Windows citizens, there are far too many games out there (not just freeware ones either) that don&#8217;t pay <strong>any</strong> of the above taxes, and (to sustain the metaphor) some start trying &#8216;tax-fraud&#8217; schemes like:</p>
<ul>
<li>Trying to disable Alt-Tab</li>
<li>Refusing to be minimised (automatically restoring themselves after 1 sec)</li>
<li>Preventing the system from shutting down</li>
</ul>
<p>I might make this another series because there&#8217;s plenty to talk about, and most of it&#8217;s not even that difficult these days: you just have to be aware of the situation, and what the correct behaviour is. (I must admit I never gave thought to multi-monitor situations before I got my second monitor).</p>
<p>For now though, I will limit myself to a list of ten &#8216;golden rules&#8217; which I believe all games should obey, at a minimum (not all of them are Windows taxes &#8211; some of them are just treating your users properly). In fact I will expand on some of these in later posts too, because they&#8217;re worth talking about.</p>
<h3>Top ten Golden rules for Games: being a good Windows application</h3>
<ol>
<li>1. Fullscreen games: <strong>always</strong> allow an option to run in a Window.</li>
<li>2. Provide gamma and volume controls, and separate music from sound.</li>
<li>3. Always allow your game to be paused, saved and quit. At any time.</li>
<li>4. Provide a way to skip <strong>anything</strong> non-interactive: from cutscenes to credits.</li>
<li>5. Respect multi-monitor: If you were dragged to monitor 2, next time open on monitor 2.</li>
<li>6. Respect the filesystem: don&#8217;t open files in Read/Write mode if you only want to read from them.</li>
<li>7. Respect security: A game <strong>does not</strong> need an Administrator account to play!</li>
<li>8. Respect UI settings: if the user has selected &#8216;Use Large Fonts&#8217; in Windows, use larger fonts in your game!</li>
<li>9. Respect sessions: if the user logs off/hibernates/shuts down, handle it gracefully. Don&#8217;t try to block the action, and don&#8217;t lose their progress.</li>
<li>10. Adapt to a changing system: if you last opened on 1680&#215;1050, but the system now says the monitor can&#8217;t support that, open in a res it <strong>can</strong> support.</li>
</ol>
<p>I&#8217;ll talk about how to implement some of these (and why they&#8217;re so important) in future posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paradicesoftware.com/blog/?feed=rss2&#038;p=123</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

