<?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>University of Toronto Game Design &#38; Development Club</title>
	<atom:link href="http://www.utgddc.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.utgddc.com</link>
	<description>formerly U of T Game Programming Club</description>
	<lastBuildDate>Wed, 16 May 2012 14:38:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>TOJam 7 Games are being posted!</title>
		<link>http://www.utgddc.com/2012/05/16/tojam-7-games-are-being-posted/</link>
		<comments>http://www.utgddc.com/2012/05/16/tojam-7-games-are-being-posted/#comments</comments>
		<pubDate>Wed, 16 May 2012 14:38:35 +0000</pubDate>
		<dc:creator>Francesco</dc:creator>
				<category><![CDATA[Game Club Announcements]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1644</guid>
		<description><![CDATA[More Games Coming! Also Games will Be updated as updates happen! Cartalotta: Strings of Fate &#160;]]></description>
			<content:encoded><![CDATA[<p>More Games Coming! Also Games will Be updated as updates happen!</p>
<p><a href="http://www.utgddc.com/TOJam7games/Cartalotta.zip">Cartalotta: Strings of Fate</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2012/05/16/tojam-7-games-are-being-posted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next meeting at Bahen Centre BA4010, March 29, 5-7pm</title>
		<link>http://www.utgddc.com/2012/03/27/next-meeting-at-bahen-centre-ba4010-march-22-5-7pm-2/</link>
		<comments>http://www.utgddc.com/2012/03/27/next-meeting-at-bahen-centre-ba4010-march-22-5-7pm-2/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 23:04:37 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Archived Posts]]></category>
		<category><![CDATA[Meeting Announcements]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1636</guid>
		<description><![CDATA[The final judging for GMD 2012 has finally been completed and we are ready to announce the winners of this year&#8217;s competition! We will be announcing the winners of this competition and handing out prizes at this week&#8217;s meeting so if you are interested in finding out how your game performed, please don&#8217;t miss it!]]></description>
			<content:encoded><![CDATA[<p>The final judging for GMD 2012 has finally been completed and we are ready to announce the winners of this year&#8217;s competition! We will be announcing the winners of this competition and handing out prizes at this week&#8217;s meeting so if you are interested in finding out how your game performed, please don&#8217;t miss it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2012/03/27/next-meeting-at-bahen-centre-ba4010-march-22-5-7pm-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next meeting at Bahen Centre BA4010, March 22, 5-7pm</title>
		<link>http://www.utgddc.com/2012/03/20/next-meeting-at-bahen-centre-ba4010-march-22-5-7pm/</link>
		<comments>http://www.utgddc.com/2012/03/20/next-meeting-at-bahen-centre-ba4010-march-22-5-7pm/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 04:36:34 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Meeting Announcements]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1630</guid>
		<description><![CDATA[This week, we will be meeting at our old location BA4010 on March 22, 5-7pm. We hope to see you all there!]]></description>
			<content:encoded><![CDATA[<p>This week, we will be meeting at our old location BA4010 on March 22, 5-7pm. We hope to see you all there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2012/03/20/next-meeting-at-bahen-centre-ba4010-march-22-5-7pm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next meeting at Bahen Centre BA4010, March 15, 5-7pm</title>
		<link>http://www.utgddc.com/2012/03/14/next-meeting-at-bahen-centre-ba4010-march-15-5-7pm/</link>
		<comments>http://www.utgddc.com/2012/03/14/next-meeting-at-bahen-centre-ba4010-march-15-5-7pm/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 23:19:43 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Archived Posts]]></category>
		<category><![CDATA[Meeting Announcements]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1623</guid>
		<description><![CDATA[After going through GMD, many of you may have experienced how difficult it can be to translate a brilliant idea into a fun game. Often, brilliant ideas don&#8217;t seem to work until it goes through multiple rounds of testing and iteration. This week, we will be discussing play testing in game development at BA4010 on March [...]]]></description>
			<content:encoded><![CDATA[<div>After going through GMD, many of you may have experienced how difficult it can be to translate a brilliant idea into a fun game. Often, brilliant ideas don&#8217;t seem to work until it goes through multiple rounds of testing and iteration. This week, we will be discussing play testing in game development at <strong>BA4010 on March 15, 5-7pm</strong>. This will be an opportunity for you to share your first hand experiences with the frustrations that you had in creating a satisfactory product.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2012/03/14/next-meeting-at-bahen-centre-ba4010-march-15-5-7pm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next meeting on Feb 9 from 5-7pm in BA B026</title>
		<link>http://www.utgddc.com/2012/01/18/next-meeting-on-jan-19-from-5-7pm/</link>
		<comments>http://www.utgddc.com/2012/01/18/next-meeting-on-jan-19-from-5-7pm/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 04:46:50 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Archived Posts]]></category>
		<category><![CDATA[Meeting Announcements]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1601</guid>
		<description><![CDATA[A Visit from Ubisoft.]]></description>
			<content:encoded><![CDATA[<p>This week, we have a special treat for you all. As many of you may know,<br />
Ubisoft is one of the world&#8217;s largest and most successful publishers. As<br />
the company behind titles such as Prince of Persia, Splinter Cell, and<br />
Assassin&#8217;s Creed; this gaming giant has been a key contributor to shaping<br />
the industry. During this week&#8217;s meeting, we will be having a<br />
representative from Ubisoft visit our club and it will be an excellent<br />
opportunity for everyone to get a glimpse of what being a pioneer of the<br />
gaming industry means.</p>
<p>See you all on Thursday!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2012/01/18/next-meeting-on-jan-19-from-5-7pm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GMD 2012 EXTENDED to January 19</title>
		<link>http://www.utgddc.com/2011/11/28/gmd-2012-forms-now-online/</link>
		<comments>http://www.utgddc.com/2011/11/28/gmd-2012-forms-now-online/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 05:41:24 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Featured Posts]]></category>
		<category><![CDATA[Game Club Announcements]]></category>
		<category><![CDATA[GMD]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1583</guid>
		<description><![CDATA[The submission deadline for GMD 2012 has been extended to Thursday, January 19, so keep up that videogame development!]]></description>
			<content:encoded><![CDATA[<p>As many of you already know by now, our GMD 2012 competition has begun and the theme for this year&#8217;s competition is &#8220;Murder Mildly Foul&#8221;.</p>
<p>The submission deadline for GMD 2012 has been extended to Thursday January 19!  That&#8217;s more time to fix up your games so be sure to submit whatever you&#8217;ve got by the new submission deadline, even if you&#8217;re not terribly satisfied with it, for an excellent chance to win a prize (usually every videogame submitted will win something).</p>
<p>We were accepting <a title="GMD 2012" href="http://www.utgddc.com/gmd/">GMD 2012 sign-up forms</a> until the beginning of January, but you can still download these forms from our website if you need to for whatever reason.  As previously mentioned, the theme for GMD 2012 is &#8220;Murder Mildly Foul&#8221;</p>
<p>Feel free to email us at <a href="mailto:gmd@utgddc.com">gmd@utgddc.com</a> if you have any other questions about GMD 2012.</p>
<p>Good luck, game developers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2011/11/28/gmd-2012-forms-now-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game Night on Friday Nov 11</title>
		<link>http://www.utgddc.com/2011/11/11/game-night-on-friday-nov-11/</link>
		<comments>http://www.utgddc.com/2011/11/11/game-night-on-friday-nov-11/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 07:50:10 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Archived Posts]]></category>
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1561</guid>
		<description><![CDATA[For one night only... per semester.]]></description>
			<content:encoded><![CDATA[<p>At U of T&#8217;s Bahen Center (the same place where we hold our weekly meetings) the CSSU presents <a href="http://cssu.cdf.toronto.edu/?p=682" title="CSSU Game Night" target="_blank">Game Night</a> on Friday November 11 starting at 7pm and going on all night until 7am (think clubbing for nerds).  There will be lots of cool free gaming sessions and tournaments going with games like Left 4 Dead 2, Starcraft, Street Fighter, and others.  </p>
<p>The CSSU is also still interested in those who would like to volunteer to help setup and lend gaming consoles and computers for the evening.  So, if you&#8217;d like to help contribute to the fun, email the CSSU and have a chance to win a prize for your efforts.  More information about this can be found on the <a href="http://cssu.cdf.toronto.edu/?p=682" title="CSSU Game Night" target="_blank">CSSU&#8217;s webpage about Game Night</a>.  </p>
<p>So come on down and give yourself the fun you deserve at Game Night.  Even the utGDDC Arcade cabinet that fellow member Tyler has finished will be making an appearance.</p>
<p><a href="http://www.utgddc.com/wp-content/uploads/2011/11/cabinet.jpg"><img src="http://www.utgddc.com/wp-content/uploads/2011/11/cabinet-224x300.jpg" alt="" title="cabinet" width="224" height="300" class="aligncenter size-medium wp-image-1562" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2011/11/11/game-night-on-friday-nov-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Behind Lucky Shot Part 2 of 2 &#8211; Sharp Wit?</title>
		<link>http://www.utgddc.com/2011/11/06/behind-lucky-shot-part-2-of-2-sharp-wit/</link>
		<comments>http://www.utgddc.com/2011/11/06/behind-lucky-shot-part-2-of-2-sharp-wit/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 05:00:04 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Archived Posts]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1537</guid>
		<description><![CDATA[Last time, I showed you the simple but effective physics system that powered Lucky Shot. By the end of the article, we had a smooth, adjustable, and flexible movement system that we could apply to each of the AI enemies. I also mentioned that the physics system took care of most of the natural-feeling movement [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.utgddc.com/2011/10/30/behind-lucky-shot-part-1-of-2-smooth-moves/">Last time</a>, I showed you the simple but effective physics system that powered <a href="http://www.utgddc.com/GMD2011/luckyshot/">Lucky Shot</a>. By the end of the article, we had a smooth, adjustable, and flexible movement system that we could apply to each of the AI enemies. I also mentioned that the physics system took care of most of the natural-feeling movement of the game&#8217;s enemies, and that the underlying AI was comparatively simple. This is what I&#8217;ll be showing you in this article — how the physics and AI worked in tandem.</p>
<p><span id="more-1537"></span></p>
<p>By the end of the last article, we had a physics system in which we could change the following aspects:</p>
<ul>
<li>The <strong>base acceleration</strong>, which, when increased, caused the enemy to move and accelerate faster,</li>
<li>The <strong>angle</strong> at which the enemy is accelerating, and</li>
<li>The <strong>coefficient of friction</strong> which determines how long it takes for the enemy to come to a stop, and also factors in to the enemy&#8217;s top speed.</li>
</ul>
<p>In order to keep all the enemies moving with a similar &#8220;feel&#8221;, I kept the coefficient of friction identical for every enemy, as well as the player. If I wanted to, for example, have some enemies look like they&#8217;re gliding on ice, while others start and stop instantly, I could change this.</p>
<p>The base acceleration differs from enemy to enemy, but is kept constant for all enemies of that type, at all times. This also means the enemies never come to a stop.</p>
<p>Thus, the only thing that is changed dynamically by the AI is the <strong>angle</strong> at which the enemies accelerate. This is the parameter that all the AI logic goes into — it only changes <em>where the enemy is supposed to go</em>. This is decided using a couple of very simple rules, but the way this is decided is different from enemy to enemy, and results in very different behaviour.</p>
<p>Let&#8217;s take a look at the different types of enemies we have. Lucky Shot only has three types of enemies. They&#8217;re never given official names in-game, but I like to call them <strong>drifters</strong>, <strong>dodgers</strong>, and <strong>shooters</strong>.</p>
<ul>
<li><strong>Drifters</strong> are the simplest and easiest enemy. All they do is chase you. That&#8217;s it.</li>
<li><strong>Dodgers</strong> chase you as well, but the moment you start shooting at them they scurry away from your bullets.</li>
<li><strong>Shooters</strong> are different in that they can shoot back. To take advantage of this, they keep their distance from you, circling you at a safe distance — not too far, not too close.</li>
</ul>
<p>Let&#8217;s look at each of these in turn.</p>
<hr />
<h2>Drifter</h2>
<p style="text-align: center;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Lucky-Shot-Drifters-Only_1928140154"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.utgddc.com/wp-content/uploads/2011/11/Lucky-Shot-Drifters-Only.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.utgddc.com/wp-content/uploads/2011/11/Lucky-Shot-Drifters-Only.swf"
			name="fm_Lucky-Shot-Drifters-Only_1928140154"
			width="500"
			height="500">
	<!--<![endif]-->
		
<p style="text-align: center;"><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p style="text-align: center;">
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><em><br />
<em>Click above to play! Use the WASD or arrow keys to move, and click to fire.<br />
Both you and the enemies are invincible.</em></em></p>
<p>The drifter is the simplest of the enemies. Their acceleration is always kept in the direction of the player. That&#8217;s the extent of their behaviour.</p>
<p>Well, almost. There&#8217;s a slight problem with that: if all of the enemies simply kept their acceleration pointed exactly towards the player at all times, as the player dodged and weaved around them, their paths would end up converging, and you&#8217;d get all the drifters overlapping in one big clump. To prevent this problem, I add a bit of noise to their motion — instead of accelerating directly at the player, they accelerate in the player&#8217;s direction, plus or minus up to 90°. That may seem like a lot, but remember that we&#8217;re dealing with acceleration rather than velocity. On average, they&#8217;re accelerating towards the player, and that means that their velocity is always going to be roughly towards the player as well. The overall effect of this is that the drifter takes a slightly wobbly path towards the player, and when you have several of them on screen, each of them heads in a slightly different path, keeping them from overlapping too much. This strategy is employed to varying degrees in all of the later enemies.</p>
<hr />
<h2>Dodger</h2>
<p style="text-align: center;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Lucky-Shot-Dodgers-Only_370561225"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.utgddc.com/wp-content/uploads/2011/11/Lucky-Shot-Dodgers-Only.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.utgddc.com/wp-content/uploads/2011/11/Lucky-Shot-Dodgers-Only.swf"
			name="fm_Lucky-Shot-Dodgers-Only_370561225"
			width="500"
			height="500">
	<!--<![endif]-->
		
<p style="text-align: center;"><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p style="text-align: center;">
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<em>Click above to play! Use the WASD or arrow keys to move, and click to fire.<br />
Both you and the enemies are invincible.</em></p>
<p>If you&#8217;re not firing at it, the dodger acts identically to the drifter, with a few minor differences. It has a slightly higher base acceleration than the drifter, and a slightly smaller range of movement noise — it points itself in the player&#8217;s direction, plus or minus up to 65°. This means it&#8217;s both faster and travels in more of a straight line than the drifter.</p>
<p>The big difference, of course, comes when you fire at it — it flees from bullets, hence the name. This is probably the most complex of the AI behaviours, and it&#8217;s a bit rough around the edges — you may notice that they get confused if there&#8217;s a lot of bullets around them on all sides, and they sometimes travel <em>into</em> the stream of bullets rather than away from it. But for the purposes of the game, it works well enough.</p>
<p>First off, they&#8217;re not actually dodging the entire stream of bullets. They&#8217;re dodging only one bullet, the one that&#8217;s closest to them. Each frame, they look for the closest bullet to them, check the distance between themselves and the closest bullet, and depending on how close it is, they move themselves away. If the nearest bullet is all the way across the screen from them, they head towards the player as usual. As the bullet gets closer and closer, they turn further and further away from the player, until, if the bullet is right on them, they head 90° to the player, away from the bullet. By comparing the angle between them and the player, and the angle between them and the bullet, they can decide whether to dodge in a clockwise or counter-clockwise direction.</p>
<div id="attachment_402" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.utgddc.com/wp-content/uploads/2011/11/Dodger-AI.png"><img class="size-full wp-image-402 " src="http://www.utgddc.com/wp-content/uploads/2011/11/Dodger-AI.png" alt="" width="320" height="182" /></a><p class="wp-caption-text">How the dodger decides which way to run from bullets</p></div>
<p>How far they turn away from the player is determined by the following formula:</p>
<p><strong><img src='http://s.wordpress.com/latex.php?latex=%5Ctheta_%7Bo%7D%20%3D%20%281%20-%20D%2FS%29%20%2A%2090%5E%7B%5Ccirc%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\theta_{o} = (1 - D/S) * 90^{\circ}' title='\theta_{o} = (1 - D/S) * 90^{\circ}' class='latex' /></strong></p>
<p>Where <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta_%7Bo%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\theta_{o}' title='\theta_{o}' class='latex' /> is the angle the dodger will turn away from the player (ex. 0° is directly towards the player), <img src='http://s.wordpress.com/latex.php?latex=D&#038;bg=T&#038;fg=000000&#038;s=0' alt='D' title='D' class='latex' /> is the distance from the dodger to the closest bullet, and <img src='http://s.wordpress.com/latex.php?latex=S&#038;bg=T&#038;fg=000000&#038;s=0' alt='S' title='S' class='latex' /> is the width of the stage. If you plug in some values, you can see that when the dodger is a stage-width away from the player, it heads straight towards the player, and when the bullet is very close, the dodger will move at close to 90° away from the player.</p>
<p>This works out decently well in practise, even though there are some cases where the behaviour is a little wonky.</p>
<hr />
<h2>Shooter</h2>
<p style="text-align: center;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Lucky-Shot-Shooters-Only_145318847"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.utgddc.com/wp-content/uploads/2011/11/Lucky-Shot-Shooters-Only.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.utgddc.com/wp-content/uploads/2011/11/Lucky-Shot-Shooters-Only.swf"
			name="fm_Lucky-Shot-Shooters-Only_145318847"
			width="500"
			height="500">
	<!--<![endif]-->
		
<p style="text-align: center;"><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p style="text-align: center;">
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<em>Click above to play! Use the WASD or arrow keys to move, and click to fire.<br />
Both you and the enemies are invincible.</em></p>
<p>These guys are the biggest threat in the game. With the ability to shoot at you, they can cause a lot more damage than any of the other enemies. In doing so, they like to keep their distance, making it harder for you to shoot back, especially if you have a short-range gun. They have a slightly higher base acceleration than the dodger, and only have a 60° range of noise added to their acceleration direction (±30° as compared to the dodgers&#8217; ±65° and the drifters&#8217; ±90°).</p>
<p>The key difference in their AI, of course, is that they keep their distance from the player at all times. To do this, I chose to use a simpler system than the dodgers&#8217; AI, similar in nature but less complex. Depending on the distance between them and the player, they change the direction in which they&#8217;re accelerating. If they&#8217;re far from the player, they accelerate directly towards the player. A bit closer, and they accelerate at 45° to the player&#8217;s direction. At a neutral distance, they orbit the player, accelerating at 90° to the player&#8217;s direction. Any closer than that, and they move away, first at a 45° angle, and at a very close distance, directly away. Each of these is hard-coded into the shooters&#8217; behaviour.</p>
<div id="attachment_403" class="wp-caption aligncenter" style="width: 451px"><a href="http://www.utgddc.com/wp-content/uploads/2011/11/Shooter-Circles.png"><img class="size-full wp-image-403 " src="http://www.utgddc.com/wp-content/uploads/2011/11/Shooter-Circles.png" alt="" width="441" height="441" /></a><p class="wp-caption-text">The shooters&#39; behaviour is all hard-coded, based on the distance between itself and the player.</p></div>
<p>This works quite well, and has the advantage of being a lot simpler than the dodgers&#8217; movement system. The simplicity also means that it&#8217;s easier to tweak — if I wanted them to orbit the player at a closer distance, or have a wider range of distances at which it would be happy to orbit, it&#8217;s as simple as changing a few constants. And because we only change the acceleration rather than velocity, you don&#8217;t see an abrupt change in direction when they hit the boundaries.</p>
<p>There&#8217;s one thing left in their movement AI, and that&#8217;s deciding which direction they&#8217;ll be orbiting the player. To do this, I had three options — have them orbit clockwise, have them orbit counterclockwise, or have them choose between the two randomly when they&#8217;re spawned. I chose all three options. I had those three options coded in, and chose between them based on what fit the level best. Even in the above flash demo, if you refresh a couple of times, you&#8217;ll notice that one of them is always orbiting clockwise, one always counterclockwise, and the last chooses one or the other randomly.</p>
<p>The very last thing handled by the AI is the direction in which they&#8217;ll be shooting. This is simple — their guns are pointed directly at the player, but have a spread of ±15°. Because enemies with perfect aim are cheap and boring.</p>
<hr />
<h2>The Final Word</h2>
<p>What I wanted to show here is that you don&#8217;t have to have a fancy, strategizing, A* pathfinding, neural network creating AI to create fun behaviours for your game. Especially in a time-limited competition like <a href="http://gmd.utgddc.com/2011/">GMD</a>, simple AI is often best. But if you fake it well enough, your enemies can seem appropriately intelligent while still keeping that simplicity of implementation.</p>
<p>As always, I encourage you to <a href="mailto:gabriel@kronopath.net">email me</a> or post a comment below if you have questions or comments. Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2011/11/06/behind-lucky-shot-part-2-of-2-sharp-wit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Behind Lucky Shot Part 1 of 2 &#8211; Smooth Moves</title>
		<link>http://www.utgddc.com/2011/10/30/behind-lucky-shot-part-1-of-2-smooth-moves/</link>
		<comments>http://www.utgddc.com/2011/10/30/behind-lucky-shot-part-1-of-2-smooth-moves/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 05:00:00 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1518</guid>
		<description><![CDATA[A while back, I posted a postmortem for my game, Lucky Shot. In it, I mentioned that one of the aspects that was most well-received was the AI. I myself found this amusing — while it was a good system, it was incredibly simple, only a small step above the enemies you see in a [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I posted a <a href="http://www.utgddc.com/2011/10/23/lucky-shot-postmortem/">postmortem</a> for my game, <a href="http://www.utgddc.com/GMD2011/luckyshot/">Lucky Shot</a>. In it, I mentioned that one of the aspects that was most well-received was the AI. I myself found this amusing — while it was a good system, it was incredibly simple, only a small step above the enemies you see in a game like Super Mario Bros. So how did the enemies move so smoothly? A lot of it has to do with the movement system, and that&#8217;s what I&#8217;m going to cover in this article.</p>
<p>Before I get started, though, I&#8217;d just like to say that this likely won&#8217;t be anything new to anyone who&#8217;s programmed a physics system in a game before — in fact, if you have, you will likely see this as overly basic. And it is. This is meant more as a beginner&#8217;s introduction and as a showcase on how some very simple ideas can lead to some very nice behaviour. It does, however, require some knowledge of high-school level math and physics.</p>
<p><span id="more-1518"></span></p>
<p>The development of Lucky Shot started well before the <a href="http://gmd.utgddc.com/2011/">competition</a> even started — the fundamentals of its physics and movement had been developed earlier, while I was playing around with top-down-shooter-style movement and learning Actionscript 3. I came up with the movement system when I was playing around with creating a top-down shooter-style game based on the Doppler effect. The mechanic itself turned out not to be that fun, so I never continued with it, but the simple ideas behind its movement system has powered nearly every game I&#8217;ve made to date.</p>
<p>In order to best understand how it works, I&#8217;m going to lead you through the same thought and discovery process that I went through when coming up with this. In the beginning, I had just started playing around with Actionscript 3, so I started out by moving a circle around the screen in what is probably the most basic way possible: every frame, the game would check whether the arrow or WASD keys were held down, and if so, it would add or subtract a constant value from the circle&#8217;s x and y position as needed. (I called this constant value the circle&#8217;s <em>base speed</em>.) This gave me something like this:</p>
<p style="text-align: center;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Test-Keyboard-Control_832899817"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.utgddc.com/wp-content/uploads/2011/10/Test-Keyboard-Control.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.utgddc.com/wp-content/uploads/2011/10/Test-Keyboard-Control.swf"
			name="fm_Test-Keyboard-Control_832899817"
			width="500"
			height="500">
	<!--<![endif]-->
		
<p style="text-align: center;"><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p style="text-align: center;">
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<em>Click above and use the WASD or arrow keys to move around!</em></p>
<p>This is a start, and for a simple game this might even be good enough. But there are some obvious problems with it:</p>
<ol>
<li>You move at a constant speed.</li>
<li>You stop moving as soon as you let go of the key.</li>
<li>Moving diagonally is faster than moving purely horizontally or vertically.</li>
</ol>
<p>Points 1 and 2 can be summarized in two words: no inertia. So let&#8217;s try a different approach: instead of adding a constant amount to the player&#8217;s <strong>position</strong> every frame, let&#8217;s try adding a constant amount to the player&#8217;s <strong>velocity</strong>, with a cap on the velocity to ensure the player doesn&#8217;t rocket off at ridiculous speeds. This means that the arrow keys would control the direction the player <em>accelerated</em> rather than the direction the player <em>went</em>. This strategy gave me this:</p>
<p style="text-align: center;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Accelerated-Movement_1271857456"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.utgddc.com/wp-content/uploads/2011/10/Accelerated-Movement.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.utgddc.com/wp-content/uploads/2011/10/Accelerated-Movement.swf"
			name="fm_Accelerated-Movement_1271857456"
			width="500"
			height="500">
	<!--<![endif]-->
		
<p style="text-align: center;"><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p style="text-align: center;">
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<em>Click above and use the WASD or arrow keys to move around!</em></p>
<p>You&#8217;ll notice also that I added a bit of functionality to bounce the player off the walls. This is as simple as inverting the player&#8217;s x or y speed once the player is out of bounds.</p>
<p>This is much better already. Now when we press a direction, we&#8217;ll accelerate in that direction, and it feels much more smooth. But there are still some problems with this:</p>
<ol>
<li>When you let go of the keys, you never slow down — you&#8217;ll keep moving and bouncing forever.</li>
<li>You accelerate faster diagonally than you do purely horizontally and vertically.</li>
</ol>
<p>Let&#8217;s look at the first problem. Again this can be summarized in two words: no friction. Let&#8217;s add some simple friction.</p>
<p>The version of friction I implemented was inspired by the concept of <a href="http://en.wikipedia.org/wiki/Terminal_velocity">terminal velocity</a>. When an object is falling in air, that air applies a frictional force to it in the opposite direction of movement. This frictional force is proportional to the object&#8217;s velocity, so as the object falls, it gets faster, causing the friction to increase, which in turn causes it to accelerate at a <em>slower rate</em>. Eventually you reach a point where the air friction balances out the force of gravity, and the object&#8217;s speed stops increasing.</p>
<p style="text-align: center;"><a href="http://www.utgddc.com/wp-content/uploads/2011/10/Terminal-Velocity.png"><img class="aligncenter size-full wp-image-228" title="Terminal Velocity" src="http://www.utgddc.com/wp-content/uploads/2011/10/Terminal-Velocity.png" alt="" width="238" height="297" /></a></p>
<p>In my implementation of this, we don&#8217;t deal with forces, nor with gravity. Instead of dealing with forces, we can deal with accelerations instead. And instead of gravity, we have an acceleration imparted by keys that the player is pressing, or in the computer-controlled enemies, the AI&#8217;s logic.</p>
<p>The first thing we do is figure out the acceleration for the object, which is a constant value (which I call the <em>base acceleration</em>), but may be in a variety of different directions (more on that below). Then, we calculate deceleration due to friction <img src='http://s.wordpress.com/latex.php?latex=f&#038;bg=T&#038;fg=000000&#038;s=0' alt='f' title='f' class='latex' />, which is the object&#8217;s velocity <img src='http://s.wordpress.com/latex.php?latex=v&#038;bg=T&#038;fg=000000&#038;s=0' alt='v' title='v' class='latex' /> multiplied by a <em>friction coefficient</em> <img src='http://s.wordpress.com/latex.php?latex=%5Cmu&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu' title='\mu' class='latex' />, which is a number in the range of about 0.05 &#8211; 0.1, depending on how much friction you want to give the object.</p>
<p><strong><img src='http://s.wordpress.com/latex.php?latex=f%20%3D%20%5Cmu%20v&#038;bg=T&#038;fg=000000&#038;s=0' alt='f = \mu v' title='f = \mu v' class='latex' /></strong></p>
<p>The deceleration due to friction <img src='http://s.wordpress.com/latex.php?latex=f&#038;bg=T&#038;fg=000000&#038;s=0' alt='f' title='f' class='latex' /> is then subtracted from the object&#8217;s acceleration, and that acceleration is added to the object&#8217;s speed. The second-last thing we do is compare the object&#8217;s speed to a very small value — about 0.01 — and set it to 0 if it&#8217;s below that. This is needed because with this implementation of friction, the object&#8217;s velocity never actually reaches 0, it just gets very very close to it. This causes a bit of &#8220;drift&#8221; when the object slows to a halt, where it keeps moving by a fraction of a pixel each frame.</p>
<p>The last thing we do, of course, is add that speed to the object&#8217;s position.</p>
<p>We can tweak the motion of the object by changing the constant base acceleration <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=T&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' /> and the friction coefficient <img src='http://s.wordpress.com/latex.php?latex=%5Cmu&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu' title='\mu' class='latex' />. The bigger we make <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=T&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' />, the faster the object will accelerate. The bigger we make <img src='http://s.wordpress.com/latex.php?latex=%5Cmu&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu' title='\mu' class='latex' />, the slower the object will move, and the faster it will come to a halt. The object&#8217;s maximum or terminal velocity is the point at which these two balance out: <img src='http://s.wordpress.com/latex.php?latex=%5Cfrac%7BA%7D%7B%5Cmu%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\frac{A}{\mu}' title='\frac{A}{\mu}' class='latex' />. If you want the object to feel like it&#8217;s sliding on ice, you can decrease both <img src='http://s.wordpress.com/latex.php?latex=%5Cmu&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu' title='\mu' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=T&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' />. If you want the object to stop and start instantly (similar to the movement in the first flash demo), you can increase both <img src='http://s.wordpress.com/latex.php?latex=%5Cmu&#038;bg=T&#038;fg=000000&#038;s=0' alt='\mu' title='\mu' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=T&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' />. And as long as you keep the ratio between the two the same, the object will always move at the same speed.</p>
<p>So now we have friction. You no longer bounce infinitely off the walls, and turning is made a lot easier. There&#8217;s just one last issue to address, and that&#8217;s the increased acceleration when going on a diagonal. To fix this, we need a tiny bit of trigonometry.</p>
<p style="text-align: center;"><a href="http://www.utgddc.com/wp-content/uploads/2011/10/Trigonometry.png"><img class="aligncenter size-full wp-image-254" title="Trigonometry" src="http://www.utgddc.com/wp-content/uploads/2011/10/Trigonometry.png" alt="" width="286" height="177" /></a></p>
<p>Say you want your little dude to go at an arbitrary angle<em></em> <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=T&#038;fg=000000&#038;s=0' alt='\theta' title='\theta' class='latex' />, but you want to keep his base acceleration as <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=T&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' />. That is, no matter which direction he&#8217;s going, his total acceleration should always be <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=T&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' />. To use this in the code, we need to break this down to its x and y components, which I&#8217;ll call <img src='http://s.wordpress.com/latex.php?latex=a_%7Bx%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_{x}' title='a_{x}' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=a_%7By%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_{y}' title='a_{y}' class='latex' />. This is as simple as doing this:<strong></strong></p>
<p><strong><img src='http://s.wordpress.com/latex.php?latex=a_%7Bx%7D%20%3D%20A%5Ccos%7B%5Ctheta%7D%5C%5C%2Aa_%7By%7D%20%3D%20A%5Csin%7B%5Ctheta%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='a_{x} = A\cos{\theta}\\*a_{y} = A\sin{\theta}' title='a_{x} = A\cos{\theta}\\*a_{y} = A\sin{\theta}' class='latex' /></strong></p>
<p>Plug in whatever angle you want for <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=T&#038;fg=000000&#038;s=0' alt='\theta' title='\theta' class='latex' />, use these as the acceleration values for your x and your y, and you have yourself some smooth movement whose speed and acceleration is independent of the direction you&#8217;re moving. In fact, if you&#8217;re just handling keyboard control — where you have at most 8 directions in which you can move — you can just handle the straight up/down case by just using the base acceleration <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=T&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' />, and the diagonals by adding <img src='http://s.wordpress.com/latex.php?latex=%5Cpm%20A%5Cfrac%7B%5Csqrt%7B2%7D%7D%7B2%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\pm A\frac{\sqrt{2}}{2}' title='\pm A\frac{\sqrt{2}}{2}' class='latex' /> to the x and y values with the sign dictated by the direction (this is the same as <img src='http://s.wordpress.com/latex.php?latex=sin%7B%2845%5E%5Ccirc%29%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='sin{(45^\circ)}' title='sin{(45^\circ)}' class='latex' />).</p>
<p>Now that we have all this set up, let&#8217;s see it in action.</p>
<p style="text-align: center;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Friction-Movement_919068717"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.utgddc.com/wp-content/uploads/2011/10/Friction-Movement.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.utgddc.com/wp-content/uploads/2011/10/Friction-Movement.swf"
			name="fm_Friction-Movement_919068717"
			width="500"
			height="500">
	<!--<![endif]-->
		
<p style="text-align: center;"><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p style="text-align: center;">
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<em>Click above and use the WASD or arrow keys to move around!</em></p>
<p>Wonderful. We now have a movement system that&#8217;s smooth, simple, flexible, and fun in and of itself. But here&#8217;s the dirty secret: this takes care of most of the natural-looking movement you see in this game&#8217;s AI. In part 2, I&#8217;ll show you how this system, along with some very simple rules of movement, created an AI system that was both fun and challenging to players.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2011/10/30/behind-lucky-shot-part-1-of-2-smooth-moves/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lucky Shot Postmortem</title>
		<link>http://www.utgddc.com/2011/10/23/lucky-shot-postmortem/</link>
		<comments>http://www.utgddc.com/2011/10/23/lucky-shot-postmortem/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 23:23:35 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.utgddc.com/?p=1493</guid>
		<description><![CDATA[Hey there folks! For those who don&#8217;t know me, I&#8217;m Gabriel, former VP of the club. You may have seen me popping into meetings fashionably late, coming from my PEY job. This post kicks off a short 3-part series about my GMD game from last year, Lucky Shot. These entries were originally written for my [...]]]></description>
			<content:encoded><![CDATA[<p><em>Hey there folks! For those who don&#8217;t know me, I&#8217;m Gabriel, former VP of the club. You may have seen me popping into meetings fashionably late, coming from my PEY job. This post kicks off a short 3-part series about my GMD game from last year, Lucky Shot. These entries were originally written for my personal blog, <a href="http://kronopath.net/">Kronopath</a>, and the future entries will be thrown up simultaneously on both sites. So now that the pleasantries are out of the way, let&#8217;s get started!</em></p>
<p>During the last GMD, I created a retro-gambling-shooter game, <a href="http://www.utgddc.com/GMD2011/luckyshot/">Lucky Shot</a>. It won the grand prize in the judged competition, ranked fourth in the public showcase, and was generally well-received. And of course, more than anything else, it was a great learning experience.</p>
<p>Last year was actually the first time the club ran the public showcase. We held it during the <a href="http://cssu.cdf.toronto.edu/">Computer Science Student Union</a>&#8216;s game night, and to take full advantage of it, we gave out feedback forms, asking people to rate each game and write a few words about it. I found that the reactions we observed and the feedback we got were even more valuable than the prizes given out. With that in mind, let&#8217;s take a look at how people enjoyed the game.</p>
<p><span id="more-1493"></span></p>
<div id="attachment_218" class="wp-caption aligncenter" style="width: 451px"><a href="http://www.utgddc.com/wp-content/uploads/2011/10/Shooting-+-dodging-AI-is-imba.png"><img class="size-full wp-image-218 " title="Shooting + dodging AI is imba" src="http://www.utgddc.com/wp-content/uploads/2011/10/Shooting-+-dodging-AI-is-imba.png" alt="" width="441" height="281" /></a><p class="wp-caption-text">You can tell who the Starcraft players were.</p></div>
<p>But before we get started, if you haven&#8217;t played the game yet, <a href="http://www.utgddc.com/GMD2011/luckyshot/" target="_blank">go do that now</a>! This article will make a lot more sense if you&#8217;ve played it.</p>
<div id="attachment_83" class="wp-caption aligncenter" style="width: 308px"><a href="http://www.utgddc.com/GMD2011/luckyshot/" target="_blank"><img class="size-medium wp-image-83  " title="Lucky Shot" src="http://www.utgddc.com/wp-content/uploads/2011/10/Lucky-Shot.png" alt="Lucky Shot" width="298" height="300" /></a><p class="wp-caption-text">Click here to play! (Opens in a new window)</p></div>
<p>Back? Ok, let&#8217;s get down to business.</p>
<h2>What worked</h2>
<h4>Slim, bottom-up game design</h4>
<p>This game was based on a very simple idea: a top-down shooter where you gamble for your guns. The gambling element came from the theme for the competition: <em>Don&#8217;t be funky, let&#8217;s get lucky</em>. But in development, instead of starting off with art, or music, or the gambling element, I started off with the very basics — movement, control, shooting, etc. Nothing extraneous was added until closer to the end. I built up a quick, simple, but very good and flexible framework for the game itself in the earlier stages of the competition, and later on I took as much time as I could to polish it, give it a good interface, and cram in as much content as possible (which in my case meant coding up a big variety of guns).</p>
<p>This can be risky for some people, as you can end up getting trapped in refining the framework and run out of time to build an actual game around it. But if you manage it right, and put priority on the actual <em>game</em> parts of your game, you end up with something playable very quickly. This is especially good for GMD, because of the need to balance the competition with school work. It&#8217;s likely that you&#8217;ll end up slammed with assignments or tests near the end of the competition, forcing you to hand in what you have done. If you have a playable game from the early stages, you at least have a chance at doing decently despite it being unfinished.</p>
<h4>Arcade-style gameplay</h4>
<p class="size-medium wp-image-216" title="Public Showcase 2011">This kept the game simple, accessible, and above all else, <em>fun</em>. It would have been nearly impossible to implement a game of calibre similar to an RPG, for example — it just requires far too much content to make it enjoyable. Arcade games can be enjoyable even if they&#8217;re only one level. And in the end, the environment in which they were shown lent itself far better to arcade-style pick-up-and-play gameplay than anything more complex.</p>
<div id="attachment_216" class="wp-caption aligncenter" style="width: 485px"><a href="http://www.utgddc.com/wp-content/uploads/2011/10/Public-Showcase-2011.jpg"><img class="size-full wp-image-216 " title="Public Showcase 2011" src="http://www.utgddc.com/wp-content/uploads/2011/10/Public-Showcase-2011.jpg" alt="" width="475" height="357" /></a><p class="wp-caption-text">Grabbing people&#39;s attention in between games of Counter-Strike.</p></div>
<h4>Slick, simple AI system</h4>
<p>This was one of the most complimented parts of the game, and it amazes me, because it was surprisingly simple to make. I won&#8217;t go into detail on this just yet, but keep your eye on this site, as I&#8217;ll be posting up some articles detailing the AI and physics systems soon.</p>
<h4>Smooth difficulty curve with a high peak</h4>
<p>The idea to make the later levels insanely difficult was inspired by the game <a href="http://gmd.utgddc.com/2010/">Darkest Before the Dawn</a>, made by my friends Francesco Ciarlandini and Sean Lacy for the previous year&#8217;s GMD. In their game, while it starts off relatively slowly, as it goes on it gets more and more difficult until all hell breaks loose near the end. Few people still have beaten that game. What I found, though, was that I kept coming back to it, playing it again and again, until eventually I managed to beat it. Its difficulty made it entertaining despite being relatively slim on content (as all GMD games are). Not only that, but the fact that the game treated me as if I <em>wasn&#8217;t entitled to beat it</em> made me even <em>more</em> determined to win. So I modelled Lucky Shot&#8217;s difficulty curve in a similar way. Most people should be able to get past the first few levels. Few will get past the last couple. And as of yet, I am the only one who has managed to beat the final level (and even I have only ever done it twice).</p>
<p>(As a side note, if you can provide evidence that you&#8217;ve beaten this game to me, I&#8217;ll personally acknowledge you on my blog as the first person to beat Lucky Shot other than its creator. Protip: save your Machine Guns for the last two levels.)</p>
<div id="attachment_203" class="wp-caption aligncenter" style="width: 430px"><a href="http://www.utgddc.com/wp-content/uploads/2011/10/HELL-YES.png"><img class="size-medium wp-image-203 " title="HELL YES!" src="http://www.utgddc.com/wp-content/uploads/2011/10/HELL-YES.png" alt="" width="420" height="420" /></a><p class="wp-caption-text">Doing it right.</p></div>
<p>What was interesting to me was comparing it against Francesco and Sean&#8217;s game from this year, <a href="http://www.utgddc.com/GMD2011/Gamblon777.swf">Gamblon 777</a>. This game was quite fun, managing to just barely beat me out for third place in the public showcase. But it didn&#8217;t have the smooth difficulty curve of the previous game. I noticed that many people would sit down at this game to play it, die within ten seconds, and simply get up and leave. It shows that you need that slow start in order to get people hooked in the first place.</p>
<h4>Gradual introduction of concepts</h4>
<p>Tying in somewhat to the above, it&#8217;s not just the difficulty curve that&#8217;s gradual — it&#8217;s the complexity as well. I had three types of enemies. Each behaved differently from the last, and they had a pretty obvious hierarchy in terms of difficulty. I had to make sure the player wasn&#8217;t confused by them at the beginning.</p>
<p>What I chose to do was introduce every enemy in turn, each in their own levels. Level 1 introduces you to the basic Drifter enemy that chases you. Level 2 is a slightly harder Drifter level. Level 3 introduces you to the Dodger. Level 4 is a slightly harder Dodger level, with a few Drifters thrown in at one point as a surprise. Level 5 introduces you to the Shooters. And so on. It&#8217;s not until the last few levels that they start mixing together in any significant way, and that&#8217;s when the game gets very difficult.</p>
<p>This is the same idea used by games like Portal. You have to deliberately train your players to understand and deal with your gameplay concepts before throwing them into situations where they have to manage several of them at once.</p>
<h4>Minimalist art style</h4>
<p>I&#8217;ll make no bones about it: I am not a good visual artist. This minimalist art style is my way of making something decently visually appealing, functional, and quick to make. And it allowed me more time to work on the game&#8217;s foundation.</p>
<h4>Creative commons resources</h4>
<p>Although I would have <em>loved</em> to have composed and created the music for the game myself, I spent nearly all of my time on the gameplay, making that impossible. I later found myself with an uncomfortably close deadline and no music. I knew I wanted an 8-bit style action-style song to compliment the retro visuals, so I popped open <a href="http://8bc.org/">8bitcollective</a> (where all the songs are licensed under <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/">CC BY-NC-SA</a>), found a song I liked, and threw it in there. And it immediately made the game much more fun. I&#8217;ve always been amazed at how much influence great music can have on a game.</p>
<p>Not to mention that it&#8217;s just <em>so much better</em> than anything I could have come up with myself. <a href="https://8bc.org/music/exileFaker/redshift/">Exilefaker</a>, you are a goddamn genius.</p>
<h2>What could have been done better</h2>
<h4>Clearer instructions and between-level interface</h4>
<p>This was one thing that surprised me. Several of the feedback forms mentioned a need for &#8220;more instructions&#8221;. Initially, I was confused. How hard is it to understand a game where you shoot red things? But then I realized that one of the most complex parts of the game — the between-level gun selection screen — had only minimal instructions on how to use it.</p>
<div id="attachment_210" class="wp-caption aligncenter" style="width: 430px"><a href="http://www.utgddc.com/wp-content/uploads/2011/10/Lucky-Shot-Gun-Select-Screen.png"><img class="size-medium wp-image-210  " title="Lucky Shot Gun Select Screen" src="http://www.utgddc.com/wp-content/uploads/2011/10/Lucky-Shot-Gun-Select-Screen.png" alt="" width="420" height="420" /></a><p class="wp-caption-text">Whoops.</p></div>
<p>Not only that, but people seemed to completely miss things that I had included to make their lives easier. Things like the hints on the bottom-left as to which enemies are coming next, the lives indicator, or even the fact that you could <em>hold down </em>the mouse button to shoot.</p>
<p>To fix this, I could have added, on the first between-level screen, some helpful tips about the interface elements of the screen. A simple bit of text with some arrows pointing to the <em>Gamble</em> and <em>Use</em> buttons, describing each, would go a long way to helping people understand it. Highlighting the hint text and lives count in red would help to make them more apparent. And I guess the people took the words &#8220;Click to shoot&#8221; from the help screen a bit too literally, so it would have been nice to have made that clearer.</p>
<h4>Originality, or lack thereof</h4>
<p>I&#8217;ll be blunt here — this game was heavily inspired by games like <em>Geometry Wars</em>, even down to the enemy types and movements. As such, it doesn&#8217;t really stand out as something new or different, and this is a barrier to grabbing people&#8217;s interest. I expect it would be more interesting if I had had the time to add more gun types — after all, you&#8217;ve never seen Geometry Wars with mines, homing shots, or a nuke before, have you? Which brings me to my next point&#8230;</p>
<h4>More content</h4>
<p>Which in my case would mostly mean <em>more gun types</em>, though it could mean more enemies and levels as well. When I started conceptualizing this game, I had about a page and a half full of ideas for different gun types. The problem is that I ran out of time to implement them. I feel if I had managed my time better I could have done so.</p>
<p>Getting into a bit more detail, the limiting factor here was not actually the gun types themselves — it was the different types of bullets that I would have had to implement. By the end of the project I had exactly one type of bullet — the standard, round, travel-in-a-straight-line type. It was very easy to create new guns that would fire them in different directions, each with a different speed, range, and damage. It would not have been easy to create guns with bullets that curve, orbit, explode, split, penetrate, swarm, or home in on enemies. Some of those would require a new movement system. Some would require a different collision detection system. Some would even need AI. It just wasn&#8217;t feasible to add them given the time frame I found myself in near the end.</p>
<p>But it would have been <em>so damn awesome</em>.</p>
<h2>The final word</h2>
<p>Although there is definite room for improvement, I doubt I&#8217;ll revisit this game anytime soon, with the possible exception of some minor retrofitting to work with the upcoming <a href="https://www.facebook.com/utgddcarcade">UTGDDC arcade cabinet</a>. The game is already good as it is now, and I&#8217;ve been spending my time recently on other projects. Still, this was a great experience. It was the first time since I got into game development in which I felt I had made something I could be proud of.</p>
<p>But in the end, it&#8217;s not my game anymore. It&#8217;s yours now. So <a href="http://www.utgddc.com/GMD2011/luckyshot/" target="_blank">play it</a>, tell your friends, <a href="mailto:gabriel@kronopath.net">send me feedback</a>, and most of all, have fun with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utgddc.com/2011/10/23/lucky-shot-postmortem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

