<?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>Mon, 17 May 2010 10:54:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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>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_2115935206"
			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_2115935206"
			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 of [...]]]></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>3</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 game I [...]]]></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 my [...]]]></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 I [...]]]></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 completely [...]]]></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 going [...]]]></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 throughout [...]]]></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 properties.
Those [...]]]></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>22</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>
		<item>
		<title>MGAS3FD 5: Enter the frame</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/5fPvtV_Q4g8/</link>
		<comments>http://prototyprally.com/mgas3fd-5-enter-the-frame/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 12:00:11 +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=268</guid>
		<description><![CDATA[Welcome to the fifth part of Making Games in ActionScript 3 using FlashDevelop.
Wow, when I  got started on this whole tutorial thing I never expected it&#8217;d take four parts just to get to the enter-frame part. But here we are.
This post will be about making stuff move. But before that we&#8217;ll need a quick primer [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the fifth part of Making Games in ActionScript 3 using FlashDevelop.</p>
<p>Wow, when I  got started on this whole tutorial thing I never expected it&#8217;d take four parts just to get to the enter-frame part. But here we are.</p>
<p>This post will be about making stuff move. But before that we&#8217;ll need a quick primer on Events. They is one of the <span class="tyda_entry_inflected" title="plural">mainstays </span>of actionscript, especially version 3.</p>
<p><span id="more-268"></span></p>
<p>The basic concept is that an event can come from any place at any time and whoever listens gets notified. This is what drives Flash at it&#8217;s core, everything that is done is in response to an event.  There are events for alot of things and they&#8217;ll come back in pretty much every step from here on, so listen up.</p>
<p>To get things moving about we need to run some code each frame. The way to do this is to set up an even listener for the ENTER_FRAME event:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">addEventListener(Event.ENTER_FRAME, handleEnterFrame);</pre></div></div>

<p>If you type this out in the constructor for your Main class you will notice that FlashDevelop gives you a whole bunch of suggestions, these are all events you can listen for, but right now we want the ENTER_FRAME one.</p>
<p>The second parameter is the function that will handle this, you can name these whatever you please, but I find it good practice to prefix them with handle just to make it clear what they do.</p>
<p>Next we need to add this function we are refering to, if you want to you can place your cursor over the function name and press CTRL+1, this will invoke the contextual code generator that will create that little snippet for you. If not just type this code out below the constructor:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">private function handleEnterFrame(e:Event):void {
	trace(&quot;enter the frame!&quot;);
}</pre></div></div>

<p>Now run your code, if everything&#8217;s okay you should get a flood of <em>enter the frame</em> in your output window.</p>
<p>Now we can start making stuff move around, try adding to one of your enemies properties:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">enemy.x = enemy.x + 1;</pre></div></div>

<p>When doing things like this i normally use the shorthand for adding to a property, it does the exact same things, it&#8217;s just a little bit less long winded:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">enemy.x += 1;</pre></div></div>

<p>If you run the code now, you should have a moving gnome!</p>
<p>While this <strong>is</strong> very neat, it&#8217;s not very interactive. Let&#8217;s get my favourite input method involved.</p>
<p>Each DisplayObject (in this case your Main- and Enemy class) has a pair of properties called mouseX and mouseY, these are the relative position of the mouse pointer to their registration point:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">enemy.x = mouseX;</pre></div></div>

<p>Now it should be a walk in the park to get the gnome to rotate and follow the mouse pointer. For an added challenge try making him rotate around his nose instead of upper left corner.</p>
<p>In the next part, <a href="http://prototyprally.com/mgas3fd-6-click-it-like-its-hot/">number six, we get some interactivity into the mix</a>.</p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/5fPvtV_Q4g8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/mgas3fd-5-enter-the-frame/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		<feedburner:origLink>http://prototyprally.com/mgas3fd-5-enter-the-frame/</feedburner:origLink></item>
		<item>
		<title>MGAS3FD 4: More embedding</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/nRo0PldVUwU/</link>
		<comments>http://prototyprally.com/mgas3fd-4-more-embedding/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 12:00:18 +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=256</guid>
		<description><![CDATA[This is the third part of Making Games in ActionScript 3 using FlashDevelop.
Last time we got our first enemy on the stage. Now we&#8217;ll take a quick look at embedding other formats into your classes. Grab the gnome here to the right and put him in your assets folder.

The syntax is basically the same to [...]]]></description>
			<content:encoded><![CDATA[<p>This is the third part of Making Games in ActionScript 3 using FlashDevelop.</p>
<p><a href="http://prototyprally.com/wp-content/uploads/2009/02/gardengnome.png"><img class="alignright size-full wp-image-257" title="gardengnome" src="http://prototyprally.com/wp-content/uploads/2009/02/gardengnome.png" alt="gardengnome" width="83" height="83" /></a>Last time we got our first enemy on the stage. Now we&#8217;ll take a quick look at embedding other formats into your classes. Grab the gnome here to the right and put him in your assets folder.</p>
<p><span id="more-256"></span></p>
<p>The syntax is basically the same to embed other formats (png/jpg).</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">[Embed(source='../../../../../../assets/gardengnome.png')]</pre></div></div>

<p>FlashDevelop will generate this little string for you if you doubleclick your wanted image in the Project panel. Place the [Embed] tag right before the class declaration as we did last time.</p>
<p>If you compile and run now you will get a runtime exception from the player. This is because our enemy is still defined as a Sprite, and sprites are vector based. We need to change the base class to Bitmap. Do that, and make sure your imports are in order before you compile. Now it all should run just fine again.</p>
<blockquote><p>Flash does not resize your image, it will be embedded in it&#8217;s full resolution. So make sure that it&#8217;s a proper size before embedding it, resizing it in code will just add unnecessary bloat to your file and will affect performance.</p></blockquote>
<p>Having to change the base class like this can be a bit of a hassle, especially when you have multiple levels of inheritance going (maybe a baseclass like GameObject). So there&#8217;s a cleaner way to do this. Create these two  properties on your enemy:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">private static const GfxGnome:Class;
private var gfx:Bitmap;</pre></div></div>

<p>The first one is both a static constant, this means this property is attached to the actual class, and not to the instances of it you create. Wether you make them private or public is up to you, I prefer having things private until otherwise needed, so that&#8217;s what I went with.</p>
<p>For now we set the base class for the enemy back to Sprite. But instead of having the [Embed]-tag before the Enemy class we put it before the GfxGnome class. This will make the gardengnome.png attach to that class instead.</p>
<p>Now we need to instantiate that into our gfx property. We do that in the constructor like this:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">gfx = new Enemy.GfxGnome();</pre></div></div>

<p>Since GfxGnome is attached to the class and not this specific instance we need to specify that by using Enemy before it&#8217;s name.</p>
<p>If you run your code now you will notice that nothing is showing up. This is because we need to add our graphics as a child, right now they&#8217;re just hiding out in memory somewhere.</p>
<p>Adding the graphics as a child works the same way here as it did in our Main class where we first added the Enemy:</p>

<div class="wp_syntax"><div class="code"><pre class="as3" style="font-family:monospace;">addChild(gfx);</pre></div></div>

<p>Now you should be all set for getting graphics into your games. If you got lost somewhere on the way, the <a href="http://prototyprally.com/wp-content/uploads/2009/02/supergame_step4.zip">project files are available for download</a>.</p>
<p><a href="http://prototyprally.com/mgas3fd-5-enter-the-frame/">Next time we&#8217;ll make stuff move around!</a></p>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/nRo0PldVUwU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/mgas3fd-4-more-embedding/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://prototyprally.com/mgas3fd-4-more-embedding/</feedburner:origLink></item>
		<item>
		<title>a winner is me.</title>
		<link>http://feedproxy.google.com/~r/prototyprally/~3/zguLr9OOFxM/</link>
		<comments>http://prototyprally.com/a-winner-is-me/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 09:07:14 +0000</pubDate>
		<dc:creator>grapefrukt</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://prototyprally.com/?p=301</guid>
		<description><![CDATA[Check out the competition results over at gamepoetry. There was tons of impressive entries, second place winner Dungeon Romp is really neat, it manages to tap into the latent rpg grinder inside of me. But I can&#8217;t help but feel the bytes spent on the 3D-walls might have been better spent on maybe items or [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://prototyprally.com/wp-content/uploads/2009/03/4k_first.png"><img class="size-full wp-image-302 alignright" title="4k_first" src="http://prototyprally.com/wp-content/uploads/2009/03/4k_first.png" alt="4k_first" width="187" height="163" /></a>Check out the competition results over at <a href="http://www.gamepoetry.com/blog/4k_flash_march_09/">gamepoetry</a>. There was tons of impressive entries, second place winner <a href="http://www.gamepoetry.com/blog/4k-flash-dungeon-romp/">Dungeon Romp</a> is really neat, it manages to tap into the latent rpg grinder inside of me. But I can&#8217;t help but feel the bytes spent on the 3D-walls might have been better spent on maybe items or something, since all I use to get around is the map. It&#8217;s nevertheless a great game!</p>
<p>Other entries I enjoyed are:</p>
<ul>
<li><a href="http://www.gamepoetry.com/blog/4k-flash-4kpillars/">4kpillars</a>. A very cool looking game, the flying on a sphere mechanic works great.</li>
<li><a href="http://www.gamepoetry.com/blog/4k-flash-falling-with-style/">Falling with style</a> a technically very impressive entry, I&#8217;ve always loved pilotwings.</li>
<li><a href="http://www.gamepoetry.com/blog/4k-flash-ghost4koin/">Ghost4koin</a> really makes me wonder how they managed to fit that in 4k</li>
<li><a href="http://www.gamepoetry.com/blog/4k-flash-pie/">Pie</a> is maybe the most complete of the entries, also great!</li>
</ul>
<img src="http://feeds.feedburner.com/~r/prototyprally/~4/zguLr9OOFxM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://prototyprally.com/a-winner-is-me/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://prototyprally.com/a-winner-is-me/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.210 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-07-03 18:48:24 --><!-- Compression = gzip -->
