<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Electronic Space Nintendo &#187; Flash</title>
	<atom:link href="http://www.doomsday.no/esn/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doomsday.no/esn</link>
	<description>Video games, Weirdness, Adobe Flash, Android, Music, and TLDR</description>
	<lastBuildDate>Tue, 06 Dec 2011 00:47:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Developer&#8217;s pride</title>
		<link>http://www.doomsday.no/esn/2011/05/developers-pride/</link>
		<comments>http://www.doomsday.no/esn/2011/05/developers-pride/#comments</comments>
		<pubDate>Sun, 08 May 2011 20:27:43 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1288</guid>
		<description><![CDATA[A short one, this time Back when I was a paperboy I started out being pained by the whole ordeal of lugging all those papers around and running up and down all those stairs. Can you imagine dragging a cart up and down hills and running up and down stairs during the Norwegian winter? Jeez. [...]]]></description>
			<content:encoded><![CDATA[<p>A short one, this time <img src='http://www.doomsday.no/esn/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Back when I was a paperboy I started out being pained by the whole ordeal of lugging all those papers around and running up and down all those stairs. Can you imagine dragging a cart up and down hills and running up and down stairs during the Norwegian winter? Jeez. With time though, I was seeing pretty sharp benefits. My physique got <em>awesome</em> (holy hell do I believe in the Stairmaster now), I was making my <em>own money</em>, but best of all, I got <em>extremely skilled at manipulating newspapers one-handed</em>. From rolling them up with a figure-8 flick of the wrist, to throwing them long range horizontally like a Frisbee to softly land right on the recipient&#8217;s doormat, every new delivery was like a challenge to figure out the longest possible distance from which I could hand them the paper with the least amount of energy.</p>
<p>Screw the money. Feeling that I was not only mastering a task but actually feeling like I was making <em>innovations in it</em> were the best memories from running all those paper routes. To this day, I think the best thing you can get from anything is that sense of mastery. This is partially why video games that are poorly balanced at higher difficulties piss me off so much, because they&#8217;re denying the player the chance to master something that initially feels insurmountable; The <em>best</em> thing you can <em>possibly </em>get from video game mechanics. It&#8217;s also why I have a deep respect of anyone doing <em>any</em> job that put in a little extra effort. I watch garbage men and McDonalds register workers and it makes me just warm inside whenever I spot a new &#8220;technique&#8221; someone has come up with to make their job easier.</p>
<p>I&#8217;m a firm believer in programming as an art form. It&#8217;s engineering with a sprinkling of genuine authorship. I think a developer&#8217;s individual touch is as important as the resulting product, so seeing students be taught Java conventions drives me up the freaking walls; Isn’t the whole JOY of programming the manipulation of language to describe a complex structure? Coding, to me, is about individuals working together, and when I join a team I will bring my individual quirks with me; My naive belief is that individuality will strengthen the group and the project simply by virtue of individuality spawning creative mastery in a way that schooling won&#8217;t spark.</p>
<p>I have some features as a developer that I&#8217;m very proud of. The biggest pride is that when I write a UI, dimensions are always simply parameters. I feel an itch every time I type in coordinates or rectangles literally. My UI will always flow to the size of the canvas; I make no assumption at a locked resolution. 80% of the time this isn&#8217;t very important. But sometimes there is nothing more comforting than knowing that the form factor of the screen displaying the product can comfortably be an unknown variable.</p>
<p>Anyone else out there have developer &#8220;quirks&#8221; or habits they feel proud of? Specific facets of your &#8220;developer&#8217;s mastery&#8221; you feel makes you a definitive asset?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2011/05/developers-pride/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My $.2 on Android dev vs iPhone dev</title>
		<link>http://www.doomsday.no/esn/2011/02/my-2-on-android-dev-vs-iphone-dev/</link>
		<comments>http://www.doomsday.no/esn/2011/02/my-2-on-android-dev-vs-iphone-dev/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 16:42:48 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game dev & design]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1269</guid>
		<description><![CDATA[I&#8217;ve recently had the good fortune of reaching the point where my Java proficiency is such that I&#8217;m finally able to create something, rather than just poke at the language and see what it does. It&#8217;s been a while since I felt like I could actually speak a new language, and the process has been [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently had the good fortune of reaching the point where my Java proficiency is such that I&#8217;m finally able to create something, rather than just poke at the language and see what it does. It&#8217;s been a while since I felt like I could actually speak a new language, and the process has been incredibly inspiring! From meekly putting some buttons on screen and going through the (excellent) Android developer guide to familiarize myself, I&#8217;m finally building a framework for making actual games, and I&#8217;ve begun coding creatively. It&#8217;s almost intoxicating. I had a moment last night with a glass of Stolichnaya, a warm blanket and a ~55fps blitted multitouch particle system where I realized to my horror that I have fallen in love with Java. My nerd circle is complete!</p>
<p>I have a certain disdain for Apple&#8217;s policy of developer lock-in, as well as their entire [<em>blahblahblah catch up with this with me over a beer sometime</em>], so for me the idea of investing so heavily in iOS development was never of any interest. I&#8217;m not enchanted with the philosophies that drive objective C, being firmly in the C++ camp, so iOS &#8220;development&#8221; for me has been limited to design discussions and project planning with my friends who do enjoy working on that platform. I want to stress out that while i think Apple can [<em>Escher-like construction of interwoven expletives</em>], their hardware is good, and their design philosophy is excellent. I&#8217;ve been an iPhone owner since the 3GS, and I&#8217;ve played a surprising amount of really good games on the platform. It&#8217;s solid.</p>
<p>I haven&#8217;t played a lot of good games for Android. It doesn&#8217;t feel solid.</p>
<h3>Which is better?</h3>
<p>The discussion invariably becomes a &#8220;which is better&#8221; question: Should I get an iPhone? Should I get an Android device? From the perspective of one &#8220;indoctrinated&#8221; to expect Apple-level polish at the expense of features, Android&#8217;s good sides will be invisible because you don&#8217;t think to look, and its bad sides will be staring you in the face from the get go; Android as an operating system simply <em>feels</em> less responsive. So obviously (literally), iOS is the stronger platform, right? Given the presumption that every Android device is an iPhone competitor, then you may have a strong argument.</p>
<p>However, at this junction, being a Flash developer with a new found fascination for Java and a better understanding of the Android platform, I don&#8217;t find myself able to make such a direct comparison. In fact, I think it&#8217;s practically invalid; The definition of an &#8220;Android device&#8221; at this point is incredibly open. Your application, in a single deployment, can theoretically target everything from a tiny-screened uncomplicated Sony Ericsson Xperia X10 Mini to the Samsung Galaxy Tab. You may expect to have access to a joystick, hell, with the Xperia Play, you can expect dual analog sticks. You can assume a single touch screen, or any sort of multitouch input. You MAY be working on a phone.. You may be working on the dashboard of a car. </p>
<p>Android is a very wide canvas, and I feel the idea that Android and iOS are implicit competitors is a misunderstanding. </p>
<p>I believe that an Android developer, to be successful, has to reach a very wide audience, not only in terms of software appeal, but also in terms of hardware optimization; The design must pre-empt a wide array of edge cases. It&#8217;s a complicated, arduous task, but the reward, I feel, is that same fuzzy warm feeling I get when a Flash application&#8217;s UI flows with the window size. The feeling that your bases are covered. The feeling that you&#8217;ve engineered a flexible machine. </p>
<p>And my real argument here is that designing for iPhone with the assumption that you can port painlessly to Android is a grave mistake.</p>
<h3>Scale down, not up</h3>
<p>At this point, having written an Android app that scales to a subset of devices you are happy with, what&#8217;s stopping you from porting to the iPhone with a minimum of change to your design? iPhones have a couple of configurations and little to no change in input capabilities; The biggest in recent times is the addition of the gyroscope with the iPhone 4, easily omitted for the 3G/S at the cost of fidelity, but no actual capability lost. In contrast Android devices have many dozens and more coming, and few input capabilities you can count on. </p>
<p>Being a Flash developer, I&#8217;m arrogantly going to assume you are one as well: You are already versed in designing applications with a variable canvas size. You are already used to optimizing to overcome crappy end-user hardware. Designing for a range of Android devices that are comparable to the iPhone will let you write in a language very similar to the one you know, typically with much better performance than you&#8217;d expect unless you are forgetting your optimizing lessons. Summary: You already know how to do this shit! </p>
<p>When your application is done and deployed, take it to someone else to get it ported, or use the porting as an excuse to learn iOS dev; Java is a very generic language, the API is uncomplicated enough that parallels can be found on most platforms, and if you are a game developer in particular, you&#8217;ll barely be using any of the OS-specific integration anyway. Port DOWN to iPhone, which is the more complicated platform but with a better known configuration. Don&#8217;t write your iOS application and expect your design to work within the flowing canvas of the Android platform, because they simply are not the same. But the iPhone is in actuality <em>the lowest common denominator</em>.</p>
<p>I see too many people wanting a cross platform framework for smartphone application dev to, I guess, &#8220;make the most money&#8221;, and some have found success with stuff like Corona. But this is a compromise layered on a compromise. I personally could never feel comfortable with such an attitude, because it not only undersells the platforms you are targeting, but it compromises your design in a way I feel is unnecessary. It also locks you into yet <em>another </em>platform, with <em>another</em> language. How low are you willing to go for a quick buck, guy?</p>
<h3>Fun times!</h3>
<p>My first Android game targets the Galaxy S in particular. It&#8217;ll be free, and will work wonderfully on all comparable devices. It&#8217;s a great learning process. 50fps multitouch accelerometer gravity party-time! It will also be ported to the iPhone when it&#8217;s done and tested. That&#8217;ll be programming and optimizing work. At this point, I&#8217;m having fun just playing. </p>
<p>If you&#8217;re a Flash developer in doubt, for what this is worth, I really must recommend getting a decent spec Android phone and getting into developing for it before letting Apple shackle you to their platform in a way that denies you flexibility of deployment. Working natively on a device like the Galaxy S is a total joy; This thing is so full of fun sensors and fancy junk, it&#8217;s kind of mind-blowing how little you must do before you&#8217;re integrating it all into an experience. And you can take that experience to iOS later, when it&#8217;s ready for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2011/02/my-2-on-android-dev-vs-iphone-dev/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Doomsday Console 64 public + an announcement</title>
		<link>http://www.doomsday.no/esn/2011/01/doomsday-console-64-public-an-announcement/</link>
		<comments>http://www.doomsday.no/esn/2011/01/doomsday-console-64-public-an-announcement/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 19:15:50 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1256</guid>
		<description><![CDATA[Today was the day I finally mustered the courage to push the Doomsday Console 2.0 update to googlecode. It&#8217;s not, er, particularly 64 bit. If you get the lame joke in its title, we should have beers. It is not finished by any stretch, but it is mostly feature complete, and in the coming weeks [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1257" class="wp-caption aligncenter" style="width: 610px"><a href="http://www.doomsday.no/esn/wp-content/uploads/2011/01/dconsole64.png"><img class="size-large wp-image-1257 " title="dconsole64" src="http://www.doomsday.no/esn/wp-content/uploads/2011/01/dconsole64-600x270.png" alt="" width="600" height="270" /></a><p class="wp-caption-text">Click for nice sharp pixely bits</p></div>
<p>Today was the day I finally mustered the courage to push the Doomsday Console 2.0 update to googlecode. It&#8217;s not, er, particularly 64 bit. If you get the lame joke in its title, we should have beers. It is not finished by any stretch, but it is mostly feature complete, and in the coming weeks I&#8217;m hoping to be polishing it and fixing it up to the point where you can stick it in your games and apps without worry.</p>
<p>It&#8217;s got a more elaborate UI, featuring a foldout panel on the left that gives you tabs containing the display list as a tree view, and a matrix of properties on the current selection. More tabs are planned, but damn, need to make these two bug free first; Handling write-only accessors is a really weird problem from a UX point of view. The aim is to marry two often used features of the previous version; the ability to select display objects directly and interacting with their properties, with a simpler method of access. </p>
<p>One of my favorite things about this UI is how it&#8217;s greedy for space but relinquishes it as sections become too small to be useful, and fields and components hide and reappear as the console is scaled. There&#8217;s also scrollbars now. WILD. So much new small stuff!</p>
<p>Oh, and we&#8217;ve shifted the license to MIT, so it should be easier on your clients as well.</p>
<p>I want to stress that this isn&#8217;t the final release, but rather us making the development public. You&#8217;re free to experiment with the source, of course, but I personally wouldn&#8217;t recommend using it in live projects of any importance, or at least jump in expecting a solid product; It&#8217;ll get there, but it&#8217;s not there yet. Enough apologies. I think this thing is awesome <img src='http://www.doomsday.no/esn/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>Grab the swc or join the bug smashing at <a href="http://code.google.com/p/doomsday-console-64/">http://code.google.com/p/doomsday-console-64/</a></p>
<h3>Me + Furu Systems = Yay!</h3>
<p>Super stoked about this. I&#8217;ve joined forces with two colleagues from previous workplaces who are also freelancing, to form a development and design collective; Furu Systems. These are super talented guys that I&#8217;ve known since high school, we&#8217;re all really keen on our respective fields, and I&#8217;ll be moving most of my business through that name from here on.</p>
<p>I&#8217;ll be mirroring most of my technical writing on our (currently blank) <a href="http://blog.furusystems.com/">blog</a>, as well as do in-depth post mortems of projects whenever possible. I hope to make the work process itself sort of open source, to make sure lessons are learned and shared. </p>
<p>If you&#8217;re interested in working with me / dudes that are rad, keep <a href="http://www.furusystems.com">www.furusystems.com</a> in mind.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2011/01/doomsday-console-64-public-an-announcement/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finite state machine, J&#8217;adore</title>
		<link>http://www.doomsday.no/esn/2011/01/finite-state-machine-jadore/</link>
		<comments>http://www.doomsday.no/esn/2011/01/finite-state-machine-jadore/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 15:37:36 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game dev & design]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[semicolons]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1191</guid>
		<description><![CDATA[I tend to program in a results-first orientation, which means I often simply don&#8217;t find the time or benefit in implementing design patterns or frameworks such as PureMVC or Robotlegs, or even less complex ones. This is not because these patterns are without merit (quite the contrary), but because in my experience the scale and [...]]]></description>
			<content:encoded><![CDATA[<p>I tend to program in a results-first orientation, which means I often simply don&#8217;t find the time or benefit in implementing design patterns or frameworks such as PureMVC or Robotlegs, or even less complex ones. This is not because these patterns are without merit (quite the contrary), but because in my experience the scale and complexity an application will have to be at is quite high for it to necessitate such patterns, which introduce complexity in and of themselves. This includes introducing what you could call &#8220;foreign grammar&#8221; into a more natural dialect. Robotlegs in particular introduces so many new words, to a beginner it may feel like learning a new language altogether. This would, I feel, often get in the way of simply getting the job done, not to mention having to explain the framework to whoever comes next to maintain the project.</p>
<p>But this post is not about complex patterns. It&#8217;s about a very simple one; The first one I learned that used several classes as well as interfaces. Somewhat infamously at this point, I&#8217;m notoriously fond of interfaces and the freedom they offer the developer -which is ironic, because they are about limitations and requirements- and if you want to trace that love to its inception, the &#8220;finite state machine&#8221; is it. <span id="more-1191"></span></p>
<h2>What is a state machine?</h2>
<p>A state machine is a complex (but cool sounding) term for an object that can be in <em>one</em> of a <em>limited selection</em> of states. The typical example is the light switch: It can be in two states; on or off. The light-bulb can be lit or dark. The power can be up or down. Maybe you have poor wiring; the power can be fluctuating as well, a third state. In fact, as a Flash developer, you have probably been working with states and finite state machines ever since you first started playing around with the Flash IDE.  MovieClips are nothing but state machines where every frame is a state. A MovieClip of a walk cycle animation contains a state in which the character&#8217;s left foot is touching the ground. It can also be in a state where the left foot is lifted.</p>
<p>If this sounds like I&#8217;m overstating the obvious, I really am. A basic state machine is an exceedingly simple concept. Where state machines begin to shine however is in the concept of &#8220;transitions&#8221;.</p>
<h2>What is a transition?</h2>
<p>A transition is, as you&#8217;ve guessed, the proceedings that take place when a state machine changes its state. We don&#8217;t <em>need</em> transitions for a state machine to fulfill its purpose, but they are very powerful. A rule that is important to reiterate is that a state machine can <em>only ever be in one state, </em>and it&#8217;s this rule that offers one of the core benefits of the pattern; A sense of clarity.</p>
<p>(In this way programming is like maths to me. You know that 1+1=2, and that is a <em>fact of the universe</em>. Doesn&#8217;t it feel great to have such a solid grasp of reality?)</p>
<p>So given that a state machine can only ever be in one state, how would we change that state? Let&#8217;s go with the MovieClip example for now. Let&#8217;s say that MovieClips don&#8217;t exist, and we have to design their logic.</p>
<p>Our animation consists of a set of states, each describing a frame, and for a frame of animation the concept of a transition is simple; you simply tell the MovieClip to set its current state to another indexed frame, and the state changes, bam. Right? But even this simple state change has a <em>transition. </em>The previous frame is <em>removed</em>, and the new frame is <em>shown</em>. This transition could be handled by the state machine itself (in this case, the MovieClip), or by the individual frame. In the case of a dumb MovieClip with no logic attached to frames, our hypothetical reinvented MovieClip could handle this state transition just fine:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> currentFrame<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">index</span>:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span><br />
removeChild<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_currentFrame</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">_currentFrame</span> = frames<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">index</span><span style="color: #66cc66;">&#93;</span>;<br />
addChild<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_currentFrame</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>Let&#8217;s assume our frames have content however. Let&#8217;s say the first frame has a video player, and that the next frame has a sound to play. The video should stop, and the sound should begin playing. The state machine, in this case the MovieClip, doesn&#8217;t need to know exactly what is contained in the frames, but it does need to tell them to shut down and initialize. Again, not hard to imagine.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> currentFrame<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">index</span>:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">_currentFrame</span>.<span style="color: #006600;">shutdown</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
removeChild<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_currentFrame</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">_currentFrame</span> = frames<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">index</span><span style="color: #66cc66;">&#93;</span>;<br />
addChild<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_currentFrame</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">_currentFrame</span>.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>And voila, we have described the state machine pattern that I have become so fond of, in its entirety!</p>
<h2>Applying the state machine pattern</h2>
<p>When I first started reading about artificial intelligence for games, state machines were introduced very rapidly. AI behavior could be described as a graph where each node was linked to possible states it could transition to. For instance an AI in a sneaking game could be defined by a graph such as this:<br />
<img class="aligncenter size-full wp-image-1246" title="Diagram1" src="http://www.doomsday.no/esn/wp-content/uploads/2011/01/Diagram1.png" alt="" width="265" height="332" /></p>
<p>Each box is a state the AI can be in, and the arrows represent possible transitions, each defined by the states themselves. The framework driving the AI only really needs to keep updating the current state, and let the logic of each state define the behavior.</p>
<p>I&#8217;ve written a primitive version of this AI using the state machine pattern, defining a simple autonomous agent that can move around the world, and a set of states that define its possible behaviors. Let&#8217;s take a look!</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_StateMachineAgentDemo_1459512175"
			class="flashmovie"
			width="600"
			height="300">
	<param name="movie" value="http://www.doomsday.no/misc/StateMachineAgentDemo.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.doomsday.no/misc/StateMachineAgentDemo.swf"
			name="fm_StateMachineAgentDemo_1459512175"
			width="600"
			height="300">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Our Agent is a small, overconfident, myopic black arrow. He will hang out for a bit, then wander around at random, pausing once in a while. When the mouse cursor is in front of him within a certain radius, he will chase after it. When he comes close however, he&#8217;ll freak out and run away until he reaches a safe distance. Then he will resume his normal behavior again.</p>
<p>This behavior is defined by the following states</p>
<p><img class="aligncenter size-full wp-image-1237" title="Diagram2" src="http://www.doomsday.no/esn/wp-content/uploads/2011/01/Diagram2.png" alt="" width="248" height="211" /></p>
<p>Each state implements the IAgentState interface, which looks like this:</p>
<p><strong>The IAgentState interface</strong></p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package agent.<span style="color: #006600;">states</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> agent.<span style="color: #006600;">Agent</span>;<br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">interface</span> IAgentState<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>; <span style="color: #808080; font-style: italic;">//called every frame</span><br />
<span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">enter</span><span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>; <span style="color: #808080; font-style: italic;">//called when the state becomes the current state</span><br />
<span style="color: #000000; font-weight: bold;">function</span> exit<span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>; <span style="color: #808080; font-style: italic;">//called when the state ceases to be the current state</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>This interface specifies 3 methods to be called by the state machine, each taking a reference to the state machine itself. I like to work on this reference because AI states can be treated as largely abstract; It&#8217;s not hard to conceive of several different types of agent needing the wandering behavior, and it is nice to be able to reuse the same behavior instance. Let&#8217;s look at the Idle state to see what this means.</p>
<p><strong>The Idle state</strong></p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package agent.<span style="color: #006600;">states</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> agent.<span style="color: #006600;">Agent</span>;<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> IdleState <span style="color: #0066CC;">implements</span> IAgentState<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">/* INTERFACE agent.states.IAgentState */</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">numCycles</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">//Have we executed/idled for 30 frames?</span><br />
a.<span style="color: #006600;">setState</span><span style="color: #66cc66;">&#40;</span>Agent.<span style="color: #006600;">WANDER</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//Then let's take a walk</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">enter</span><span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
a.<span style="color: #006600;">say</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Idling...&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
a.<span style="color: #006600;">speed</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #808080; font-style: italic;">//Stop the agent</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> exit<span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
a.<span style="color: #006600;">randomDirection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//When we leave this state, face the agent in a random direction</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p><strong>The wander state</strong></p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package agent.<span style="color: #006600;">states</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> agent.<span style="color: #006600;">Agent</span>;<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> WanderState <span style="color: #0066CC;">implements</span> IAgentState<br />
<span style="color: #66cc66;">&#123;</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
a.<span style="color: #006600;">say</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Wandering...&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
a.<span style="color: #006600;">velocity</span>.<span style="color: #006600;">x</span> += <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.2</span> - <span style="color: #cc66cc;">0.1</span>; <span style="color: #808080; font-style: italic;">//very simple wander behavior,</span><br />
a.<span style="color: #006600;">velocity</span>.<span style="color: #006600;">y</span> += <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.2</span> - <span style="color: #cc66cc;">0.1</span>;<br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">numCycles</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">120</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
a.<span style="color: #006600;">setState</span><span style="color: #66cc66;">&#40;</span>Agent.<span style="color: #006600;">IDLE</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//Let's take a break every 120 updates</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>a.<span style="color: #006600;">canSeeMouse</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span>;<br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">distanceToMouse</span> <span style="color: #66cc66;">&lt;</span> a.<span style="color: #006600;">fleeRadius</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
a.<span style="color: #006600;">setState</span><span style="color: #66cc66;">&#40;</span>Agent.<span style="color: #006600;">FLEE</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">distanceToMouse</span> <span style="color: #66cc66;">&lt;</span> a.<span style="color: #006600;">chaseRadius</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
a.<span style="color: #006600;">setState</span><span style="color: #66cc66;">&#40;</span>Agent.<span style="color: #006600;">CHASE</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">enter</span><span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
a.<span style="color: #006600;">speed</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #808080; font-style: italic;">//Begin moving the agent</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> exit<span style="color: #66cc66;">&#40;</span>a:Agent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>At this point I am sure you are getting the idea; The states themselves contain no data, and are entirely dependent on a state machine instance to interact with. In this case, it&#8217;s almost like a set of template methods that are being swapped out. The nice thing here is that instead of creating a ton of state objects for every agent, we can reuse the same states. Click the stage in the above swf to create new agents, all using the same static states.</p>
<p>Finally, we&#8217;ll look at the state machine itself.</p>
<p><strong>The Agent class</strong></p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package agent<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> agent.<span style="color: #006600;">states</span>.<span style="color: #66cc66;">*</span>;<br />
<span style="color: #808080; font-style: italic;">//imports omitted</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const IDLE:IAgentState = <span style="color: #000000; font-weight: bold;">new</span> IdleState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//Define possible states as static constants</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const WANDER:IAgentState = <span style="color: #000000; font-weight: bold;">new</span> WanderState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const CHASE:IAgentState = <span style="color: #000000; font-weight: bold;">new</span> ChaseState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const FLEE:IAgentState = <span style="color: #000000; font-weight: bold;">new</span> FleeState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const CONFUSED:IAgentState = <span style="color: #000000; font-weight: bold;">new</span> ConfusionState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _previousState:IAgentState; <span style="color: #808080; font-style: italic;">//The previous executing state</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _currentState:IAgentState; <span style="color: #808080; font-style: italic;">//The currently executing state</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> velocity:Point = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> speed:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;<br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> fleeRadius:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">50</span>; <span style="color: #808080; font-style: italic;">//If the mouse is &quot;seen&quot; within this radius, we want to flee</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> chaseRadius:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">150</span>; <span style="color: #808080; font-style: italic;">//If the mouse is &quot;seen&quot; within this radius, we want to chase</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> numCycles:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #808080; font-style: italic;">//Number of updates that have executed for the current state. Timing utility.</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Agent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">//Boring stuff omitted</span><br />
<br />
_currentState = IDLE; <span style="color: #808080; font-style: italic;">//Set the initial state</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Update the current state, then update the graphics<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>_currentState<span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span>; <span style="color: #808080; font-style: italic;">//If there's no behavior, we do nothing</span><br />
numCycles++;<br />
_currentState.<span style="color: #006600;">update</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;<br />
x += velocity.<span style="color: #006600;">x</span><span style="color: #66cc66;">*</span>speed;<br />
y += velocity.<span style="color: #006600;">y</span><span style="color: #66cc66;">*</span>speed;<br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>x + velocity.<span style="color: #006600;">x</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span> <span style="color: #66cc66;">||</span> x + velocity.<span style="color: #006600;">x</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">max</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">min</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>, x<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; velocity.<span style="color: #006600;">x</span> <span style="color: #66cc66;">*</span>= -<span style="color: #cc66cc;">1</span>; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>y + velocity.<span style="color: #006600;">y</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span> <span style="color: #66cc66;">||</span> y + velocity.<span style="color: #006600;">y</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
y = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">max</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">min</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span>, y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
velocity.<span style="color: #006600;">y</span> <span style="color: #66cc66;">*</span>= -<span style="color: #cc66cc;">1</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
_pointer.<span style="color: #006600;">rotation</span> = RAD_DEG <span style="color: #66cc66;">*</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">atan2</span><span style="color: #66cc66;">&#40;</span>velocity.<span style="color: #006600;">y</span>, velocity.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setState<span style="color: #66cc66;">&#40;</span>newState:IAgentState<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_currentState == newState<span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span>;<br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_currentState<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
_currentState.<span style="color: #006600;">exit</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
_previousState = _currentState;<br />
_currentState = newState;<br />
_currentState.<span style="color: #0066CC;">enter</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;<br />
numCycles = <span style="color: #cc66cc;">0</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> previousState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:IAgentState <span style="color: #66cc66;">&#123;</span> <span style="color: #b1b100;">return</span> _previousState; <span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> currentState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:IAgentState <span style="color: #66cc66;">&#123;</span> <span style="color: #b1b100;">return</span> _currentState; <span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>As you can see, we are still applying the same theory as in our MovieClip example; Close what you had, open what you&#8217;re getting, and since we&#8217;re doing realtime stuff, update what you got. I&#8217;ve put up the source for this example, in case you&#8217;re curious to <a href="http://www.doomsday.no/misc/statemachine_example_src.rar">take a peek</a>.</p>
<h2>Summing it up</h2>
<p>State machines are mechanisms that have their behavior defined by a known set of states. Knowing this, you can easily jot down your application as a state graph and use the state pattern and a rudimentary state machine to throw together a click through for instance, while maintaining scalability. I&#8217;m just scraping the surface. State machines have a huge number of uses, from managing visual states, to choosing which game state to execute, such as the title screen, leaderboards, game loop etc, to state machines creating new dynamic state machines during parsing algorithms. States themselves can very well be state machines.</p>
<p>I hope I haven&#8217;t bored you to death with my rambling. I&#8217;ve used this pattern and variations of it for a wide range of projects. It&#8217;s a safe bet for prototyping, almost indispensable for game development, and super stupid easy to pick up. Thank for your reading <img src='http://www.doomsday.no/esn/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2011/01/finite-state-machine-jadore/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Using the AS3 Dictionary utility</title>
		<link>http://www.doomsday.no/esn/2011/01/using-the-as3-dictionary-utility/</link>
		<comments>http://www.doomsday.no/esn/2011/01/using-the-as3-dictionary-utility/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 13:12:18 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1109</guid>
		<description><![CDATA[Edit: As some comments point out, I&#8217;ve misunderstood the exact nature of a weak dictionary, and I&#8217;ve updated the post accordingly. Thanks readers! Just a quick post to point out how freaking sweet the AS3 Dictionary utility is. They have rapidly become my favorite data structure for the simple reason that they allow you to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Edit:</strong> As some comments point out, I&#8217;ve misunderstood the exact nature of a weak dictionary, and I&#8217;ve updated the post accordingly. Thanks readers! <img src='http://www.doomsday.no/esn/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Just a quick post to point out how freaking sweet the AS3 Dictionary utility is. They have rapidly become my favorite data structure for the simple reason that they allow you to create a fast hash map of sorts of any key/value set in a way that lets you integrate more elegantly with garbage collection.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//oldskool hash table entry</span><br />
<span style="color: #000000; font-weight: bold;">var</span> map:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> hash:<span style="color: #0066CC;">String</span> = myHashableObject.<span style="color: #006600;">getHash</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
map<span style="color: #66cc66;">&#91;</span>hash<span style="color: #66cc66;">&#93;</span> = myHashableObject;</div></div>
<p>The glory of hash tables of course is O(1) lookup speed; The ability to see if an object has been stored and to retrieve it without first iterating over the collection or doing some other search. </p>
<p>The wonderful thing about Dictionaries is how they simplify this process. You don&#8217;t need a hashing function anymore: To collect a set of objects, all you really need to do is use the same object for both key and value:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//super illin'</span><br />
<span style="color: #000000; font-weight: bold;">var</span> map:Dictionary = <span style="color: #000000; font-weight: bold;">new</span> Dictionary<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <br />
map<span style="color: #66cc66;">&#91;</span>myObject<span style="color: #66cc66;">&#93;</span> = myObject;</div></div>
<p>This nets you the O(1) lookup, collection iteration through for..each and for..in, and the sexy, sexy ability to declare the Dictionary &#8220;weak&#8221;, meaning it won&#8217;t stop its key from being garbage collected.</p>
<p>Weak dictionaries are a cornerstone of the DConsole for performance, and to make sure inspecting an object wouldn&#8217;t create a strong reference to it. They are also used throughout the autocomplete solution in the form of <a href="http://en.wikipedia.org/wiki/Ternary_search_tree">ternary trees</a>. </p>
<p>Dictionaries let you approach object collections of any time with ease and elegance. I strongly recommend you play around with them if you haven&#8217;t already.</p>
<p>Look out for an upcoming post detailing the Notification framework used by Doomsday Console 64, as it offers an excellent use case.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2011/01/using-the-as3-dictionary-utility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sessions I&#8217;d like to do at FOTB</title>
		<link>http://www.doomsday.no/esn/2010/10/sessions-id-like-to-do-at-fotb/</link>
		<comments>http://www.doomsday.no/esn/2010/10/sessions-id-like-to-do-at-fotb/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 00:12:28 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[FOTB]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1117</guid>
		<description><![CDATA[So hey guys, voting for the Flash on the Beach elevator pitchers has started, and while I wouldn&#8217;t dream of saying I&#8217;m more deserving than any of the other guys &#8211; This year&#8217;s elevator pitch was filled to the humbling max with radical dudes and dudettes &#8211; I&#8217;m going to amuse myself by entertaining the [...]]]></description>
			<content:encoded><![CDATA[<p>So hey guys, voting for the Flash on the Beach elevator pitchers has started, and while I wouldn&#8217;t dream of saying I&#8217;m more deserving than any of the other guys &#8211; This year&#8217;s elevator pitch was filled to the humbling max with radical dudes and dudettes &#8211; I&#8217;m going to amuse myself by entertaining the idea of myself doing a full hour long session next year..</p>
<p>So what would I do with a full hour? The mind boggles! Let&#8217;s brainstorm!</p>
<p><strong>1. Hacking your app with AS3</strong><br />
The obvious one, considering my pitch concerned the Doomsday Console, ostensibly a hacking tool. Flash is super flexible, and I&#8217;d love to do a session on wringing stuff out of AS3 you wouldn&#8217;t expect to be easily doable.</p>
<p><strong>2. Why OOP is the absolute bomb and everyone should be head over heels in love with it</strong><br />
OOP is why I&#8217;m a developer. Not because I want to create objects all day (oh but I do), but because it is what enabled me to actually fall in love with programming in the first place. I have written a post on this in the past, and I&#8217;d love to do a beginners/for designers session on how OOP allows us to be free, comfortable and creative with our language, even though we are still telling a computer where to put bits. </p>
<p><strong>3. Stop trying to make the internet boring!</strong><br />
This is the one I want the most to do I think.. I&#8217;ve written a <a href="http://www.doomsday.no/esn/2010/04/stop-trying-to-make-the-internet-boring/">huge rant</a> on this topic in the past, and I still burn for it. Nerds and businessmen are trying to steal the internet away from its rightful owner &#8211; the people &#8211; and we have to stop them by getting fucking crazy up in here! An hour long discussion/rant paired with content dug up from the weirdest bits of the web.</p>
<p>Any of these sound interesting to you? Then I&#8217;d be honored to <a href="http://www.flashonthebeach.com/feedback2010/">have your vote</a> this year <img src='http://www.doomsday.no/esn/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/10/sessions-id-like-to-do-at-fotb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instance mapping singletons</title>
		<link>http://www.doomsday.no/esn/2010/08/automating-singleton-creation/</link>
		<comments>http://www.doomsday.no/esn/2010/08/automating-singleton-creation/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 18:37:01 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Singletons]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1080</guid>
		<description><![CDATA[So I&#8217;m a big fan of singletons; SUE ME. They&#8217;re the most rad thing ever and if you think otherwise you are a wrong person. One of the things that have bothered me about them though is the necessity for adding boring boilerplate code, such as the ubiquitous getInstance() or its younger brother, the static [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m a big fan of singletons; SUE ME. They&#8217;re the most rad thing ever and if you think otherwise you are a wrong person.</p>
<p>One of the things that have bothered me about them though is the necessity for adding boring boilerplate code, such as the ubiquitous getInstance() or its younger brother, the static instance getter. For projects using a lot of singletons, such as states for state machines, this is the most boring shit ever.</p>
<p>Enter the instance map.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SingletonManager<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _map:Dictionary = <span style="color: #000000; font-weight: bold;">new</span> Dictionary<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* Retrieves a cached instance of a class type<br />
&nbsp; &nbsp; &nbsp;* @param &nbsp; type<br />
&nbsp; &nbsp; &nbsp;* The class to instantiate/cache or retrieve<br />
&nbsp; &nbsp; &nbsp;* @return<br />
&nbsp; &nbsp; &nbsp;* The class instance. Ye gods I wish we had generics.<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getInstance<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>:<span style="color: #000000; font-weight: bold;">Class</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_map<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>= <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> _map<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _map<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _map<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* Checks if an instance has been created<br />
&nbsp; &nbsp; &nbsp;* @param &nbsp; type<br />
&nbsp; &nbsp; &nbsp;* @return<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> contains<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>:<span style="color: #000000; font-weight: bold;">Class</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _map<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>= <span style="color: #000000; font-weight: bold;">null</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>Short and sweet. The difference is you no longer request your instance from the class itself, but from this manager, using the class type as the argument. If one has been created before, you get that instance. If not, a new one is created and cached. </p>
<p>Downsides are obvious; You lose some benefits of strong typing (easily overcome), and the verbosity of your code increases quite a bit;</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">stateManager.<span style="color: #006600;">setCurrentState</span><span style="color: #66cc66;">&#40;</span>SingletonManager.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span>MyState<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></div>
<p>Benefits are grand however. *Any* class can be handled as though it were a singleton, you maintain a localized cache of all singletons making disposal fast and easy, and the contains() method allows easy testing to see if a singleton has been instantiated or not.</p>
<p>I&#8217;m quite enamored with this approach. How do you guys feel about it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/08/automating-singleton-creation/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>AIR HTMLLoaders and mouse events</title>
		<link>http://www.doomsday.no/esn/2010/08/air-htmlloaders-and-mouse-events/</link>
		<comments>http://www.doomsday.no/esn/2010/08/air-htmlloaders-and-mouse-events/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 23:18:33 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[HTMLLoader]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1077</guid>
		<description><![CDATA[Just a quick tip. If you&#8217;re wanting to listen to MOUSE_DOWN events from an AIR HTMLLoader, and want any and all mousedowns, not just HTML link clicks and the like, simply use the event&#8217;s capture phase: htmlLoaderContainer.addEventListener&#40;MouseEvent.MOUSE_DOWN,myHandler,true&#41; Bam, problem solved. I read some posts online about this issue and no good solutions, so here you [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick tip.</p>
<p>If you&#8217;re wanting to listen to MOUSE_DOWN events from an AIR HTMLLoader, and want <em>any and all</em> mousedowns, not just HTML link clicks and the like, simply use the event&#8217;s capture phase:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">htmlLoaderContainer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_DOWN</span>,myHandler,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span></div></div>
<p>Bam, problem solved. I read some posts online about this issue and no good solutions, so here you have it <img src='http://www.doomsday.no/esn/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/08/air-htmlloaders-and-mouse-events/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dangerous code geeks</title>
		<link>http://www.doomsday.no/esn/2010/07/dangerous-code-geeks/</link>
		<comments>http://www.doomsday.no/esn/2010/07/dangerous-code-geeks/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 18:00:32 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[ECMA]]></category>
		<category><![CDATA[Geeks]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1035</guid>
		<description><![CDATA[I recently read through Peter Seibel&#8217;s excellent Coders at work, and if you&#8217;re a developer of any sort, I reckon you should too. Three interviews in the book stood out to me, though they are all excellent; Jamie Zawinski, Douglas Crockford and Brendan Eich. Jamie&#8217;s interview cements the notion of a duct tape programmer; A [...]]]></description>
			<content:encoded><![CDATA[<p>I recently read through Peter Seibel&#8217;s excellent <a href="http://www.codersatwork.com/" target="_blank">Coders at work</a>, and if you&#8217;re a developer of any sort, I reckon you should too. Three interviews in the book stood out to me, though they are all excellent; Jamie Zawinski, Douglas Crockford and Brendan Eich.</p>
<p>Jamie&#8217;s interview cements the notion of a <a href="http://www.joelonsoftware.com/items/2009/09/23.html" target="_blank">duct tape programmer</a>; A developer who understands that in real life, the work is WORK, and problems need to be solved pragmatically for deadlines to be met, paychecks to be cashed in and children to be fed. He&#8217;s an autodidact, he has worked with people &#8220;smarter&#8221; and &#8220;dumber&#8221; than himself, but none of that fazes him. It&#8217;s work, and he does it well. The goal is to finish something that works according to expectations.</p>
<p>Reading this interview I personally felt a huge relief. I&#8217;ve worked with others from designers who can barely understand why curly braces exist to having my code reviewed (and panned) by university computer science graduates. On one end of the spectrum, I am a wizard, where I enable things others can&#8217;t even understand is possible. It feels fantastic. On the other, I&#8217;m a heathen. Why all these singletons? Why no dependency injection? Why not this? Why not that? &#8220;Over there&#8221;, I don&#8217;t know what&#8217;s what.</p>
<p>But, you know, for the most part, I simply do what is necessary to meet the demands within the alotted time frame, and to be able to adapt quickly when changes are inevitably requested. It makes for code that is often ad-hoc and cobbled together. I have never regretted this; My work can turn on a dime. I refuse to let someone geekier than me kill my personal joy in programming; Creating things.</p>
<p>Compared to Zawinski, Crockford and Eich are almost polar opposites, and their interviews, side by side, read like an argument and its rebuttal. Crockford is, from what I can tell, a programming &#8220;geek&#8221;. We should all know the geek-nerd-dork-dweeb venn diagram by now:</p>
<p><a href="http://www.doomsday.no/esn/wp-content/uploads/2010/07/nerd-venn-diagram-20090915-092804.jpg"><img class="aligncenter size-full wp-image-1036" title="nerd-venn-diagram-20090915-092804" src="http://www.doomsday.no/esn/wp-content/uploads/2010/07/nerd-venn-diagram-20090915-092804.jpg" alt="" width="434" height="407" /></a></p>
<p><span id="more-1035"></span></p>
<p>Crockford and Eich disagree strongly on the ECMAScript 4 specification, which Eich designed in committee with Adobe and others. ECMA4 is, as we know, ActionScript 3. Crockford spends his interview first acknowledging the problems of ECMA3 in its JavaScript implementation; Reliance on a global object and resultant issues with the security model. Beyond that, JavaScript is apparently a godsend by virtue of being a true &#8220;lambda language&#8221;.</p>
<p>Let&#8217;s digress for a minute or two.</p>
<h3>&#8220;Lambda&#8221;</h3>
<p>If you&#8217;re not familiar with this incredibly geeky term, in terms of ActionScript and JavaScript a &#8220;lambda function&#8221; is best understood as a function that isn&#8217;t declared a class or instance function but rather kept in a variable and passed around, or just called right then and there and then left to garbage collection. Here are some examples:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//Anonymous function simply returning a value</span><br />
<span style="color: #000000; font-weight: bold;">var</span> n:<span style="color: #0066CC;">Number</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">20</span>; <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//n is assigned the value 20</span><br />
<span style="color: #000000; font-weight: bold;">var</span> a:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span>;<br />
<span style="color: #808080; font-style: italic;">//Anonymous (lambda) function creating and calling an anonymous (lambda) function of its own</span><br />
<span style="color: #000000; font-weight: bold;">var</span> sum:<span style="color: #0066CC;">Number</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">var</span> n:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;  a.<span style="color: #b1b100;">forEach</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">index</span>:<span style="color: #0066CC;">int</span>, <span style="color: #0066CC;">array</span>:<span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> n += value; <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">return</span> n; <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//Function returning a lambda function</span><br />
<span style="color: #000000; font-weight: bold;">function</span> getFunc<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #000000; font-weight: bold;">Function</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Hello lambda&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#125;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
getFunc<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//crazy lookin' but completely valid</span></div></div>
<p>As you can guess, lambda functions are hugely powerful. Passing references to functions around with adjustable scope is a fantastic tool, and though I personally feel like anonymous functions drastically reduce the readability of the code and introduce complexity where reusability should be preferred, I still use them from time to time.</p>
<p>Back when I first started learning object oriented programming, it was in Flash 5 ActionScript 1, which adhered closely to ECMA3. I wanted to learn game programming, and here was a language that didn&#8217;t offer almost any of the terminology every book and article I read was referring to. Classes, inheritance, interfaces, none of that. Flash developers struggled to adapt to a market that demanded larger and more complex applications in a language to which the closest parallel was one that barely could scale an image or change the value of a form field.</p>
<p>The Flash community, like the JavaScript community, became home to some seriously clever hackers. There was a lot of crossover as coders in either camp struggled to wrangle some order into the languages they were bound to. Soon, I was taught how to create classes in Flash, but our classes were simply anonymous functions.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">var</span> obj:<span style="color: #000000; font-weight: bold;">Function</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">this</span>.<span style="color: #006600;">bool</span> = <span style="color: #000000; font-weight: bold;">true</span>;<br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;MyObject&quot;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> myObj:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> obj<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>myObj.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span>;</div></div>
<p>This approach necessitated judicious understanding of scope, and resulted in more this-keywords than you ever see in modern programming. Yet we had no inheritance. I don&#8217;t even want to write about the boring, convoluted boilerplate code we had to write time and time again to approximate a simple &#8220;class Foo extends MovieClip&#8221;. Everything that now is nice and orderly was a hack then.</p>
<p>Of course there were boons still. We grew accustomed to manipulating the prototype chain, by which we could give any object new properties by way of manipulating its prototype. For instance.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0066CC;">MovieClip</span>.<span style="color: #0066CC;">prototype</span>.<span style="color: #006600;">flipX</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_xscale</span> = -<span style="color: #cc66cc;">1</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
anyMovieClip.<span style="color: #006600;">flipX</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></div>
<p>In retrospect, was jerking off the prototype chain worth the syntactic mess we were dealing with? Personally, I would rather forget those years. Learning was slow, development was convoluted, and mastery always seemed far away. It was difficult to settle into a comfortable groove. On larger projects (I worked on an AS1 MMO at one point) code maintenance was almost completely unbearable. Reusability was a joke.</p>
<p>Long story short, 2 years into my career as an ActionScript developer, I had an ulcer, and I had gallstones the size of my thumbnail (bybye gall bladder). The stress and discomfort associated with AS1 development made me swear off the industry altogether at one point. It took nearly 6 months to reel me back in. Thank god I was met with AS2 and concessions towards traditional coding practices. When AS3 landed, my world snapped into place. Now I could work. Thank you ECMAscript 4.</p>
<h3>Mommy, don&#8217;t make me go back there!</h3>
<p><a href="http://www.doomsday.no/esn/wp-content/uploads/2010/07/scared-kid.jpg"><img class="aligncenter size-full wp-image-1040" title="scared-kid" src="http://www.doomsday.no/esn/wp-content/uploads/2010/07/scared-kid.jpg" alt="" width="384" height="194" /></a></p>
<p>Reading Crockford&#8217;s arguments for ECMA 3.1 as he simultaneously decries the dominance of C++ over Eiffel is terrifying, simply because the man has real power. He&#8217;s a JavaScript evangelist (of all things) who, to my ears, sounds more enamored with the technicalities and THEORIES than the real world applications. He&#8217;s clearly intelligent, clearly obsessive, and clearly out of touch with the fact that thousands of people make their living using and loving a programming language he condemns for its &#8220;complexity&#8221;.</p>
<p>I&#8217;ll reiterate my strong respect for the JavaScript community; They have taken a language that literally made me cough up blood and have to give up fatty foods and wrangled it into shape with frameworks like jQuery and Prototype which finally allow developers to do <em>real work</em>. But this doesn&#8217;t change the fact that the fundamental language was painful enough to necessitate this sort of wrangling. Hell, jQuery syntax barely resembles JavaScript. As CSS3/JS/HTML5 looms ahead, the notion that the future of the base language is controlled at least in part by people who actually LIKE the bits the community has done its best to override. As a consequence, the Flash community as well are collateral damage as Adobe need to defend their &#8220;flawed&#8221; language.</p>
<p>I can&#8217;t recall the ActionScript community complaining about the complexity or verbosity of the language itself. We have our issues more with the lack of complexity, such as lack of abstract keyword, or in some cases with the verbosity of the flash framework, ie addEventListener, but are we really bothered by how &#8220;complicated&#8221; it is?<br />
Anyone wanting the loose anarchy of AS2 can switch off strict mode and prototype and dynamic type and lambda the shit out of anything all they want.</p>
<p>So the argument seems to be then that those of us enjoying the complexity and verbosity are somehow <strong>wrong</strong>.</p>
<p>And that&#8217;s the crux of the problem for me. Programming languages should be judged by their merits, not their subjective aesthetic qualities.</p>
<p>After years of ECMA4, and a blooming, prosperous Flash community being the testbed for that language, how can we call it wrong?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/07/dangerous-code-geeks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What&#8217;s going on with Doomsday Console?</title>
		<link>http://www.doomsday.no/esn/2010/06/whats-going-on-with-doomsday-console/</link>
		<comments>http://www.doomsday.no/esn/2010/06/whats-going-on-with-doomsday-console/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 22:08:19 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Doomsday Console]]></category>
		<category><![CDATA[FOTB]]></category>
		<category><![CDATA[Wall of text]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=1015</guid>
		<description><![CDATA[Considering this is my elevator pitch topic at Flash on the Beach this year; Seen this thing before? If any of you have been following our googlecode repository, you have probably noticed a lack of significant updates . There is a simple reason for this; We are giving it a pretty serious overhaul, so much [...]]]></description>
			<content:encoded><![CDATA[<p>Considering this is my elevator pitch topic at Flash on the Beach this year; Seen this thing before?</p>
<p><img class="alignnone" title="Doomsday console screenshot" src="http://andreas.creunaclient.no/blogfiles/screenshot.PNG" alt="" width="765" height="403" /></p>
<p>If any of you have been following our <a href="http://code.google.com/p/doomsdayconsole/" target="_blank">googlecode repository</a>, you have probably noticed a lack of significant updates . There is a simple reason for this; We are giving it a pretty serious overhaul, so much so we have decided to move development to a closed repository until we feel a publication of the new codebase is worthwhile. Central to 2.0 is a new emphasis on usability. I&#8217;ll use this as an excuse to effectively re-announce the Doomsday Console, and outline the strategy we are undertaking henceforth.<span id="more-1015"></span></p>
<h2>What is Doomsday Console 2.0?</h2>
<h3>1. A logger</h3>
<p>The Doomsday Console is a hidden debugging utility you can easily include in your Flash or Flex application. At its most basic, it offers an output text field for logging/tracing purposes. You &#8220;print&#8221; to this field with a static method. The print method takes a number of arguments, endowing printed lines with various functionality. For instance, you can simply print out a text message, but you can also color code it, or make it a hyper-link of sorts to related objects, or even the method that caused the print to begin with. Printed messages can be filtered by source, color, arbitrary flags, and searched quickly. With the DDConsole, a printed message is no longer just a bit of information; It is a bit of information you can respond to, and use as a basis for further runtime investigation.</p>
<p><strong>This is the first pillar of the design of 2.0: </strong>A context-aware output window of user-configurable granularity, allowing any number of appended metadata of any type.</p>
<h3>2. A command-line interface</h3>
<p>The Doomsday Console is a command-line interface with a simple syntax, robust self-documenting auto-complete and persistent command history, ensuring every time you rebuild your app, you can continue right where you were. Built-in console commands nets you application introspection, allowing you to traverse the application structure much like the file system on your computer, calling methods with variable arguments, altering exposed variables, and even instantiating new objects and altering the display list.</p>
<p>New commands are easily created through a static &#8220;createCommand&#8221; method, allowing you to call any method in your application from any context; Invaluable for on-site debugging or game testing. Through custom commands, you can easily create full command-line applications; Excellent when developing remote APIs or networked apps; For instance, an IRC or Twitter client can easily be thrown together with no other front-end whatsoever.</p>
<p><strong>This is the second pillar of the design of 2.0: </strong>Direct, responsive access to method testing, and a comprehensive set of tools for navigating and altering your application at run-time. The previously overly verbose syntax is altered significantly in 2.0, incorporating a proper lexical parser to allow for a more natural, robust ECMA-style syntax. If you&#8217;re familiar with JavaScript, there isn&#8217;t much of a learning curve.</p>
<h3>3. A scalable collection of visual developer tools and gadgets</h3>
<p>In its early development, before going public, Doomsday Console was a collection of every single visual utility I ever wrote for myself. This included measuring brackets, line guides, wireframe drawing tools, &#8220;controllers&#8221; letting you visually access all properties of a visible DisplayObject, graph charts and the like. The intent was to allow a developer to test out visual changes before committing them to code</p>
<p>For 2.0, this sort of functionality is separate and defined as &#8220;plugins&#8221;. Plugins implement an interface, and are mapped as singletons through a static method. The intent is to create a framework where anyone can design any sort of visual utility, and we can include any old kind of rambling coolness people create without &#8220;polluting&#8221; the core functionality. This also introduces a level of scalability; Prior versions of the console bloated with these utilities, that while useful to some were largely useless to most. Conceivably, this allows for a minimum configuration of the console that shouldn&#8217;t impact the size of your application as dramatically as it has in the past.</p>
<h3>4. Discreet</h3>
<p>The Doomsday Console has been engineered from the start to carry as small a performance footprint as possible. When hidden, it doesn&#8217;t actually do anything at all. The console can be locked with a number of methods, including key sequences, passwords or keystrokes, ensuring it will remain hidden from end-users until needed, allowing you to go live with it embedded with no fear of security hazards. All references stored by the console are weak, and no events are ever dispatched by default.</p>
<h3>5. Neat lookin&#8217;</h3>
<p>Spartan and clean but with an eye for detail, the Doomsday Console should sit pretty on any application. Thoroughly themeable, you can configure it to fit with your company profile should you see fit.</p>
<h3>6. A hacker&#8217;s dream</h3>
<p>The Doomsday Console offers near absolute control of your application. Built-in commands allow you to carry out extensive changes to an application at run-time, from creating graphics and assigning event listeners to creating and positioning new text fields with new textformats. Strings of commands can be run as batch-files, allowing a form of monkey-patching.</p>
<h2>Who would dig it?</h2>
<p>Game developers, developers of on-site applications such as kiosk apps, visualization or art installations, Flex RIA developers wanting extensive runtime debugging utilities. Anyone with a love for Terminal or CMD. Anyone tired of making black box sprite buttons or stage click handlers to test methods. Anyone tired of the compile-trace-rewrite-compile loop.</p>
<h2>When can you get it?</h2>
<p>You can grab 1.0  of the console and do most of this already. <a href="http://code.google.com/p/doomsdayconsole/" target="_blank">Go get it!</a><br />
2.0 will be in concentrated development throughout July by a team of 3, and we&#8217;ll be publishing in anticipation of Flash On The Beach 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/06/whats-going-on-with-doomsday-console/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Elevator pitchin&#8217; at FOTB10</title>
		<link>http://www.doomsday.no/esn/2010/06/elevator-pitchin-at-fotb10/</link>
		<comments>http://www.doomsday.no/esn/2010/06/elevator-pitchin-at-fotb10/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 11:53:03 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[DConsole]]></category>
		<category><![CDATA[FOTB10]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/2010/06/elevator-pitchin-at-fotb10/</guid>
		<description><![CDATA[I&#8217;ll be doing a terrifying 3-minute elevator pitch at this year&#8217;s Flash On The Beach. I applied just for the heck of it, didn&#8217;t assume I&#8217;d get accepted, but weyheyhey. Tension rising! My session will be about my ongoing Doomsday Console project, or more specifically the next iteration of it (which is under super secret [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll be doing a terrifying 3-minute elevator pitch at this year&#8217;s Flash On The Beach. I applied just for the heck of it, didn&#8217;t assume I&#8217;d get accepted, but weyheyhey. Tension rising!</p>
<p>My session will be about my ongoing Doomsday Console project, or more specifically the next iteration of it (which is under super secret development by TOP MEN). I&#8217;ve tried many debugging tools before but none have helped me as much as the DConsole has. It&#8217;s traditionally a very tough sell though. Hope to build some more interest and perhaps cause some thinkings about writing your own tools to enhance your workflow?</p>
<p>3 minutes.. My presentation will need TDSI.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/06/elevator-pitchin-at-fotb10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Audiotool suggestions</title>
		<link>http://www.doomsday.no/esn/2010/04/933/</link>
		<comments>http://www.doomsday.no/esn/2010/04/933/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 17:26:39 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Audiotool]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=933</guid>
		<description><![CDATA[I&#8217;ve been following the Audiotool project with great interest since it began, both because I&#8217;m a Flash developer and a musician. Now that Audiotool 1.0 has been released, with a very broad and interesting suite of devices, I&#8217;m both amazed and put off. As a developer, I&#8217;m utterly blown away that this thing is running [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: normal;">I&#8217;ve been following the Audiotool project with great interest since it began, both because I&#8217;m a Flash developer and a musician. Now that <a href="http://www.audiotool.com" target="_blank">Audiotool 1.0 has been released</a>, with a very broad and interesting suite of devices, I&#8217;m both amazed <em>and</em> put off. </span></p>
<p><span style="font-weight: normal;">As a developer, I&#8217;m utterly blown away that this thing is running in the plugin as well as it is. It&#8217;s a massive feat in terms of engineering. </span></p>
<p><span style="font-weight: normal;">As a musician however, I find it absolutely infuriating to actually use, to the point where I literally can&#8217;t even grit my teeth and brute force my way through making something musical in it. I find it absurd that I am being offered such a suite of interesting and useful tools, yet interface choices and device design niggles consistently impede my progress.</span></p>
<p>I need to stress that I am a huge fan of the research and work being undertaken by these guys, and I think what they&#8217;re doing is absolutely integral to the future development of the Flash platform.</p>
<p><span id="more-933"></span></p>
<h3>A little background.</h3>
<p>I&#8217;ve been using various software sequencers for about 20 years, from ProTracker to Screamtracker, Emagic MicroLogic through Cubase, PlayerPro, Rebirth, Fasttracker 2, MadTracker, Modplug Tracker, Reason, Ableton Live and now most recently having landed firmly on <a href="http://www.renoise.com/" target="_blank">Renoise</a>. If there are any specific features of a sequencer I am after it is accuracy, speed and clarity, which so far has meant returning to trackers time and time again. In other words, I am partial to a keyboard-driven interface, and I don&#8217;t much like scrolling around a window to find what I&#8217;m after.</p>
<p>As for hardware and devices, I currently own and use a Korg R3 and Z1, a Nord Modular G2, a Nord Micro Modular, a Waldorf Blofeld and, oddly, a Theremin. I have been using VST plugins for about as long as they have existed, and I have used both PureData and Max MSP; I am used to cable spaghetti, both virtual and physical.</p>
<p>Musically, I&#8217;m much more of a &#8220;tinkerer&#8221;. I produce few tracks, but I experiment and create patches and loops near constantly. Over time, I&#8217;ve become very interested in synthesizer and sequencer UI.</p>
<p>Now, I&#8217;m well aware that the Audiotool is not intended to replace any of the above mentioned products. It is an educational community oriented tool that offers a sizable subset of synthesis and sample based functionality in the context of a modular &#8220;studio&#8221; environment. It opts for a &#8220;physical look and feel&#8221;, presumably to inspire play and lower the level of abstraction.</p>
<p>So take the following list of issues with a big pinch of salt; These are my personal geeky gripes, but I still feel i should get them out there.</p>
<h3>Effect unit GUI design</h3>
<p>This is my biggest gripe overall, and it may be the most personal; I have no idea why these devices have to take up this much screen real-estate, yet use so little of it on actual GUI, only to maintain a kind of pseudo-simulation of real world devices. Some devices are more guilty of this than others.</p>
<p>For instance, the Kobolt 16 channel mixer pulls it off just fine.</p>
<p><a href="http://www.doomsday.no/esn/wp-content/uploads/2010/04/kobolt.png"><img class="aligncenter size-medium wp-image-934" title="kobolt" src="http://www.doomsday.no/esn/wp-content/uploads/2010/04/kobolt-300x101.png" alt="" width="300" height="101" /></a><br />
I&#8217;m of the personal faith that virtual knobs are a deadly UX sin, being much more in favor of sliders or even value input text boxes, but in the context of a device with this many controls, knobs actually allow for more GUI in less space. The device is obvious and well designed, it looks physical, and uses its real-estate effectively.</p>
<p>However the effects are where things start going downhill.</p>
<p><img class="aligncenter size-full wp-image-935" title="stereodetune" src="http://www.doomsday.no/esn/wp-content/uploads/2010/04/stereodetune.png" alt="" width="202" height="310" /><br />
These things make me absolutely crazy. You look at that &#8220;effect pedal&#8221; and you think hey,  even if it&#8217;s a 150&#215;256 area used to show a total of two knobs and a button, that&#8217;s not THAT bad is it?</p>
<p><a href="http://www.doomsday.no/esn/wp-content/uploads/2010/04/devicechain.png"><img class="aligncenter size-medium wp-image-937" title="devicechain" src="http://www.doomsday.no/esn/wp-content/uploads/2010/04/devicechain-300x92.png" alt="" width="300" height="92" /></a><br />
This is a single effect chain for compressing, filtering, driving, low gaining and delaying a single drum instrument. Actually setting it up, connecting it and using it is no effort at all, but it takes up a chunk of workspace larger than a <em>16 channel mixer</em>, and 60% of that lost space is just a row of big on/off toggle buttons. The pedal metaphor simply falls flat on its face here. Imagine having 8-9 of these chains in addition to your actual instrument devices. You are constantly scrolling around trying to orient yourself as to what goes where. The teensy tiny pixel text labels on the tiny knobs are like a slap in the face of UX conventions as well.</p>
<p><strong>Suggestions:</strong></p>
<ul>
<li>I strongly suggest ditching the antiquated pedal metaphor. Redesign the devices to sit more comfortably in a row, taking up only the space they absolutely require. Alternatively, introduce a <a href="http://www.soundonsound.com/sos/jul05/articles/reasontech.htm" target="_blank">Reason-style combinator unit</a>.</li>
</ul>
<h3>Modularity and the Splitter device</h3>
<p>At the heart of Audiotool is the user&#8217;s ability to connect devices through a series of inputs and outputs. Devices are placed on the &#8220;table&#8221; by drag and dropping instances from a bank. To get audio output from a device, it must be connected to the audio chain by way of cables, which are created by dragging from a port to another. This sort of setup is quite common, used in visual programming languages like PureData and Max MSP, but also in virtual modular synthesizers like Native Instruments&#8217; Reaktor or the Nord Modular series of synthesizers. Compared to its peers, Audiotool&#8217;s implementation suffers tremendously.</p>
<p>Ports are categorized into inputs and outputs. Logically, an input can only have one source, and this is enforced. However, outputs are only allowed one connection, forcing you to set up a series of splitter/merger devices. These devices have idiosyncrasies of their own, for instance splitting an input into three outputs, specifically. So if you need 4, you need to chain one of those outputs into a new splitter. Each splitter takes up another chunk of screen space for seemingly no reason at all; I have yet to encounter an instance where I actually needed a complicated signal mixer for a split signal, and I&#8217;m not talking about Audiotool. I&#8217;m talking about every other modular system i have ever used. The Merger device is much, much more useful than the splitter, since an input can only logically take one source unless you do some kind of automatic mixing behind the scenes (which wouldn&#8217;t be cool from a UX pov, muddling the user&#8217;s expectation of what will happen). There is however no good reason why you can&#8217;t simply drag multiple cables from the same output to several inputs. The splitter device ends up becoming a huge speedbump I find myself forced to cross time and time again, contributing further to the screen clutter, and is probably the single biggest interface impediment to a quick modular workflow.</p>
<p>The beautiful thing about modularity is the playfulness it inspires. If it won&#8217;t cost you extra effort to make that extra connection and see what happens, why don&#8217;t you just go ahead and try it? Currently, the Splitter sits squarely in the way. There&#8217;s certainly a use for the functionality offered by the Splitter and Merger, but in my mind, having written rudimentary modular systems before, there is no good reason why you&#8217;d impede the user&#8217;s playfulness in this way. As it is, Auditool replicates the worst of real-life cable spaghetti. That&#8217;s a physicality I&#8217;d much rather leave in the past.</p>
<p><strong>Suggestions:</strong></p>
<ul>
<li>Allow multiple connections per output.</li>
</ul>
<p><strong>The layout grid</strong></p>
<p>When you drag a device onto the workspace, a grid of sorts appears, allowing you quick and easy alignment of new devices. This is brilliant. However, the layout engine doesn&#8217;t allow you to drag and drop a device &#8220;between&#8221; existing devices, moving them to either side. Instead, you must move the devices apart manually, then move your new device in between. With the aforementioned considerable screen clutter, this quickly becomes an absolute nightmare.</p>
<p><strong>Suggestions:</strong></p>
<ul>
<li>If the current system makes this form of automagic difficult to implement, I suggest modifying the layout engine to use a looser spring constraint based layout where device bounds, weighed by size and using connections as additional springs, push against one another until there is no contact.</li>
</ul>
<h3>The Pulverisateur device</h3>
<p><a href="http://www.doomsday.no/esn/wp-content/uploads/2010/04/pulverisateur.png"><img class="aligncenter size-medium wp-image-941" title="pulverisateur" src="http://www.doomsday.no/esn/wp-content/uploads/2010/04/pulverisateur-300x214.png" alt="" width="300" height="214" /></a>This thing is fantastic. It is, as I understand it, Andre Michelle&#8217;s first &#8220;real synth&#8221;, and it does a ton right, including often forgotten features like oscillator sync, optional keyboard tracking, audio input and a filter envelope with an interesting and powerful loop toggle. However, it can also be very difficult to use for anything precise. The biggest culprit is easily the LFO waveform knob. Since there is no pitch envelope generator (argh), if you want to use the Pulverisateur to create analog kick drums that go beyond the limited capabilities of the two supplied drum machines (more on the 808 later), tweaking the LFO to perform as you wish feels like a total crapshoot.</p>
<p><strong>Suggestions: </strong></p>
<ul>
<li>For morph knobs, allow clicking on the symbols to set the knob precisely to that value.</li>
<li>Introduce a pitch envelope</li>
</ul>
<h3>The Beatbox 8 device</h3>
<p><a href="http://www.doomsday.no/esn/wp-content/uploads/2010/04/8081.png"><img class="aligncenter size-medium wp-image-943" title="808" src="http://www.doomsday.no/esn/wp-content/uploads/2010/04/8081-300x198.png" alt="" width="300" height="198" /></a>Less critical this, but I&#8217;m a TREMENDOUS 808 fanboy. This should have been my absolute favorite device. I have sat night after night working on an accurate 808 emulator patch on my Nord Modular, so BE IT if it consumes 99% capacity, and it is bloody hard to do, so I can see why this unit isn&#8217;t feature complete. The 808 is one of the dirtiest, grimiest drum machines around, and the first unit I drop on the Audiotool workspace. You drive this thing through a few effects, and every single instrument on it can be a monster. I implore you: Finish this device!. The lack of settings on some of the drums absolutely cripple it, and actually enforcing the If you want this to be a real 808 tribute, please include feature parity of some sort, especially on the kick drum and snare. The Beatbox 8 is a pale shadow of the 808, yet close enough to frustrate. To spend this much time on recreating the UI and sequencer, only to leave out integral drum part features is really cruel! Actually enforcing old flaws of the unit, such as the need to sacrifice the hand clap for maracas just adds insult to injury. There is no &#8220;lesser&#8221; drum on the 808, and denying users the full palette is.. Let&#8217;s just say there are unhappy kittens out there <img src='http://www.doomsday.no/esn/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<h3>Samples</h3>
<p>I&#8217;ll be frank; I can not stand the samples on offer. I have made a huge effort to explore them, but it is utter sample-CD drivel. I&#8217;m sitting on harddrives worth of personal sample collections; Why am I not offered the ability to upload?</p>
<p><strong>Suggestions:</strong></p>
<ul>
<li>Offer users 100 megs worth of sample space or use local file paths. If copyright infringement is called into question, block the associated song or user, and allow users in the community to tag songs as questionable.</li>
</ul>
<h3>Summary</h3>
<p>Audiotool team; As a musician I would love to make music and share it with others using your tool, but as it is, I feel my ambitions get truncated by the UI choices you have made. I can stomach a lot of odd choices, but the moment something stops me from doing what I want before I do the <a href="http://www.youtube.com/watch?v=Gpf3OuCl6HU" target="_blank">truffle shuffle</a> it wrecks my inspiration.</p>
<p>Very much looking forward to your next version! You guys are champs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/933/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Writing tools for designers</title>
		<link>http://www.doomsday.no/esn/2010/04/writing-tools-for-designers/</link>
		<comments>http://www.doomsday.no/esn/2010/04/writing-tools-for-designers/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 23:01:04 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[General coolness]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=916</guid>
		<description><![CDATA[Now this is fun. A while back, a Flash kiosk app I wrote had a screensaver that was basically just a bunch of particles spinning on the Y axis. The designer wondered if we couldn&#8217;t animate the particles to form the icons used elsewhere in the app, and it got me thinking; Sure, they CAN [...]]]></description>
			<content:encoded><![CDATA[<p>Now this is fun. A while back, a Flash kiosk app I wrote had a screensaver that was basically just a bunch of particles spinning on the Y axis. The designer wondered if we couldn&#8217;t animate the particles to form the icons used elsewhere in the app, and it got me thinking; Sure, they CAN form those icons, but what data would I base that on? Additionally, I sure as hell am not going to sit there on the receiving end of some Illustrator files and attempt to match the designer&#8217;s vision. Instead, I wrote a tool for the designer that uses cubic splines and a bunch of <a href="http://www.minimalcomps.com/">Keith Peters&#8217; minimalcomps</a> to preview and design the effect. The editor application was written in less than a day, and here&#8217;s the result.<br />
<div id="attachment_919" class="wp-caption alignnone" style="width: 487px"><a href="http://www.doomsday.no/projects/parametrics/"><img src="http://www.doomsday.no/esn/wp-content/uploads/2010/04/splineeditor.png" alt="" title="splineeditor" width="477" height="503" class="size-full wp-image-919" /></a><p class="wp-caption-text">Click to run app</p></div><br />
To erase a curve, select it and hit backspace. Additionally, this particular iteration has the particle count slider hacked to allow for much, much more particles than what is safe for real-time (designer&#8217;s request), so be wary of that slider.</p>
<p>This is obviously not a tool for public consumption: The designer was sitting across the table from me and could ask questions and get support/new features whenever. The point is, we met our goal, the designer was happy with the result, and the effect was exactly what we hoped for.</p>
<p>Taking the time to throw down a tool like this is a real boon to us as developers, allowing designers to get intimate control over aspects they might otherwise consider too technical. And getting them off of our backs as a bonus.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/writing-tools-for-designers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synesthesia experiment 1</title>
		<link>http://www.doomsday.no/esn/2010/04/synesthesia-experiment-1/</link>
		<comments>http://www.doomsday.no/esn/2010/04/synesthesia-experiment-1/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 22:37:58 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[General coolness]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=913</guid>
		<description><![CDATA[I always want to play more with generative art, but I always find it&#8217;s more fun to play around with synesthesia; senses combining to create something more. So I might start out wanting to make a paint tool to make art, but it always ends up being a toy instead. But maybe that&#8217;s art enough? [...]]]></description>
			<content:encoded><![CDATA[<p>I always want to play more with generative art, but I always find it&#8217;s more fun to play around with synesthesia; senses combining to create something more. So I might start out wanting to make a paint tool to make art, but it always ends up being a toy instead. But maybe that&#8217;s art enough?</p>
<p>Here&#8217;s a modest attempt. Max Richter&#8217;s &#8216;Autumn Music 2&#8242; set to a swarm of particles, with the music swell and rhythm driving emission and color.<br />
<span id="more-913"></span><br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_WaterfallXP_1650952087"
			class="flashmovie"
			width="600"
			height="600">
	<param name="movie" value="http://andreas.creunaclient.no/blogfiles/autumnmusic/WaterfallXP.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://andreas.creunaclient.no/blogfiles/autumnmusic/WaterfallXP.swf"
			name="fm_WaterfallXP_1650952087"
			width="600"
			height="600">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/synesthesia-experiment-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Painting with time</title>
		<link>http://www.doomsday.no/esn/2010/04/painting-with-time/</link>
		<comments>http://www.doomsday.no/esn/2010/04/painting-with-time/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 22:29:57 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[General coolness]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=908</guid>
		<description><![CDATA[Something I always enjoyed conceptually was painting with a video frame buffer. It doesn&#8217;t actually WORK for anything particularly useful, but here&#8217;s an experiment anyway. Beware, video autoplays and has awesome Italo disco music. Unless you have a webcam. In which case you&#8217;re the star of the show. 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_VideoBuffer_528329688"
			class="flashmovie"
			width="320"
			height="240">
	<param name="movie" value="http://andreas.creunaclient.no/blogfiles/alphatime/VideoBuffer.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://andreas.creunaclient.no/blogfiles/alphatime/VideoBuffer.swf"
			name="fm_VideoBuffer_528329688"
			width="320"
			height="240">
	<!--<![endif]-->
		 [...]]]></description>
			<content:encoded><![CDATA[<p>Something I always enjoyed conceptually was painting with a video frame buffer. It doesn&#8217;t actually WORK for anything particularly useful, but here&#8217;s an experiment anyway. Beware, video autoplays and has awesome Italo disco music. Unless you have a webcam. In which case you&#8217;re the star of the show.<br />
<span id="more-908"></span><br />
[kml_flashembed publishmethod="dynamic" fversion="10.0.0" movie="http://andreas.creunaclient.no/blogfiles/alphatime/VideoBuffer.swf" width="320" height="240" targetclass="flashmovie"]</p>
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<br/><br />
Largely unoptimized proof of concept. <br/><br />
Paint to reverse time <br/><br />
Spacebar to pause image capture and alpha buffer fade<br/><br />
p to generate perlin noise <br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/painting-with-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another 3D Particle Thing</title>
		<link>http://www.doomsday.no/esn/2010/04/another-3d-particle-thing/</link>
		<comments>http://www.doomsday.no/esn/2010/04/another-3d-particle-thing/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 22:24:44 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[General coolness]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=905</guid>
		<description><![CDATA[An older thing this, but I still think it&#8217;s kinda neat. Click-drag to rotate the camera, WSAD keys to move around. When you move, particles are moved from the pool to the point the camera is currently at (offset a little), so you can draw lines and curves by moving around. Always wanted to do [...]]]></description>
			<content:encoded><![CDATA[<p>An older thing this, but I still think it&#8217;s kinda neat. Click-drag to rotate the camera, WSAD keys to move around. When you move, particles are moved from the pool to the point the camera is currently at (offset a little), so you can draw lines and curves by moving around. Always wanted to do more work on this.<br />
<span id="more-905"></span><br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_World3D2_980587959"
			class="flashmovie"
			width="600"
			height="600">
	<param name="movie" value="http://andreas.creunaclient.no/labs/pointscape/World3D2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://andreas.creunaclient.no/labs/pointscape/World3D2.swf"
			name="fm_World3D2_980587959"
			width="600"
			height="600">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
The math behind the camera control is absolutely half-assed, so strafing stops working when you&#8217;re moving straight up or down. But hey.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/another-3d-particle-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video pixels to particles</title>
		<link>http://www.doomsday.no/esn/2010/04/video-pixels-to-particles/</link>
		<comments>http://www.doomsday.no/esn/2010/04/video-pixels-to-particles/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 22:10:07 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[General coolness]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=901</guid>
		<description><![CDATA[Another ongoing experiment. Performance ranges from decent to abysmal depending on your hardware, but I reckon it&#8217;s fun partytimes anyway. Sampling pixel values from a video and mapping them to 3D particles. ZOOOoooooOom! 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_PixelParticles_454685679"
			class="flashmovie"
			width="400"
			height="225">
	<param name="movie" value="http://andreas.creunaclient.no/labs/bmdparticles/PixelParticles.swf" />
	<param name="bgcolor" value="0" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://andreas.creunaclient.no/labs/bmdparticles/PixelParticles.swf"
			name="fm_PixelParticles_454685679"
			width="400"
			height="225">
		<param name="bgcolor" value="0" />
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> That&#8217;s 90K particles. The video doesn&#8217;t loop, so, y&#8217;know, refresh if you want [...]]]></description>
			<content:encoded><![CDATA[<p>Another ongoing experiment. Performance ranges from decent to abysmal depending on your hardware, but I reckon it&#8217;s fun partytimes anyway. Sampling pixel values from a video and mapping them to 3D particles. ZOOOoooooOom!<br />
<span id="more-901"></span><br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_PixelParticles_527727675"
			class="flashmovie"
			width="400"
			height="225">
	<param name="movie" value="http://andreas.creunaclient.no/labs/bmdparticles/PixelParticles.swf" />
	<param name="bgcolor" value="0" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://andreas.creunaclient.no/labs/bmdparticles/PixelParticles.swf"
			name="fm_PixelParticles_527727675"
			width="400"
			height="225">
		<param name="bgcolor" value="0" />
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
That&#8217;s 90K particles. The video doesn&#8217;t loop, so, y&#8217;know, refresh if you want motion after it&#8217;s done. No depth sorting, so you&#8217;ll get some artifacts as there is overlap.<br />
Not convinced of its actual usefulness, but fun stuff anyway! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/video-pixels-to-particles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A 3D tunnel effect or something</title>
		<link>http://www.doomsday.no/esn/2010/04/a-3d-tunnel-effect-or-something/</link>
		<comments>http://www.doomsday.no/esn/2010/04/a-3d-tunnel-effect-or-something/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 22:01:17 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[General coolness]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=898</guid>
		<description><![CDATA[Hey check this thing out. It&#8217;s part of a prototype for a game project, but I thought it came out pretty neat on its own! WHoooOsh! 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Runner_1206159054"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://andreas.creunaclient.no/labs/bmdtunnel/Runner.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://andreas.creunaclient.no/labs/bmdtunnel/Runner.swf"
			name="fm_Runner_1206159054"
			width="500"
			height="500">
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> There are some seams off into the distance, but overall I reckon it&#8217;s quite compelling.]]></description>
			<content:encoded><![CDATA[<p>Hey check this thing out. It&#8217;s part of a prototype for a game project, but I thought it came out pretty neat on its own! WHoooOsh!<br />
<span id="more-898"></span><br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Runner_641935154"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://andreas.creunaclient.no/labs/bmdtunnel/Runner.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://andreas.creunaclient.no/labs/bmdtunnel/Runner.swf"
			name="fm_Runner_641935154"
			width="500"
			height="500">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>There are some seams off into the distance, but overall I reckon it&#8217;s quite compelling.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/a-3d-tunnel-effect-or-something/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple AIR Directory-&gt;XML utility</title>
		<link>http://www.doomsday.no/esn/2010/04/simple-air-directory-xml-utility/</link>
		<comments>http://www.doomsday.no/esn/2010/04/simple-air-directory-xml-utility/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 22:26:20 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=890</guid>
		<description><![CDATA[This is no biggy, and I&#8217;m sure most of y&#8217;all have tools for this already, but I figured I&#8217;d share mine anyway. It&#8217;s just a quick-and-dirty Flex/AIR app for taking a directory listing and generating an XML document of file paths. Not pretty, but here&#8217;s how it works: Choose the node name of your root [...]]]></description>
			<content:encoded><![CDATA[<p>This is no biggy, and I&#8217;m sure most of y&#8217;all have tools for this already, but I figured I&#8217;d share mine anyway. It&#8217;s just a quick-and-dirty Flex/AIR app for taking a directory listing and generating an XML document of file paths.<br />
<img alt="" src="http://www.doomsday.no/projects/xmlator/xmlator.PNG" title="XMLator screenshot" class="alignnone" width="449" height="428" /><br />
Not pretty, but here&#8217;s how it works:</p>
<ul>
<li>Choose the node name of your root node (&#8220;data&#8221; is typically it though)</li>
<li>Choose the node name for file nodes (for instance, &#8220;sound&#8221; or &#8220;movie&#8221; or whatever)</li>
<li>Choose whether you want the path/filename to be placed in a &#8220;path&#8221; attribute or in the node innertext</li>
<li>Choose if you want the file path to be Absolute, relative to the starting directory, or just include the filename</li>
<li>Enter the file extensions you want included, separated with spaces (&#8220;mp3 jpg avi&#8221;), or just leave it as a wildcard</li>
<li>Select the starting directory for the crawl</li>
<li>Check whether you want to include subdirectories, meaning a recursive search. Included subdirectories will be placed under nodes with the directory name.</li>
<li>Click &#8220;Generate&#8221;</li>
</ul>
<p>I threw this together to quickly build a list of sound files for a project where I had no CMS to help me out. Maybe you&#8217;ll have use for it too? I am never fucking ever copy pasting file info into XML again. Ever.<br />
<a href="http://www.doomsday.no/projects/xmlator/XMLator.air">You can grab the air package here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/simple-air-directory-xml-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop trying to make the Internet boring!</title>
		<link>http://www.doomsday.no/esn/2010/04/stop-trying-to-make-the-internet-boring/</link>
		<comments>http://www.doomsday.no/esn/2010/04/stop-trying-to-make-the-internet-boring/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 22:51:09 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Angry Internet Men]]></category>
		<category><![CDATA[Apocalypse]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Boredom]]></category>
		<category><![CDATA[Depression]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Horseshit]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://www.doomsday.no/esn/?p=882</guid>
		<description><![CDATA[Preface. There&#8217;s a weird energy to this planet right now. Maybe it&#8217;s just me, but I can&#8217;t shake the feeling that the current zeitgeist is one of living under the hammer. The post apocalypse has returned to the media in a big way, with a thematic resurgence in films, video games and literature. There&#8217;s climate [...]]]></description>
			<content:encoded><![CDATA[<p>Preface. There&#8217;s a weird energy to this planet right now. Maybe it&#8217;s just me, but I can&#8217;t shake the feeling that the current zeitgeist is one of living under the hammer. The post apocalypse has returned to the media in a big way, with a thematic resurgence in films, video games and literature. There&#8217;s climate catastrophe looming ahead, there&#8217;s economic catastrophe looming ahead, there&#8217;s the coming energy crisis, peak oil, war, overpopulation, religious conflict. So much focus on the negative.</p>
<p>With that mindset, the current religious war in the web development community (though commonly propagated mainly by Angry Internet Men of unclear merit) about the relative merits of HTML5 vs Flash has grown <a href="http://kevinsuttle.com/2010/04/08/apple-reaffirms-control-issues-with-iphone-4/">tremendously in scope</a> with the launch of the iPad and Apple&#8217;s latest changes to the iPhone 4 SDK agreement. </p>
<p>Suddenly, it&#8217;s no longer about Steve Jobs&#8217; hissy fits and Apple/Adobe&#8217;s past. It&#8217;s now about what it means to be a developer, the tools you choose, the platform you wish to work on. It&#8217;s another apocalypse then; The corporations are taking away our anarchistic developer rights to go anywhere, do anything! Time to wave banners, and while we&#8217;re at it, choose sides. You know, good/html5/css/js, evil/plugins, or any combination thereof. Whatever.</p>
<h3>Holy hell guys! Isn&#8217;t this the most BORING shit ever?</h3>
<p><span id="more-882"></span><br />
Listening to knowitalls babble on about standards and &#8220;what&#8217;s right&#8221; and future proofing, Jesus, how boring can you get?! Stop being so damn boring! Stop saying boring things! Go make some cool shit! Bouncing fucking gradient balls man, let&#8217;s go! HTML5 dudes, Flash dudes, jQuery dudes, all of y&#8217;all, go make some god damn gradient balls! Make some shape tweening text! Make text adventure games or drawing apps or art or music tools or publishing tools or an awkwardly animated horse that sings or something. </p>
<h3>One of the best things about maturing as a developer is watching your horizon broaden. </h3>
<p>Man, I love being a developer. I love looking at a screen and an input device and think about what I can do with them. I love digging into frameworks. It&#8217;s a ton of fun! It&#8217;s engineering, right? You put the thing in the place and pull that string over there and put some tape on the stick and push that and the wheel spins and goes buzz, it&#8217;s awesome! It&#8217;s the joy of <em>making a thing</em>. It&#8217;s why Lego is such a popular toy. </p>
<p>It&#8217;s when you start out with JavaScript and realize the similarities to Python and you start tinkering just to see how similar they are. Maybe you fall in love with Python. Maybe you feel straight Java is the next step, or maybe you go low level and dig into C or Assembler. Regardless, you can choose which way you want to go. In this day and age, rarely is there a point where what you made can not be moved to another platform in SOME way shape or form.</p>
<p>Why are there people out there so religious about their choice of language or platform? So jealously defensive about the way they feel things should be done? If there is any argument I have for Apple opening up its platform it would be this: <em>Stop making development boring</em>.</p>
<p>The more these beardy thinky-men are ARGUING over the politics of this shit, the less I wish I&#8217;d spent the last decade embedding myself in the business. Every time I hear a pro-apple or pro-Flash argument now, especially retarded shit like <a href="http://blog.optimum7.com/anthony/website-design/pure-css3-animated-at-at-walker-from-star-wars-2.html">this</a>; THAT is what makes me worried about the web as a platform.</p>
<h3>More plugins man. More non-standard bullshit. Bring it on. Let&#8217;s get this diversity party started.</h3>
<p>Some players want this Internet game to stagnate in the ankle-deep murky lukewarm waters of HTML/CSS/JS. For those about to rock that shit, in all honesty, I salute you; You are true, professional masochists.<br />
For those about to raise that flag and proclaim it the future however; come over here, Buzz Killingtons, so I can punch you in the collective mouth, and I&#8217;d be honestly surprised if any of you have any real development experience; You&#8217;d know how much greener the grass can be. </p>
<p>The only player in this game that currently <em>gets it</em> is Google; The problem with plugins isn&#8217;t the notion of a plugin. It&#8217;s the <em>framework</em>, and the end-user experience. The end users people! Don&#8217;t you want to make cool shit for them to play with? Don&#8217;t you want them to open a website and be like..</p>
<blockquote><p>
WHOA. What the hell is this SHIT that&#8217;s going on in my browser window!?</p></blockquote>
<p>Don&#8217;t you want to give them a sense of <em>wonder</em>?</p>
<p>Technology is <em>magic </em>guys! Why the hell are some of you so god damn <em>obsessed with codifying it</em>?!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doomsday.no/esn/2010/04/stop-trying-to-make-the-internet-boring/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 2.524 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-05 11:03:20 -->

