<?xml version="1.0" encoding="UTF-8"?>
<rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>prototyprally</title>
	
	<link>http://prototyprally.com</link>
	<description>rapid prototyping of games using flash</description>
	<lastBuildDate>Sun, 29 Aug 2010 17:31:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/prototyprally" /><feedburner:info uri="prototyprally" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.0/</creativeCommons:license><item>
		<title>glorg is done</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/ta025QPrq4M/</link>
		<comments>http://prototyprally.com/glorg-is-done/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 09:40:40 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=492</guid>
		<description><![CDATA[The first commit in my subversion repository for glorg was made the 19th of august last year. Back then it was little more than an experiment with random dungeon generation. In december when gamma announced it&#8217;s theme for this year I rejiggered the game to be played with one button. It&#8217;s come a long way [...]]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="570" height="345" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/CsRZ3cBQV9U?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="570" height="345" src="http://www.youtube.com/v/CsRZ3cBQV9U?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<a href="http://prototyprally.com/wp-content/uploads/2010/08/glorg-half.jpg"><img class="alignright size-medium wp-image-505" style="margin-left: 20px; margin-bottom: 10px;" title="glorg" src="http://prototyprally.com/wp-content/uploads/2010/08/glorg-half-209x300.jpg" alt="" width="209" height="300" /></a>The first commit in my subversion repository for glorg was made the 19th of august last year. Back then it was little more than an experiment with random dungeon generation. In december when  <a href="http://www.kokoromi.org/announcements/gamma-4-ever/">gamma announced it&#8217;s theme</a> for this year I rejiggered the game to be played with one button. <a href="http://www.youtube.com/watch?v=Th9GxkPiO34">It&#8217;s come a long way since then</a>, I&#8217;ve added more floors, more enemies and just made it plain better. All that stuff and still <a href="http://prototyprally.com/i-dont-care-about-your-input/">just one button</a>.</p>
<p>Back when <a href="http://prototyprally.com/the-geedeecee/">I was at GDC</a> I met <a href="http://www.dbsoundworks.com/">dannyB</a>, he is the most amazing dude and as through <a href="http://www.supermeatboy.com/29/Best_Musician_Evar_/#b">some kind of spell</a> he really liked the concept of the game. Deals were made, beers were consumed and thus glorg features four soothing melodies to bash enemies over the head to.</p>
<p>I also persuaded my <a href="http://gerezon.se/">good friend and partner in crime Jonas</a> to do a cover for the game in the good old style of &#8220;cover unrelated to actual game&#8221;. I absolutely love this picture to bits.</p>
<p>Now begins the work of finding a sponsor, the game is up on <a href="http://www.flashgamelicense.com/view_game.php?game_id=13299">Flash Game License</a> or if  you so prefer, you can contact me directly by <a href="mailto:m@grapefrukt.com">email</a>.</p>
<p>Update Aug 27: It seems FGL&#8217;s approval queue is pretty backed up at the moment, this took me a bit by surprise,  sadly there&#8217;s not much more to do than wait. Sorry about that.</p>
<p>Update Aug 29: Added FGL link.</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/ta025QPrq4M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/glorg-is-done/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://prototyprally.com/glorg-is-done/</feedburner:origLink></item>
		<item>
		<title>fast as a shark</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/PGPQhUbvtG8/</link>
		<comments>http://prototyprally.com/fast-as-a-shark/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 09:22:19 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=478</guid>
		<description><![CDATA[So, I didn&#8217;t just talk at nomoresweden made a game too. A really bad one. It&#8217;s called fast as a shark, and you can play it below. The whole game, save for some code I had lying around since earlier for the water was made between 1:46 and 1:59 in the timelapse (i&#8217;m the guy [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-482" style="margin-left: 20px;" title="shark" src="http://prototyprally.com/wp-content/uploads/2010/08/shark.png" alt="" width="110" height="110" />So, I didn&#8217;t just <a href="http://prototyprally.com/i-dont-care-about-your-input/">talk </a>at <a href="http://www.nomoresweden.com/">nomoresweden</a> made a game too. A really bad one. It&#8217;s called fast as a shark, and you can play it below.</p>
<p>The whole game, save for some code I had lying around since earlier for the water was made between 1:46 and 1:59 in the timelapse (i&#8217;m the guy in the pink t-shirt).</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_gargantua_258177500"
			class="flashmovie"
			width="570"
			height="428">
	<param name="movie" value="http://grapefrukt.com/games/shark/gargantua.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://grapefrukt.com/games/shark/gargantua.swf"
			name="fm_gargantua_258177500"
			width="570"
			height="428">
	<!--<![endif]-->
		<br />
<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><br />

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="570" height="428" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/AXtGoCR2yGw?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="570" height="428" src="http://www.youtube.com/v/AXtGoCR2yGw?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/PGPQhUbvtG8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/fast-as-a-shark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://prototyprally.com/fast-as-a-shark/</feedburner:origLink></item>
		<item>
		<title>i don’t care about your input</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/uoS2n_UAeQo/</link>
		<comments>http://prototyprally.com/i-dont-care-about-your-input/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 09:59:23 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=473</guid>
		<description><![CDATA[A couple of weeks ago I went to the excellent indie gathering no more sweden. This year we didn&#8217;t only make games, we had talks too, so I figured I&#8217;d try and do one. It&#8217;s about 15 minutes long and features the first public preview of what glorg looks like nowadays. Enjoy! There&#8217;s tons of [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I went to the excellent indie gathering <a href="http://www.nomoresweden.com/">no more sweden</a>. This year we didn&#8217;t only make games, we had talks too, so I figured I&#8217;d try and do one. It&#8217;s about 15 minutes long and features the first public preview of what <a href="http://prototyprally.com/glorg/">glorg </a>looks like nowadays. Enjoy!</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/WYDsQo3ydQA&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/WYDsQo3ydQA&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/IMLpRgQ8dF8&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/IMLpRgQ8dF8&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>There&#8217;s tons of more videos on <a href="http://www.youtube.com/results?search_query=%22no+more+sweden%22&#038;aq=f">youtube</a>.</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/uoS2n_UAeQo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/i-dont-care-about-your-input/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://prototyprally.com/i-dont-care-about-your-input/</feedburner:origLink></item>
		<item>
		<title>making enemies</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/ogYdvonB0rs/</link>
		<comments>http://prototyprally.com/making-enemies/#comments</comments>
		<pubDate>Mon, 17 May 2010 10:54:15 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=470</guid>
		<description><![CDATA[glorg is still progressing nicely, this is a quick little timelapse i did this morning of me making an enemy.]]></description>
			<content:encoded><![CDATA[<p><a href="http://prototyprally.com/glorg/">glorg</a> is still progressing nicely, this is a quick little timelapse i did this morning of me making an enemy. </p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/CIUnqerfuMY&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/CIUnqerfuMY&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/ogYdvonB0rs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/making-enemies/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://prototyprally.com/making-enemies/</feedburner:origLink></item>
		<item>
		<title>circular game of life</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/y2poGNiWaws/</link>
		<comments>http://prototyprally.com/circular-game-of-life/#comments</comments>
		<pubDate>Mon, 03 May 2010 08:37:47 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=458</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_network1_472974936"
			class="flashmovie"
			width="540"
			height="400">
	<param name="movie" value="http://prototyprally.com/wp-content/uploads/2010/05/network1.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://prototyprally.com/wp-content/uploads/2010/05/network1.swf"
			name="fm_network1_472974936"
			width="540"
			height="400">
	<!--<![endif]-->
		[/kml_flashembed] It&#8217;s time for more silly toys! I recreated this from memory of a thing I saw someone demo a at some conference I watched a live stream of. Right now both the author and conference escape me, but if I recall correctly, he i his turn based this [...]]]></description>
			<content:encoded><![CDATA[<p>[kml_flashembed publishmethod="static" fversion="10.0.0" movie="http://prototyprally.com/wp-content/uploads/2010/05/network1.swf" width="540" height="400" targetclass="flashmovie"]<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>
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>It&#8217;s time for more silly toys! I recreated this from memory of a thing I saw someone demo a at some conference I watched a live stream of. Right now both the author and conference escape me, but if I recall correctly, he i his turn based this of some research thing at IBM or something. That&#8217;s really not important. What is important is that this is cool.</p>
<p>In a way it&#8217;s like my <a href="http://prototyprally.com/fungus/">personal favorite</a> <a href="http://en.wikipedia.org/wiki/Conway's_Game_of_Life">Conway&#8217;s Game of Life</a>. But instead of a two dimensional grid, it&#8217;s (almost) one dimensional and directional.</p>
<p><strong>Click any node in the circle to make it go.</strong> Use the spacebar to pause, the arrow keys to step backwards or forwards in time (some information is lost when going backwards) and Z to clear.</p>
<p>This past week the <a href="http://nordicgame.com/">nordic game conference</a> took place in Malmö, I&#8217;ve attended the past two years but decided to skip it this year. However, having a conference in town has benefits even if you&#8217;re not attending. I got to meet <a href="http://www.kloonigames.com/blog/">Petri</a>, the boys from <a href="http://rocketpack.fi/">Rocket Pack</a>, most of the <a href="http://www.copenhagengamecollective.org/">Copenhagen Game Collective</a>, <a href="http://nifflas.ni2.se/">Nifflas</a>, <a href="http://cactusquid.blogspot.com/">Cactus</a>, Mårten from <a href="http://www.piecesinteractive.se/">Pieces Interactive</a>, Daniel and Joel from <a href="http://ludosity.com/">Ludosity</a>. And all it cost me was a whole week&#8217;s worth of productivity down the drain <img src='http://prototyprally.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/y2poGNiWaws" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/circular-game-of-life/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://prototyprally.com/circular-game-of-life/</feedburner:origLink></item>
		<item>
		<title>triangles</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/unjozGxAFhw/</link>
		<comments>http://prototyprally.com/triangles/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 07:40:58 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=450</guid>
		<description><![CDATA[Last week I tried to make a game for the 10-second theme on experimentalgameplay.com. This is what became of it. The first few lines of code on this were written during my short stint at the indie art jam during gdc, back then it just drew colorful triangles all over the screen. However, the actual [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://grapefrukt.com/games/triangles/"><img class="alignnone size-full wp-image-451" title="triangles-screen1" src="http://prototyprally.com/wp-content/uploads/2010/04/triangles-screen1.png" alt="" width="570" height="462" /></a></p>
<p>Last week I tried to make a game for the 10-second theme on <a href="http://experimentalgameplay.com">experimentalgameplay.com</a>.</p>
<p><a href="http://grapefrukt.com/games/triangles/">This is what became of it.</a></p>
<p>The first few lines of code on this were written during my short stint at the <a href="http://adamatomic.com/indieartjam/">indie art jam</a> during gdc, back then it just drew colorful triangles all over the screen. However, the actual game I tried to make didn&#8217;t work at all, and I just ended up sitting and toying with it as a stupid drawing application for a good thirty minutes (incidentally about a quarter of this thing&#8217;s total development time).</p>
<p>So, I declared it a failure as a game (even though I still want to explore the, uh, spatial relations of triangles a bit more) and made it into a drawing app.</p>
<p><strong>To draw you click a triangle and drag to one of it&#8217;s three neighbours, that will copy the color from the first one onto the second. Repeat as needed.</strong></p>
<p>As an added feature it serializes the whole image into a string with every move you make and puts that in the url. This has two benefits, the bigger one being that you can easily send what your stuff to your friends, but it also makes your browsers back and forward buttons act as undo/redo. <a href="http://grapefrukt.com/games/triangles/#/U/GcpEI2AgA=">Here&#8217;s one I made</a>.</p>
<p>It has two twitter buttons in the lower left, one to tweet your creation, the other one searches for other people&#8217;s posts tagged with the <a href="http://twitter.com/#search?q=%23triangles">#triangles</a> hashtag, making sharing a bit easier that it ever was with <a href="http://isotope3.net/">isotope3</a>.</p>
<p>Here are some more amazing pieces of art:</p>
<ul>
<li><a href="http://grapefrukt.com/games/triangles/#/Y2CgAAAA">Blank slate</a></li>
<li><a href="http://grapefrukt.com/games/triangles/#/W8EYtoIxTCOrQRSIuEDsFYxNomDuCoJSAA==">Big plaid</a></li>
<li><a href="http://grapefrukt.com/games/triangles/#/Y1jAxeAgysAApEIYQRSIA6RAHIYFXiAOw4IwEIchAcxhCABzGASAGAA=">The V</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/unjozGxAFhw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/triangles/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://prototyprally.com/triangles/</feedburner:origLink></item>
		<item>
		<title>fighting a short attention span</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/mCVMwL-dAiA/</link>
		<comments>http://prototyprally.com/fighting-a-short-attention-span/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 09:00:06 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=440</guid>
		<description><![CDATA[I&#8217;m easily distracted, or if I can elaborate, I&#8217;d rather say that I can get bored of stuff pretty quickly. This isn&#8217;t the best personality trait to have when you&#8217;re sitting in your office all by your lonesome with yourself as your boss. So I decided to try and keep track of what I spend [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-441" title="goldfish" src="http://prototyprally.com/wp-content/uploads/2010/04/goldfish-150x150.png" alt="" width="105" height="105" />I&#8217;m easily distracted, or if I can elaborate, I&#8217;d rather say that I can get bored of stuff pretty quickly. This isn&#8217;t the best personality trait to have when you&#8217;re sitting in your office all by your lonesome with yourself as your boss.</p>
<p>So I decided to try and keep track of what I spend my time on, because I <em>do</em> have a conscience and I will undoubtedly feel bad about wasting my own time.</p>
<p>Keeping a time sheet quite possibly the most boring thing you can do, but fear not, there&#8217;s a program called <a href="http://procrastitracker.com/">Procrastitracker</a> that does this exact thing for you (PC only). I first got to know about this sweet little app through <a href="http://www.joe-danger.com/">hello games</a> talk at the <a href="http://gdconf.com/">gdc</a>.</p>
<p>It&#8217;s really simple and there&#8217;s virtually no setup, just keep it running in your taskbar and it&#8217;ll spy away on you.</p>
<p>This is my last five and a half days of work, yellow is surfing, blue is communication (im/email) and green is work. I&#8217;d say I spend roughly half my day surfing, and about a quarter of that is spent in small five minute increments on facebook. Embarrasing to say the least.</p>
<p><a href="http://prototyprally.com/wp-content/uploads/2010/04/procrastitracker.png"><img class="size-full wp-image-443" title="procrastitracker screenshot" src="http://prototyprally.com/wp-content/uploads/2010/04/procrastitracker_small.png" alt="Procrastitracker" width="570" height="496" /></a></p>
<p>Hopefully this can shame me into hanging around facebook less and doing more actual work.</p>
<p>In other news, <a href="http://prototyprally.com/glorg/">glorg</a> is coming along nicely, albeit a bit slower than I&#8217;d hoped. I&#8217;ve been expanding the way of handling states I started with my last post and hooking that up to an animation system to visualize the states, now I can map animations to different states and do transitions and all kinds of sweet stuff.</p>
<p><a href="http://prototyprally.com/wp-content/uploads/2010/04/glorg-animations.jpg"><img class="size-full wp-image-445" title="glorg-animations-small" src="http://prototyprally.com/wp-content/uploads/2010/04/glorg-animations-small.jpg" alt="" width="570" height="347" /></a></p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/mCVMwL-dAiA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/fighting-a-short-attention-span/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://prototyprally.com/fighting-a-short-attention-span/</feedburner:origLink></item>
		<item>
		<title>battling the system</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/Ie_YxJldQR8/</link>
		<comments>http://prototyprally.com/battling-the-system/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 12:01:40 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=420</guid>
		<description><![CDATA[I&#8217;ve spent the day toying with a new way to do the battles in glorg. I wasn&#8217;t really happy with the way they worked in the version I submitted to gamma, but nor could I figure out a good way to make it more interesting. So, somewhat inspired by Ben&#8217;s writeup on his devblog for Aztez [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-426" title="glorg-battle-system-wide" src="http://prototyprally.com/wp-content/uploads/2010/03/glorg-battle-system-wide.png" alt="" width="570" height="115" /></p>
<p>I&#8217;ve spent the day toying with a new way to do the battles in <a href="http://prototyprally.com/glorg/">glorg</a>. I wasn&#8217;t really happy with the way they worked in the version I submitted to gamma, but nor could I figure out a good way to make it more interesting.</p>
<p>So, somewhat inspired by <a href="http://www.aztezgame.com/blog/2010/03/21/the-attributes-of-an-attack/">Ben&#8217;s writeup on his devblog for Aztez</a> I decided to figure out the different states the combatants could be in. This graph illustrates the original battle system:</p>
<p><img class="alignnone size-full wp-image-422" title="glorg-battle-system-1" src="http://prototyprally.com/wp-content/uploads/2010/03/glorg-battle-system-11.png" alt="" width="570" height="135" /></p>
<p><a href="http://prototyprally.com/wp-content/uploads/2010/03/glorg-battle-system-11.png"></a>States with an asterisk mean that the player can exit them when he wants to. So the only choice the player has here is  when to exit the idle state, leading into the attack. Then he has to wait for the post attack to finish before getting to the idle state again.</p>
<p>This means that any time spent in the idle state is time you could be making damage, so the best strategy is to <a href="http://www.google.com/search?q=button+mashing&amp;sa=X&amp;tbs=vid:1&amp;tbo=u">bash the button like an idiot</a>. While that is good fun for a minute or so, it quickly becomes pretty tedious, especially since there was no real way to be good at it.</p>
<p>Today I made this graph (along with a small test application) :</p>
<p><img class="alignnone size-full wp-image-423" title="glorg-battle-system-2" src="http://prototyprally.com/wp-content/uploads/2010/03/glorg-battle-system-2.png" alt="" width="570" height="135" /></p>
<p>As you can see this is considerably more complicated. The player starts out as idle, being idle now also means blocking, something that wasn&#8217;t possible using the old system. So if you do nothing, you&#8217;re still reasonably safe.</p>
<p>Once the player presses the button we move into the charging state, this makes the character lower his guard, opening up for damage, but the longer he holds the button the more powerful his attack will be. Once he releases he goes into the pre-attack followed by the actual attack and then the post-attack. These phases are primarily for animation purposes, but they also affect how much damage you will take if hit during them.</p>
<p>If the player charges for too long or is hit during any of the non-blocking phases he will be dazed for a short time, leaving him open to attack.</p>
<p>The problem I am facing now is to illustrate all these states using animations. My battle prototype uses simple colors and it&#8217;s quite confusing at times, but hopefully it will all make sense once there&#8217;s a little monster flailing around a rabbit on a stick instead of a stupid box changing colors. As always.</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/Ie_YxJldQR8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/battling-the-system/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://prototyprally.com/battling-the-system/</feedburner:origLink></item>
		<item>
		<title>freedom</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/7XGXvJTgs5M/</link>
		<comments>http://prototyprally.com/freedom/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 09:44:29 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=413</guid>
		<description><![CDATA[The GDC is over and I&#8217;m taking a new step in life. I am taking a year of from work to do my own thing, and today is the first day. This feels both fantastic and terrifying all at once. Doing this I really do hope I can get some real work done on my [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-415" title="freedom" src="http://prototyprally.com/wp-content/uploads/2010/02/freedom.jpg" alt="" width="570" height="248" /></p>
<p>The GDC is over and I&#8217;m taking a new step in life. I am taking a year of from work to do my own thing, and today is the first day. This feels both fantastic and terrifying all at once. Doing this I really do hope I can get some real work done on my games, I&#8217;ve got a bunch of ideas lined up I want to try out, but first I intend to try and finish up <a href="http://prototyprally.com/glorg/">glorg</a>.</p>
<p>GDC was just as amazing this year as last. I sort of want to make a long list of all the fantastic people I met, but I worry I will forget someone and it&#8217;ll look a bit too much like namedropping, so I&#8217;ll just stick to a &#8220;best-of&#8221;:</p>
<ul>
<li><a href="http://cactusquid.blogspot.com/">Cactus</a> <a href="http://gdc.gamespot.com/story/6253466/monaco-tops-independent-game-festival-awards-full-video-inside">acceptance speech</a>, I have rarely been so worried what he&#8217;d do, luckily it turned out pretty damn hilarious in the end.</li>
<li>Hearing Alexander <a href="http://www.youtube.com/watch?v=_f_p0CgPeyA">Bruce</a> repeatedly yell &#8220;<a href="http://www.farbs.org/">Faabs</a>&#8221; out the hostel window.</li>
<li>The <a href="http://www.kokoromi.org/gamma4/">Gamma IV</a> party</li>
<li>The improvised party at <a href="http://eriksvedang.com/">Erik&#8217;s</a> place</li>
<li><a href="http://www.flickr.com/photos/tedmartens/4437954138/">Being drunk</a> at a place like the <a href="http://www.exploratorium.edu/">Exploratorium</a></li>
<li>Petri being a <a href="http://www.fanfromfla.net/lee/images/ww_terrygarth.jpg">Garth</a> lookalike.</li>
</ul>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/7XGXvJTgs5M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/freedom/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://prototyprally.com/freedom/</feedburner:origLink></item>
		<item>
		<title>the geedeecee</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/RBhLWODM9kw/</link>
		<comments>http://prototyprally.com/the-geedeecee/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 17:41:03 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=411</guid>
		<description><![CDATA[I&#8217;m writing this as I sit on a far too long flight to San Francisco. I&#8217;m going there to attend the yearly Game Developers Conference, especially the indie summit. I&#8217;m making this trip for several reasons. Firstly, I learned so much from the summit last year. Hearing people successfull in making a living of their [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing this as I sit on a far too long flight to San Francisco. I&#8217;m going there to attend the yearly Game Developers Conference, especially the indie summit. I&#8217;m making this trip for several reasons.</p>
<p>Firstly, I learned so much from the summit last year. Hearing people successfull in making a  living of their love for making games is absolutely delightful. It&#8217;s also very inspiring in a quit-your-job sort of way.</p>
<p>Another reason I go is the excellent indie community, just the thought of meeting everyone has me all giddy with excitement. It&#8217;s perhaps only a bit unfortunate that this happens at an event with a minimum pricetag of $500, but, being a part of a larger conference certainly has it&#8217;s benefits.</p>
<p>My third reason is to celebrate. I&#8217;m taking a year of from work to do freelancing work and make some games. Exactly how much I&#8217;ll be doing of each still remains to be seen, freelancing is quite attractive as it&#8217;s a much safer livelihood than games atleast from the outset. But I&#8217;d be lying if I didn&#8217;t say that I at least hope to get two or three games done during this year.</p>
<p>If you too are in town for GDC (or the Flash Games Summit) please do drop me an email so we can meet up somewhere!</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/RBhLWODM9kw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/the-geedeecee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://prototyprally.com/the-geedeecee/</feedburner:origLink></item>
		<item>
		<title>glorg</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/pmuM4kmPV90/</link>
		<comments>http://prototyprally.com/glorg/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 21:10:23 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=398</guid>
		<description><![CDATA[This past sunday, or early monday for me I submitted my game for gamma iv. The theme for gamma this time was one button game. That means one button, no joysticks, no mice no nothing. Just on and off. Very interesting. I ended up reworking the game I was currently making, originally ment to be something [...]]]></description>
			<content:encoded><![CDATA[<p>This past sunday, or early monday for me I submitted my game for <a href="http://www.kokoromi.org/gamma4/">gamma iv</a>.</p>
<p>The theme for gamma this time was one button game. That means one button, no joysticks, no mice no nothing. Just on and off. Very interesting. I ended up reworking the game I was currently making, originally ment to be something completely different, to fit the theme and I think it turned out quite nice.</p>
<p>I can&#8217;t publish it until I know if it&#8217;s selected, however there was 154 games so the competition is going to be just brutal. If it <em>is </em>selected I get to show it off on the expo floor of <a href="http://www.gdconf.com/">GDC</a>.</p>
<p>This is what the game looks like:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="570" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/Th9GxkPiO34" /><embed type="application/x-shockwave-flash" width="570" height="350" src="http://www.youtube.com/v/Th9GxkPiO34"></embed></object></p>
<p>Inspired by <a href="http://www.kloonigames.com/blog/general/making-of-post-it-shooter">Petri&#8217;s timelapses</a> I kept chronolapse running as soon as I worked on the game. It&#8217;s taken me 2836 screenshots (that&#8217;s one per minute) to make this. That works out to 47 hours of work. I put in the last 36 seconds or so of work (in video time) during the <a href="http://nordicgamejam.org/">nordic game jam</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="570" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/gxzRBnmSHBI" /><embed type="application/x-shockwave-flash" width="570" height="350" src="http://www.youtube.com/v/gxzRBnmSHBI"></embed></object></p>
<p>Now all there is to do is wait, and maybe fix a few bugs&#8230;</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/pmuM4kmPV90" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/glorg/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://prototyprally.com/glorg/</feedburner:origLink></item>
		<item>
		<title>leaf – a game about life</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/0V9OcrMahC0/</link>
		<comments>http://prototyprally.com/leaf-a-game-about-life/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 09:04:44 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=386</guid>
		<description><![CDATA[I made a game for the experimental gameplay project, it&#8217;s called leaf. This is one of those games I got started on a while back, and figured I&#8217;d finish quickly but never really got around to it after the first day of hacking away at it. When I heard that the theme for december was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://prototyprally.com/leaf/"><img class="alignnone size-full wp-image-382" title="screen1" src="http://prototyprally.com/wp-content/uploads/2010/01/screen1.jpg" alt="" width="570 height=" /></a></p>
<p>I made a game for the <a href="http://experimentalgameplay.com/">experimental gameplay project</a>, it&#8217;s called <a href="http://prototyprally.com/leaf/">leaf</a>.</p>
<p>This is one of those games I got started on a while back, and figured I&#8217;d finish quickly but never really got around to it after the first day of hacking away at it. When I heard that the <a href="http://experimentalgameplay.com/blog/2009/11/its-a-fact-the-next-theme-is-art-game/">theme for december was going to be &#8220;art game&#8221;</a> I knew this game would be a perfect fit.</p>
<p>The idea came to me when I was walking home with the game&#8217;s <a href="http://www.archive.org/details/030901jumelles">theme-to-be</a> playing on my ipod, I saw leaves tumbling to the ground and uttered the words all game designers have come to hate &#8220;I should make a game about that&#8221;.</p>
<p>Once I got home I played the song and pitched the idea to my friend <a href="http://gerezon.se/blog/">Jonas</a>, mostly to get some feedback, but also to trick him into doing the graphics.</p>
<p>Things happened, pictures got drawn, days were spent on stupid, stupid scrolling bugs and this is what became of it.</p>
<p><a href="http://prototyprally.com/leaf/">Play it and tell me what you think!</a></p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/0V9OcrMahC0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/leaf-a-game-about-life/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://prototyprally.com/leaf-a-game-about-life/</feedburner:origLink></item>
		<item>
		<title>Moonbow teaser</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/8k5kPcOOjBs/</link>
		<comments>http://prototyprally.com/moonbow-teaser/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 10:47:52 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=342</guid>
		<description><![CDATA[(Quick link to the game on FGL) This is moonbow. A game I started working on on the flight to GDC this year. True to form I had no idea where I was going with it then and it has changed and morphed quite a few times since then. I&#8217;ve been saving the different versions [...]]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="565" height="370" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Tat0CJCxaWM&amp;hl=en&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="565" height="370" src="http://www.youtube.com/v/Tat0CJCxaWM&amp;hl=en&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>(<a href="http://www.flashgamelicense.com/view_game.php?game_id=6358">Quick link to the game on FGL</a>)</p>
<p>This is moonbow. A game I started working on on the flight to GDC this year. True to form I had no idea where I was going with it then and it has changed and morphed quite a few times since then. I&#8217;ve been saving the different versions throughout development, but those will be in a later blog post.</p>
<p>I&#8217;m going to try something new with this game, normally I&#8217;ve just put my games up here and been done with it. This time I figured I&#8217;d give <a href="http://www.flashgamelicense.com/">Flash game license</a> a try. I&#8217;ve been talking to a few flash game publishers before, and negotiating a price really is a huge hassle. I&#8217;m a bit hesitant to what sites like FGL will mean for flash games, it might be a good equalizer, also it might reduce them to become even more of a commodity than they already are. But there&#8217;s only one way to find out.</p>
<p>If you have an account on FGL you can <a href="http://www.flashgamelicense.com/view_game.php?game_id=6358">play the game there</a>. If not you&#8217;ll just have to wait (or hit me up on <a href="http://twitter.com/grapefrukt">twitter</a>).</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/8k5kPcOOjBs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/moonbow-teaser/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://prototyprally.com/moonbow-teaser/</feedburner:origLink></item>
		<item>
		<title>MGAS3FD 6: Click it like it’s hot</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/OzfAeSXOGQg/</link>
		<comments>http://prototyprally.com/mgas3fd-6-click-it-like-its-hot/#comments</comments>
		<pubDate>Sat, 16 May 2009 12:02:17 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[Making Games in Actionscript 3.0]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=306</guid>
		<description><![CDATA[Hello there. This is the sixth part of the Making Games in ActionScript 3 using FlashDevelop By now we&#8217;ve got almost all the basic building blocks to make a simple game. All that is missing is how to get some input. Last time we touched on it a little bit using the mouseX and mouseY [...]]]></description>
			<content:encoded><![CDATA[<p>Hello there. This is the sixth part of the Making Games in ActionScript 3 using FlashDevelop</p>
<p>By now we&#8217;ve got almost all the basic building blocks to make a simple game. All that is missing is how to get some input. Last time we touched on it a little bit using the <em>mouseX</em> and <em>mouseY </em>properties.<br />
Those are the most straightforward to get at, but other inputs aren&#8217;t very complicated either. Let&#8217;s start with the mouse button.</p>
<p><span id="more-306"></span><br />
Note that it&#8217;s mouse <em>button</em>, not buttons, one of the limitations of the Flash platform is that you only have access the to the left click.<br />
Right click gives a menu, and there&#8217;s no getting around that.</p>
<p>To get the most of out of this part we need to start with making a Player class. Check back in <a href="http://prototyprally.com/mgas3fd-3-getting-on-with-itmgas3fd-3-getting-on-with-it/">part three </a>for how to add a class but name it Player this time. Add an instance of the player to your Main class and make sure it&#8217;s on the stage. If you&#8217;re too lazy just <a href="http://prototyprally.com/wp-content/uploads/2009/03/supergame_step6a.zip">get the prepared project here</a>.</p>
<p>Getting input brings us back to the event handling we started with in last part, in your Enemy class&#8217; constructor add an event listener for MouseEvent.CLICK:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">addEventListener(MouseEvent.CLICK, handleClick);</pre></div></div>

<p>Once this is done we add the handler method, use the neat CTRL+1 autocompletion or just type this out (copypaste is cheating).</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">private function handleClick(e:MouseEvent):void {
	trace(&quot;clicked enemy&quot;);
}</pre></div></div>

<p>Give the Enemy a click, and gasp at the fantasticness of the traced output. You will notice that if you click outside the enemy nothing is traced. This is because we are listening for clicks on that specific object. If you add multiple enemies they will each have their own handler for clicks.</p>
<p>Sometimes this is great, other times, not so great. What if you have a whole bunch of enemies and want to do something in your main class when any one of them is clicked. You can use this exact method and let the enemy call a function on your Main class, but that&#8217;s not very pretty code.<br />
Adding a listener to each one from the Main class is a possibility, since a handler can handle events from many &#8220;dispatchers&#8221; (things that broadcast events are called dispatchers). But, we don&#8217;t want to repeat ourselves unless we absolutely have to.</p>
<p>So, we&#8217;re going to do it the neat way. Add another listener, this time in the Main class. Do it the exact same way, but let&#8217;s put a different trace in so we can tell them apart:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">private function handleClick(e:MouseEvent):void {
	trace(&quot;clicked in main&quot;);
}</pre></div></div>

<p>For this example to work we&#8217;ll need a couple of extra enemies. Since we don&#8217;t really need a reference to them we can do it like this:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">for (var i:int = 0; i &amp;lt; 5; i++) {
	var tmpEnemy:Enemy = new Enemy();
	tmpEnemy.x = Math.random() * 800;
	tmpEnemy.y = Math.random() * 600;
	addChild(tmpEnemy);
}</pre></div></div>

<p>What we do here is first a small loop, this is a classic for loop, if you need to read up on what the arguments are a quick googling should help you out. Then we create a temporary variable to hold a reference to the enemy we&#8217;re about to create. We use that to position the enemy at a random spot on the stage. Math.random() returns a random number between zero and one, we multiply that with the stage size we&#8217;ve set in the project properties (800&#215;600 is the default in FlashDevelop). The Math class contains all the math related methods, so we&#8217;ll see more of that in a later parts of these tutorials.</p>
<p>Run it and give any Enemy a good clickin&#8217;, you should see both the trace statements in your output. The attentive log reader notices that the enemy&#8217;s trace always arrives before the main trace. This is because of something called event bubbling.</p>
<p>This means that when a object added as a child to something receives a click (or any other event) this event will bubble up the hiearachy to it&#8217;s parent. The parent will in turn bubble it further and so on. Thus, by listening for click events on our Main class we&#8217;re getting all clicks in the whole application. Almost.</p>
<p>The click registration respects the objects shape (it doesn&#8217;t handle images with alpha though). A good way to visualise this is to set the enemys propety buttonMode to true. This will give you the hand cursor whenever you&#8217;re in a position that would click that object.</p>
<p>If you want to listen for all clicks you will need to add a listener to the stage. This will give you all clicks even those that aren&#8217;t really on anything, but we&#8217;re not going to need that right now.</p>
<p>Knowing what got clicked is real easy when you&#8217;re only listening for clicks on a specific object, but as you&#8217;ve seen that&#8217;s not always the case.</p>
<p>You have probably noticed that the event handling functions accept an argument. I (and Flash Develop) almost always name this e:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">private function handleClick(e:MouseEvent):void</pre></div></div>

<p>But you can name it however you want, it will have to be there however  since that&#8217;s where all the information about the event goes.</p>
<p>You can use FlashDevelops autocompletion to take a look what properties are available, there&#8217;s quite a lot of them. We&#8217;ll focus on the one named target for now.<br />
The target is the object that initally dispatched the event. In our case that will be either one of the enemies or your new Player class, assuming this is the listener we set up in Main.</p>
<p>This property is an object which is one of the most basic datatypes in Flash. This is because the thing that dispatched the event could be of any type. To get at the actual Enemy we&#8217;ll need to cast it.</p>
<p>If all you care about is what class the target was you can do it like this:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">if (e.target is Enemy) {
	trace(&quot;run away&quot;);
}</pre></div></div>

<p>This is pretty straightforward, the is operator compares the target to a class and evaluates to true if it&#8217;s a match. But there are other neat tricks you can do which are especially useful if you want to do something with the target.</p>
<p>Try assigning your enemy to a variable in the handler:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">var targetEnemy:Enemy = e.target;</pre></div></div>

<p>The compiler will whine about this, since we&#8217;re trying to put a generic object into something that&#8217;s meant to hold an enemy. To get around this we need to specify that this infact is what we want to do:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">var targetEnemy:Enemy = e.target as Enemy;</pre></div></div>

<p>Now, if this succeeds the enemy will be accesible via the variable, if it fails the variable will be null. This combined with the fact that in actionscript everything can be evaluated as a Boolean lets us do like this:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">var targetEnemy:Enemy = e.target as Enemy;
&nbsp;
if(targetEnemy) {
	targetEnemy.y += 20;
}</pre></div></div>

<p>If you click the player the cast will fail and targetEnemy will be null. null will evaluate as false, and a reference will be true so we can safely do stuff with our enemy inside. Neat, huh?</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/OzfAeSXOGQg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/mgas3fd-6-click-it-like-its-hot/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		<feedburner:origLink>http://prototyprally.com/mgas3fd-6-click-it-like-its-hot/</feedburner:origLink></item>
		<item>
		<title>Another forty bytes the dust.</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/YqPcd47qqp8/</link>
		<comments>http://prototyprally.com/another-forty-bytes-the-dust/#comments</comments>
		<pubDate>Sun, 10 May 2009 20:12:58 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[4k]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=322</guid>
		<description><![CDATA[I really should let this whole 4k game thing go. But as I was sitting on the train today, idly hacking away at a completely different game I remembered a curious thing that I didn&#8217;t have time to investigate then. The mysterious bytes. The compiled size of the same actionscript file will vary with up [...]]]></description>
			<content:encoded><![CDATA[<p>I <em>really </em>should let this whole <a href="http://prototyprally.com/a-steroids4k/">4k game</a> thing go. But as I was sitting on the train today, idly hacking away at a completely different game I remembered a curious thing that I didn&#8217;t have time to investigate then. The mysterious bytes.</p>
<p><span id="more-322"></span> The compiled size of the same actionscript file will vary with up 4 bytes between compiles. You can really just bring up the command line and recompile the same file a couple of times and it will be 4098 bytes the first time and 4094 the next. Very strange.  I <a href="http://twitter.com/grapefrukt">tweeted</a> about this suspecting some kind of metadata was stored inside the file, someone told me this shouldn&#8217;t be the case so I let it go.  Turns out <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_16.html#145380">metadata <strong>is</strong> stored</a>, and more than you&#8217;d think. A standard swf compiled with mxmlc can have these values:</p>
<ul>
<li>contributor</li>
<li>creator</li>
<li>date</li>
<li>description</li>
<li>language</li>
<li>localized-description</li>
<li>localized-title</li>
<li>publisher</li>
<li>title</li>
</ul>
<p>The mysterious bytes come from the fact that there is a timestamp embedded, this will affect the compression of the swf making it compress a few bytes smaller if you&#8217;re lucky and a bit bigger on other occasions.  These have default values, and these may be useful to keep track of stuff, they&#8217;re just a bunch of bloat to a 4k game. Luckily they&#8217;re a piece of cake to get rid off. Add these options to the compiler to set them all to be empty:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">-contributor=''
-creator=''
-date=''
-description=''
-language=''
-publisher=''
-title=''</pre></div></div>

<p>(In FlashDevelop you set these options in Project Properties -&gt; Compiler Options -&gt; Additional Compiler Options)  However, the swf will still be up to three bytes bigger on occasion, I think the time still gets in there somehow. Nevertheless, this shaves of a whopping 40 bytes on my current version of asteroids4k!</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/YqPcd47qqp8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/another-forty-bytes-the-dust/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://prototyprally.com/another-forty-bytes-the-dust/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 17.326 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-09-01 20:33:30 --><!-- Compression = gzip -->
