<?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>MikeCann.co.uk &#187; Flash - MikeCann.co.uk - mikey see, mikey do!</title>
	<atom:link href="http://mikecann.co.uk/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikecann.co.uk</link>
	<description>mikey see, mikey do!</description>
	<lastBuildDate>Sat, 28 Jan 2012 13:10:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Why Developing for WebGL Sucks!</title>
		<link>http://mikecann.co.uk/programming/why-developing-for-webgl-sucks/</link>
		<comments>http://mikecann.co.uk/programming/why-developing-for-webgl-sucks/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 17:36:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[WebGL]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[textures]]></category>
		<category><![CDATA[threejs]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1698</guid>
		<description><![CDATA[For some time now I have been working with WebGL and have developed a sort of love/hate relationship with it. I love the ability to instantly target millions of people with GPU accelerated code without any plugins or barriers (excluding the targets that dont support it). However as a developer, writing code that takes advantage [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/10/head02.png"><img class="alignnone size-full wp-image-1701" title="head02" src="http://mikecann.co.uk/wp-content/uploads/2011/10/head02.png" alt="" width="700" height="400" /></a></p>
<p>For some time now I have been working with WebGL and have developed a sort of love/hate relationship with it. I love the ability to instantly target millions of people with GPU accelerated code without any plugins or barriers (excluding the targets that dont support it). However as a developer, writing code that takes advantage of WebGL kinda sucks.</p>
<h2>Procedural Based</h2>
<p>First off is the way you have to structure your GL calls. For example take a look at the following generic bit of webGL harvested from the net:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="javascript" style="font-family:monospace;"><ol><li class="li1"><div class="de1">texture <span class="sy0">=</span> gl.<span class="me1">createTexture</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">activeTexture</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE0</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">bindTexture</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> texture<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">pixelStorei</span><span class="br0">&#40;</span>gl.<span class="me1">UNPACK_ALIGNMENT</span><span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">texImage2D</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> 0<span class="sy0">,</span> gl.<span class="me1">RGB</span><span class="sy0">,</span> 64<span class="sy0">,</span> 64<span class="sy0">,</span> 0<span class="sy0">,</span></div></li><li class="li1"><div class="de1">     gl.<span class="me1">RGB</span><span class="sy0">,</span> gl.<span class="me1">FLOAT</span><span class="sy0">,</span> <span class="kw2">new</span> Float32Array<span class="br0">&#40;</span>pix<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">texParameteri</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> gl.<span class="me1">TEXTURE_MIN_FILTER</span><span class="sy0">,</span> gl.<span class="me1">NEAREST</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">texParameteri</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> gl.<span class="me1">TEXTURE_MAG_FILTER</span><span class="sy0">,</span> gl.<span class="me1">NEAREST</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">   texture1 <span class="sy0">=</span> gl.<span class="me1">createTexture</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">activeTexture</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE1</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">bindTexture</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> texture1<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">pixelStorei</span><span class="br0">&#40;</span>gl.<span class="me1">UNPACK_ALIGNMENT</span><span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">texImage2D</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> 0<span class="sy0">,</span> gl.<span class="me1">RGB</span><span class="sy0">,</span> 64<span class="sy0">,</span> 64<span class="sy0">,</span> 0<span class="sy0">,</span></div></li><li class="li1"><div class="de1">     gl.<span class="me1">RGB</span><span class="sy0">,</span> gl.<span class="me1">FLOAT</span><span class="sy0">,</span> <span class="kw2">new</span> Float32Array<span class="br0">&#40;</span>pix1<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">texParameteri</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> gl.<span class="me1">TEXTURE_MIN_FILTER</span><span class="sy0">,</span> gl.<span class="me1">NEAREST</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">texParameteri</span><span class="br0">&#40;</span>gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> gl.<span class="me1">TEXTURE_MAG_FILTER</span><span class="sy0">,</span> gl.<span class="me1">NEAREST</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">   FBO <span class="sy0">=</span> gl.<span class="me1">createFramebuffer</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">bindFramebuffer</span><span class="br0">&#40;</span>gl.<span class="me1">FRAMEBUFFER</span><span class="sy0">,</span> FBO<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">framebufferTexture2D</span><span class="br0">&#40;</span>gl.<span class="me1">FRAMEBUFFER</span><span class="sy0">,</span> gl.<span class="me1">COLOR_ATTACHMENT0</span><span class="sy0">,</span></div></li><li class="li1"><div class="de1">       gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> texture<span class="sy0">,</span> 0<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   FBO1 <span class="sy0">=</span> gl.<span class="me1">createFramebuffer</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">bindFramebuffer</span><span class="br0">&#40;</span>gl.<span class="me1">FRAMEBUFFER</span><span class="sy0">,</span> FBO1<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   gl.<span class="me1">framebufferTexture2D</span><span class="br0">&#40;</span>gl.<span class="me1">FRAMEBUFFER</span><span class="sy0">,</span> gl.<span class="me1">COLOR_ATTACHMENT0</span><span class="sy0">,</span></div></li><li class="li1"><div class="de1">       gl.<span class="me1">TEXTURE_2D</span><span class="sy0">,</span> texture1<span class="sy0">,</span> 0<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">   <span class="kw1">if</span><span class="br0">&#40;</span> gl.<span class="me1">checkFramebufferStatus</span><span class="br0">&#40;</span>gl.<span class="me1">FRAMEBUFFER</span><span class="br0">&#41;</span> <span class="sy0">!=</span> gl.<span class="me1">FRAMEBUFFER_COMPLETE</span><span class="br0">&#41;</span></div></li><li class="li1"><div class="de1">     <span class="kw3">alert</span><span class="br0">&#40;</span>err <span class="sy0">+</span> <span class="st0">&quot;FLOAT as the color attachment to an FBO&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li></ol></pre></div></div>
<p>All it does is create a couple of textures, setting their starting values and creates two frame buffers for rendering to. Its just it looks complicated and difficult to understand.</p>
<p>GL works on a procedural basis, so you tell GL that you are about to work on something by calling a function like &#8220;bindTexture()&#8221; then on the next line you perform an operation on it such as &#8220;pixelStorei()&#8221;. Now this may have made perfect sense back when we were writing everything in C which is procedural anyway however this is Javascript (or haXe in my case) which is an Object based language, code like this is difficult to understand and follow.</p>
<p>The procedural nature of WebGL means you have to be much more careful about unsetting things you have previously set. For example if you bind a texture to perform some operation, you must then remember to unbind it else you could inadvertently cause operations to be applied to it on subsequent calls elsewhere in your codebase. It this &#8216;hidden state&#8217; that has caused me alot of headaches when developing my samples.</p>
<p>The principal behind WebGL was to provide a very low-level library which other developers can build upon to build more complex and abstracted libraries. And there are numerous libraries out there. I personally have tried several of them including the very popular <a href="https://github.com/mrdoob/three.js/">three.js</a>. Three.js is great for doing common things like loading models and putting quads on the screen. I however encountered a problem with render targets which I struggled with for days before I discovered that you had to set &#8220;needsUpdate&#8221; to true on your texture before using it. In the end I decided to drop three.js beacuse of another issue I encountered and instead attempt to reduce my complications by working with webGL directly.</p>
<p>Flash11&#8242;s Stage3D has the same philosophy as webGL, to provide a low level API for other developers to build libraries upon. The thing is Flash11&#8242;s low-level API makes more sense and is more readable. For example the following to me is much more readable than its webGL equivalent:</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="actionscript3" style="font-family:monospace;"><ol><li class="li1"><div class="de1">texture = <span class="kw7">c</span><span class="sy0">.</span>createTexture<span class="br0">&#40;</span>logo<span class="sy0">.</span><span class="kw7">width</span><span class="sy0">,</span> logo<span class="sy0">.</span><span class="kw7">height</span><span class="sy0">,</span> Context3DTextureFormat<span class="sy0">.</span>BGRA<span class="sy0">,</span> <span class="kw1">false</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">texture<span class="sy0">.</span>uploadFromBitmapData<span class="br0">&#40;</span>logo<span class="br0">&#41;</span><span class="sy0">;</span></div></li></ol></pre></div></div>
<p>The Stage3D API also uses language like &#8220;upload&#8221; to let you know when you are transferring data to the GPU, for a new comer to GL you have no clue when things are going to the GPU. Its small things like this that reduce the &#8220;WTF?&#8221; factor when tackling the tricky world of hardware-accelerated 3D programming.</p>
<h2>Cross-domain textures</h2>
<p>This one cropped up around July time this year and took me ages to work out what was going on. For some inexplicable reason (or so it seemed) my code one day stopped working. When I looked for demo code online it all worked fine, however when I downloaded it and run it locally it also didnt work. I was getting errors like the following:</p>
<p><span style="color: #ff0000;">Uncaught Error: SECURITY_ERR: DOM Exception 18</span><br />
<span style="color: #ff0000;">Uncaught Error: SECURITY_ERR: DOM Exception 18</span><br />
<span style="color: #ff0000;">Uncaught Error: SECURITY_ERR: DOM Exception 18</span><br />
<span style="color: #ff0000;">Uncaught Error: SECURITY_ERR: DOM Exception 18</span><br />
<span style="color: #ff0000;">Uncaught Error: SECURITY_ERR: DOM Exception 18 </span></p>
<p>I was so baffled that <a href="http://haxe.1354130.n2.nabble.com/WebGL-amp-Textures-td6638378.html">I posted about it</a> on the HaXe mailing list asking for help, thinking it was something I was doing wrong with HaXe. It turns out (after much wall-head-butting) this was a change that they brought into Chrome 13 and Firefox 5 to combat a security problem when using shaders that use textures from a different domain to the one running the code:</p>
<p><a href="http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html">http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html</a></p>
<p>Now I have no problem with cross-domain issues, im used to this from Flash where we have the same sort of setPixel() restrictions on cross-domain BitmapData&#8217;s. The thing is, it appears that this restriction applies when running code locally too. So If you are developing something on your local machine and trying to access a texture from disk it throws the same security errors because the browser thinks you are reaching across domains to access the image.</p>
<p>At the time the only way to get around this was to create your own webserver that you run on localhost to server up the files. So to do that I had to download python so I could run a simple localhost commandline webserver from my bin directory. What an effort! There may be easier ways these days to solve it but at the time it really frustrated me and formed yet another barrier to developing webGL.</p>
<h2>No Error Messages</h2>
<p>This is by far the most annoying thing about developing for WebGL. So many times I have been trying to write something that I know SHOULD work but for some reason it doesn&#8217;t. I dont get any error messages, nothing. It makes writing something from scratch neigh on impossible.</p>
<p>In my last post &#8220;<a href="http://mikecann.co.uk/personal-project/gpu-state-preserving-particle-systems-with-webgl-haxe/">GPU State Preserving Particle Systems with WebGL &amp; HaXe</a>&#8221; I started with an idea. I attempted to code it &#8216;bottom-up&#8217;. That is start with nothing and then add more code until I reached what I wanted. Unfortunately having no error messages in WebGL makes this very difficult indeed. I would spend some time writing something really simple, like trying to get a textured quad to render on the screen only to find I get nothing. I double check my camera matrices my vertex and texture buffers, my shader and still nothing. Eventually I found that I hadn&#8217;t bound something first before trying to operate on it *sigh*</p>
<p>In the end I found the best way to get anywhere is to go from the other direction, a &#8216;top-down&#8217; method. Start with something kind of simmilar to what you want then cut bits out one line at a time until you get what you want. Its extremely time consuming and frustrating, but its less frustrating than going from the other way.</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/10/1-Trace.gif"><img class="size-full wp-image-1706 alignnone" title="1-Trace" src="http://mikecann.co.uk/wp-content/uploads/2011/10/1-Trace.gif" alt="" width="705" height="231" /></a></p>
<p>There are tools out there that help with debugging what is going wrong. Namely the <a href="http://www.google.co.uk/url?sa=t&amp;rct=j&amp;q=webgl%20inspector&amp;source=web&amp;cd=1&amp;ved=0CBwQFjAA&amp;url=http%3A%2F%2Fbenvanik.github.com%2FWebGL-Inspector%2F&amp;ei=9EWhTsHdAtSJhQe7hv3jBA&amp;usg=AFQjCNElgWdAeKcNOnrDFrSnr6rbCLUcWg">WebGL Inspector</a> (see above) is intended to provide gDEBugger / PIX like debugging information about what is going on inside webGL. Its a clever bit of tech, it lets you inspect buffers and traces each gl call, however it suffers from the same underlying problem of having no errors. You setup a buffer incorrectly and what you get is &#8220;INVALID_VALUE&#8221;. No indication as to which of the values is invalid or what part of the call you messed up on <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<h2>Googling Doesn&#8217;t Help</h2>
<p>If you do happen to get an error message (unlikely) or you word your problem in a sufficiently succinct and googaleble way you will then run into the next big problem with WebGL; theres very few people using it. Now I know I am likely to be flamed for that comment, but it just seems that way to me. Whenever I tried to google my problem, or google for what I was trying to achieve (because working bottom-up doesnt work) there would be a very sparse smattering of relevant posts. Usually the results are forum posts and are OpenGL not WebGL related and are from 5-10 years ago.</p>
<h2>But..</h2>
<p>Now having just ranted on for several hundred words about why it sucks im going to finish it off by saying that im going to continue to develop for WebGL using haXe regardless. Why? Well I just like making pretty things that run fast and GPGPU programming appeals to me for some unknown (likely sadistic) reason.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/programming/why-developing-for-webgl-sucks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Conway&#8217;s Game of Life in haXe [NME &amp; MassiveUnit]</title>
		<link>http://mikecann.co.uk/personal-project/conways-game-of-life-in-haxe-nme-massiveunit/</link>
		<comments>http://mikecann.co.uk/personal-project/conways-game-of-life-in-haxe-nme-massiveunit/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 17:13:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HaXe]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[haxe]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[nme]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1662</guid>
		<description><![CDATA[The second day of try{harder} was dedicated to a single topic; test driven development (TDD). The group was split into pairs and given the task of using TDD to write a solver for the game of life in AS3. After an hour we then threw away everything we had done, swapped partners and repeated the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/10/2011-10-09_1257.png"><img class="alignnone size-full wp-image-1664" title="2011-10-09_1257" src="http://mikecann.co.uk/wp-content/uploads/2011/10/2011-10-09_1257.png" alt="" width="700" height="400" /></a></p>
<p>The second day of <a href="http://mikecann.co.uk/programming/try-harder-my-haxe-slides-and-code/">try{harder}</a> was dedicated to a single topic; test driven development (TDD).</p>
<p>The group was split into pairs and given the task of using TDD to write a solver for the game of life in AS3. After an hour we then threw away everything we had done, swapped partners and repeated the process.</p>
<p>This was extremely valuable for me as I had never written a unit test before. Seeing how different people tackled the same problem was fascinating and informative.</p>
<p>After repeating the process three times Stray asked if I was interested in teaming up with another attendee of the conference <a href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;cd=1&amp;sqi=2&amp;ved=0CBsQFjAA&amp;url=http%3A%2F%2Falecmce.com%2F&amp;ei=jZyRTp-fEcmAhQeIwtn0Dw&amp;usg=AFQjCNEKPdue-giHnTp0HZCJwVWz3QeVoQ">Alec McEachran</a> to investigate unit testing in haXe. It was a great idea as it meant we both could investigate how unit testing worked in haXe and it would give me another code example for my talk the following day.</p>
<p>After a brief search we decided on Mike Stead&#8217;s <a href="https://github.com/massiveinteractive/MassiveUnit">MassiveUnit</a> for testing as the testing syntax looked similar to FlexUnit and it contained a toolchain for running the tests on multiple platforms.</p>
<p>An example of a test we wrote is:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="actionscript3" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw4">package</span> <span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw1">import</span> massive<span class="sy0">.</span>munit<span class="sy0">.</span>Assert<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw1">import</span> Grid<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="coMULTI">/**</span></div></li><li class="li1"><div class="de1"><span class="coMULTI">&nbsp;* ...</span></div></li><li class="li1"><div class="de1"><span class="coMULTI">&nbsp;* @author MikeC &amp; Alec McEachran</span></div></li><li class="li1"><div class="de1"><span class="coMULTI">&nbsp;*/</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw4">class</span> GridTest</div></li><li class="li1"><div class="de1"><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw2">var</span> grid <span class="sy0">:</span> Grid<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	@Before</div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> before<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span>Void</div></li><li class="li1"><div class="de1">	<span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		grid = <span class="kw1">new</span> Grid<span class="br0">&#40;</span>3<span class="sy0">,</span> 3<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	@After</div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> after<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span>Void</div></li><li class="li1"><div class="de1">	<span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		grid = <span class="kw1">null</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	@Test</div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> initiallyThereAreNoLiveNeighbors<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span>Void</div></li><li class="li1"><div class="de1">	<span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		<span class="kw2">var</span> liveNeighbors = grid<span class="sy0">.</span>getLiveNeighbors<span class="br0">&#40;</span>1<span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">		Assert<span class="sy0">.</span>isTrue<span class="br0">&#40;</span>liveNeighbors == 0<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	@Test</div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> liveNeighborCountIsAccurate<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span>Void</div></li><li class="li1"><div class="de1">	<span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">		grid<span class="sy0">.</span><span class="kw1">set</span><span class="br0">&#40;</span>0<span class="sy0">,</span> 0<span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">		grid<span class="sy0">.</span><span class="kw1">set</span><span class="br0">&#40;</span>1<span class="sy0">,</span> 0<span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">		grid<span class="sy0">.</span><span class="kw1">set</span><span class="br0">&#40;</span>2<span class="sy0">,</span> 1<span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">		<span class="kw2">var</span> liveNeighbors = grid<span class="sy0">.</span>getLiveNeighbors<span class="br0">&#40;</span>1<span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">		Assert<span class="sy0">.</span>isTrue<span class="br0">&#40;</span>liveNeighbors == 3<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li></ol></pre></div></div>
<p>It should look fairly familiar to anyone who has used FlexUnit before. The metatags @Before @After and @Test perform in exactly the same way as they do in FlexUnit. Another benefit of using munit over the built in testing framework in haXe is that you are given a tool to run tests on all platforms simultaneously:</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">haxelib run munit test test.hxml</pre></div></div>
<p>When executed you get something that looks like the following:</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/10/ScreenHunter_01-Oct.-09-13.54.jpg"><img class="alignnone size-full wp-image-1670" title="ScreenHunter_01 Oct. 09 13.54" src="http://mikecann.co.uk/wp-content/uploads/2011/10/ScreenHunter_01-Oct.-09-13.54.jpg" alt="" width="643" height="344" /></a></p>
<p>Which presents a nice graphical representation of the tests run and which failed (if any).</p>
<p>Once built and tested we decided to give the code a simple visual representation. We wanted to show off the ability for haXe to target multiple platforms. To do this we decided to go with <a href="http://www.haxenme.org/">NME </a>which I had been experimenting around with recently.</p>
<p><a href="http://www.haxenme.org/">NME </a>is a library and tool chain for haXe designed to allow the developer to use the flash API on multiple platforms. They achieve this by writing platform targeted version of the flash API. So what this means is code such as the following:</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="actionscript3" style="font-family:monospace;"><span class="kw4">package</span> <span class="sy0">;</span>
<span class="kw1">import</span> <span class="kw6">flash.display</span><span class="sy0">.</span><a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span class="kw5">Bitmap</span></a><span class="sy0">;</span>
<span class="kw1">import</span> <span class="kw6">flash.display</span><span class="sy0">.</span><a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span class="kw5">BitmapData</span></a><span class="sy0">;</span>
<span class="kw1">import</span> <span class="kw6">flash.display</span><span class="sy0">.</span><a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html"><span class="kw5">MovieClip</span></a><span class="sy0">;</span>
<span class="kw1">import</span> <span class="kw6">flash.geom</span><span class="sy0">.</span><a href="http://www.google.com/search?q=rectangle%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:rectangle.html"><span class="kw5">Rectangle</span></a><span class="sy0">;</span>
&nbsp;
<span class="coMULTI">/**
 * ...
 * @author MikeC &amp; Alec McEachran
 */</span>
&nbsp;
<span class="kw4">class</span> Render
<span class="br0">&#123;</span>
&nbsp;
	<span class="kw1">private</span> <span class="kw2">var</span> _cellSize <span class="sy0">:</span> Int<span class="sy0">;</span>
	<span class="kw1">private</span> <span class="kw2">var</span> _renderTarget <span class="sy0">:</span> <a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span class="kw5">BitmapData</span></a><span class="sy0">;</span>
	<span class="kw1">private</span> <span class="kw2">var</span> _rect<span class="sy0">:</span><a href="http://www.google.com/search?q=rectangle%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:rectangle.html"><span class="kw5">Rectangle</span></a><span class="sy0">;</span>
&nbsp;
	<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw1">new</span><span class="br0">&#40;</span>container<span class="sy0">:</span><a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html"><span class="kw5">MovieClip</span></a><span class="sy0">,</span> cols<span class="sy0">:</span>Int<span class="sy0">,</span> rows<span class="sy0">:</span>Int<span class="sy0">,</span> cellSize<span class="sy0">:</span>Int<span class="br0">&#41;</span>
	<span class="br0">&#123;</span>
		_cellSize = cellSize<span class="sy0">;</span>
		_renderTarget = <span class="kw1">new</span> <a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span class="kw5">BitmapData</span></a><span class="br0">&#40;</span>cols <span class="sy0">*</span> cellSize<span class="sy0">,</span> rows <span class="sy0">*</span> cellSize<span class="sy0">,</span> <span class="kw1">false</span><span class="br0">&#41;</span><span class="sy0">;</span>
		container<span class="sy0">.</span><span class="kw7">addChild</span><span class="br0">&#40;</span><span class="kw1">new</span> <a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span class="kw5">Bitmap</span></a><span class="br0">&#40;</span>_renderTarget<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
		_rect = <span class="kw1">new</span> <a href="http://www.google.com/search?q=rectangle%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:rectangle.html"><span class="kw5">Rectangle</span></a><span class="br0">&#40;</span>0<span class="sy0">,</span> 0<span class="sy0">,</span> _cellSize<span class="sy0">,</span> _cellSize<span class="br0">&#41;</span><span class="sy0">;</span>
	<span class="br0">&#125;</span>
&nbsp;
	<span class="kw1">public</span> inline <span class="kw3">function</span> <span class="kw7">lock</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span>Void
	<span class="br0">&#123;</span>
		_renderTarget<span class="sy0">.</span><span class="kw7">lock</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
		_renderTarget<span class="sy0">.</span><span class="kw7">fillRect</span><span class="br0">&#40;</span>_renderTarget<span class="sy0">.</span><span class="kw7">rect</span><span class="sy0">,</span> 0xff0000<span class="br0">&#41;</span><span class="sy0">;</span>
	<span class="br0">&#125;</span>
&nbsp;
	<span class="kw1">public</span> inline <span class="kw3">function</span> renderCell<span class="br0">&#40;</span><span class="kw7">x</span><span class="sy0">:</span>Int<span class="sy0">,</span> <span class="kw7">y</span><span class="sy0">:</span>Int<span class="sy0">,</span> isLive<span class="sy0">:</span>Bool<span class="br0">&#41;</span><span class="sy0">:</span>Void
	<span class="br0">&#123;</span>
		<span class="kw1">if</span> <span class="br0">&#40;</span>isLive<span class="br0">&#41;</span>
		<span class="br0">&#123;</span>
			_rect<span class="sy0">.</span><span class="kw7">x</span> = <span class="kw7">x</span> <span class="sy0">*</span> _cellSize<span class="sy0">;</span>
			_rect<span class="sy0">.</span><span class="kw7">y</span> = <span class="kw7">y</span> <span class="sy0">*</span> _cellSize<span class="sy0">;</span>
			_renderTarget<span class="sy0">.</span><span class="kw7">fillRect</span><span class="br0">&#40;</span>_rect<span class="sy0">,</span> 0<span class="br0">&#41;</span><span class="sy0">;</span>
		<span class="br0">&#125;</span>
	<span class="br0">&#125;</span>
&nbsp;
	<span class="kw1">public</span> inline <span class="kw3">function</span> <span class="kw7">unlock</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span>Void
	<span class="br0">&#123;</span>
		_renderTarget<span class="sy0">.</span><span class="kw7">unlock</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
	<span class="br0">&#125;</span>
&nbsp;
<span class="br0">&#125;</span></pre></div></div>
<p>Will compile down to flash, c++ and Javascript! NME also includes packaging abilities for webos, android and ios. So with a few scripted command lines you can target most app marketplaces:</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://mikecann.co.uk/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">haxelib run nme test YourProject.nmml flash
haxelib run nme update YourProject.nmml ios
haxelib run nme test YourProject.nmml webos
haxelib run nme test YourProject.nmml android
haxelib run nme test YourProject.nmml cpp
haxelib run nme test YourProject.nmml cpp -64</pre></div></div>
<p>What it means for this project is we could very quickly get a view for our game of life running in flash, JS and native desktop.</p>
<p>To show just how easy it is I made the following video:</p>
<p><object width="700" height="505"><param name="movie" value="http://www.youtube.com/v/VNF2gH5o9Zs?version=3&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/VNF2gH5o9Zs?version=3&amp;hl=en_GB" type="application/x-shockwave-flash" width="700" height="505" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>You can see the HTML5 build here: <a href="http://mikecann.co.uk/projects/gameoflife/Export/html5/bin/">http://mikecann.co.uk/projects/gameoflife/Export/html5/bin/</a></p>
<p>And the flash build here: <a href="http://mikecann.co.uk/projects/gameoflife/Export/flash/bin/MyApplication.swf">http://mikecann.co.uk/projects/gameoflife/Export/flash/bin/MyApplication.swf</a></p>
<p>I have uploaded the source for the project here: <a href="http://mikecann.co.uk/projects/gameoflife/gameoflife.zip">http://mikecann.co.uk/projects/gameoflife/gameoflife.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/personal-project/conways-game-of-life-in-haxe-nme-massiveunit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Inputtie Development History &#8211; Networking</title>
		<link>http://mikecann.co.uk/uncategorized/inputtie-development-history-networking/</link>
		<comments>http://mikecann.co.uk/uncategorized/inputtie-development-history-networking/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 19:44:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Inputtie]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[broadcast]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jgroup]]></category>
		<category><![CDATA[jmdns]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[zero conf]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1382</guid>
		<description><![CDATA[This is part two in my series of posts on the development history of Inputtie. In this post I talk about the challenge of device discovery and networking in the Inputtie app. Zero Configure Networking I knew I wanted Inputtie to be as simple to get running as simply starting it up. For this to [...]]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 13.0px 0.0px; line-height: 19.0px; font: 13.0px Georgia} p.p2 {margin: 0.0px 0.0px 16.0px 0.0px; line-height: 19.0px; font: 20.0px Georgia} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 19.0px; font: 13.0px Georgia; color: #0101ee; min-height: 15.0px} p.p4 {margin: 0.0px 0.0px 13.0px 0.0px; line-height: 19.0px; font: 13.0px Georgia; min-height: 15.0px} span.s1 {text-decoration: underline ; color: #0101ee} span.s2 {color: #0101ee} -->This is part two in my series of posts on the development history of <a href="http://www.inputtie.com/">Inputtie</a>.</p>
<p>In this post I talk about the challenge of device discovery and networking in the Inputtie app.</p>
<p><strong><a href="http://mikecann.co.uk/wp-content/uploads/2010/10/ScreenHunter_03-Oct.-09-13.59.jpg"><img class="alignleft size-full wp-image-1379" style="margin-left: 0px; margin-right: 5px;" title="ScreenHunter_03 Oct. 09 13.59" src="http://mikecann.co.uk/wp-content/uploads/2010/10/ScreenHunter_03-Oct.-09-13.59.jpg" alt="" width="152" height="148" /></a>Zero Configure Networking</strong></p>
<p>I knew I wanted Inputtie to be as simple to get running as simply starting it up. For this to happen Inputtie would need to discover all other devices on the network also running Inputtie. So how to do this?</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/10/ScreenHunter_03-Oct.-09-13.59.jpg"></a></p>
<p>Well, as it happened I had been reading at the time about <a href="http://www.apple.com/support/bonjour/">Apple&#8217;s Bonjour</a> which was designed to do just what I needed. It is a combination of a multi-cast and DNS lookup service that allows it to detect other Bonjour capable devices on the network. Sounds perfect.</p>
<p>So I got to work on implementing their Java API. After many trials and tribulations I eventually had it working.. kinda. It was detecting other devices sure, but every now and then it would sporadically disconnect from the network. I couldn&#8217;t for the life of me work out why. I posted on forums and even tried to read the reams of source to see what was going on but alas to no avail.</p>
<p>After much deliberation I decided to look for another solution to the problem of Zero Conf. networking. Next up were a whole host of other attempts. I tried <a href="http://jmdns.sourceforge.net/">JmDNS </a>which is was supposedly very similar to Bonjour. I also experimented with <a href="http://www.jgroups.org/">JGroups</a>. I had limited success with all of them and in the end only really succeeded in wasting several months worth of development time.</p>
<p><strong>The Solution</strong></p>
<p>In the end the solution (and the one currently employed in Inputtie) was the simplest. After months of messing around with these libraries I had learnt quite abit about how they performed their magic. At the heart of it they either used multi-cast or broadcasting to announce a device on a network. Broadcasting can be thought of as a sort of sonar pulse. The broadcasting computer sends a message on a specific IP address then another device listens for the message and proceeds to open a Socket for a more private form of communication. From <a href="http://en.wikipedia.org/wiki/Broadcast_address">Wikipedia</a>:</p>
<blockquote><p>A broadcast address is a logical address at which all devices connected to a multiple-access communications network are enabled to receive datagrams. A message sent to a broadcast address is typically received by all network-attached hosts, rather than by a specific host.</p></blockquote>
<p>I decided that if these libraries could use broadcasting for discovery then so could I and if I wrote it myself I could keep it simple. So I set to work coding an example in Java. In no time at all I had it running and surprisingly it worked! Sure it wasnt as robust as the established libraries, it didn&#8217;t handle devices disconnecting from the network, different network subnets or IPv6 but it was simple and at least it worked!</p>
<p><strong>Broadcasting in Adobe AIR</strong></p>
<p>As I mentioned in <a href="http://mikecann.co.uk/inputtie/inputtie-history-the-beginning/">a previous post</a> Inputtie went through many re-writes during development from its original form in Java through C++, C Sharp and finally Adobe AIR. With the latest (it was still in beta when I started development) version of Adobe AIR 2.0 several new APIs were made available for use, one of them being new classes designed specifically for peer to peer (P2P) networking. With these new APIs I believed I should be able to implement network broadcasting much in the same was I was doing in Java. Unfortunately however it seemed that Adobe was restricting the use of broadcast to <a href="http://labs.adobe.com/technologies/cirrus/">their new P2P service Cirrus.</a></p>
<p>There was however another crucial API released with AIR 2.0; the NativeProcess API. With this a developer is able to easily execute and communicate with a program written in another language. What this meant for Inputtie was that I could write the user interface in AIR and then use NativeProcess to call Java code that would perform actions not available in AIR, such as Broadcasting. (incidentally it also is a great way to do multi-threading in Air <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p>So the current solution in Inputtie is to use NativeProcess from AIR to communicate with a small headless (no user-interface) Java process that does the broadcasting and listening for broadcasts. Once the Java process detects an incoming broadcast it passes the information back to AIR.</p>
<p><strong>EDIT:</strong> If anyone is interested in seeing the source to my previous (failed) attempt just drop me a comment or an email and I would be happy to share.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/uncategorized/inputtie-development-history-networking/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Inputtie &#8211; Beta Drawing Near!</title>
		<link>http://mikecann.co.uk/personal-projects/inputtie-beta-drawing-near/</link>
		<comments>http://mikecann.co.uk/personal-projects/inputtie-beta-drawing-near/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 19:26:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Inputtie]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1349</guid>
		<description><![CDATA[Final testing is under way here at mission control for the Inputtie Beta. 1 Keyboard, 1 Mouse, 1 PC, 2 Laptops, 1 Netbook, 4 Operating Systems. All systems are go! Almost ready for takeoff!]]></description>
			<content:encoded><![CDATA[<p>Final testing is under way here at mission control for the <a href="http://www.inputtie.com">Inputtie</a> Beta.</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/09/photo1.jpg"><img class="alignnone size-full wp-image-1350" title="photo" src="http://mikecann.co.uk/wp-content/uploads/2010/09/photo1.jpg" alt="" width="700" height="525" /></a></p>
<p>1 Keyboard, 1 Mouse, 1 PC, 2 Laptops, 1 Netbook, 4 Operating Systems.</p>
<p>All systems are go! Almost ready for takeoff!</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/personal-projects/inputtie-beta-drawing-near/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ludum Dare Hour 408 (15 Days later) &#8211; Results!</title>
		<link>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-408-15-days-later-results/</link>
		<comments>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-408-15-days-later-results/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 07:19:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ludum Dare]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[dare]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[judge]]></category>
		<category><![CDATA[ludum]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[rank]]></category>
		<category><![CDATA[score]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1304</guid>
		<description><![CDATA[Well the judging is now finally over for the Ludum Dare competition I entered 17 days ago. So overall I placed #21 which is just outside the top 20. Not bad for a first time entry but I thought I would of done better considering some of the game ranked higher than me but oh [...]]]></description>
			<content:encoded><![CDATA[<p>Well the judging is now finally over for the Ludum Dare competition I entered 17 days ago.</p>
<p>So overall I placed #21 which is just outside the top 20. Not bad for a first time entry but I thought I would of done better considering some of the game ranked higher than me but oh well.</p>
<p>I actually game second in one category.. Community? Not entirely sure how I managed that but oh well <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>I think I may have received the most number of votes out of any of the games, it certaintly seems like a lot take a look:</p>
<h3>Ratings</h3>
<table>
<tbody>
<tr>
<th>Inn</th>
<th>Fun</th>
<th>The</th>
<th>Gra</th>
<th>Aud</th>
<th>Hum</th>
<th>Ove</th>
<th>Com</th>
</tr>
<tr>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">1</td>
<td align="center">1</td>
<td align="center">3</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">1</td>
<td align="center">3</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">-</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">1</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">5</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">2</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">5</td>
<td align="center">5</td>
<td align="center">2</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">-</td>
<td align="center">4</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">1</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">2</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">-</td>
<td align="center">3</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">2</td>
<td align="center">-</td>
<td align="center">3</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">5</td>
<td align="center">5</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">5</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">-</td>
<td align="center">3</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">1</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">-</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">-</td>
<td align="center">2</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">1</td>
<td align="center">4</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">3</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">-</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">5</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">5</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">4</td>
<td align="center">-</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">3</td>
<td align="center">5</td>
<td align="center">2</td>
<td align="center">4</td>
<td align="center">3</td>
<td align="center">4</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">2</td>
<td align="center">2</td>
<td align="center">1</td>
<td align="center">2</td>
<td align="center">-</td>
</tr>
<tr>
<th align="center">3.17</th>
<th align="center">3.45</th>
<th align="center">3.57</th>
<th align="center">4.09</th>
<th align="center">2.64</th>
<th align="center">3.20</th>
<th align="center">3.43</th>
<th align="center">4.38</th>
</tr>
</tbody>
</table>
<p>So my overall scores in the various categories were:</p>
<p><strong>Innovation:</strong> 3.17<br />
<strong>Fun:</strong> 3.45<br />
<strong>Theme:</strong> 3.57<br />
<strong>Graphics:</strong> 4.09<br />
<strong>Audio</strong>: 2.64<br />
<strong>Humor:</strong> 3.20<br />
<strong>Overall:</strong> 3.43<br />
<strong>Community: </strong>4.38</p>
<p>The winners in each category are as follows:</p>
<p><strong>Innovation:</strong> <a href="http://www.ludumdare.com/compo/ludum-dare-18/?uid=2645">Switchbreak 4.21</a><br />
<strong>Fun:</strong> <a href="http://www.ludumdare.com/compo/ludum-dare-18/?uid=2073">Invicticide 4.17</a><br />
<strong>Theme:</strong> <a href="http://www.ludumdare.com/compo/ludum-dare-18/?uid=2604">TomBom 4.36</a><br />
<strong>Graphics:</strong> <a href="http://www.ludumdare.com/compo/ludum-dare-18/?uid=785">NialM 4.63</a><br />
<strong>Audio</strong>: <a href="http://www.ludumdare.com/compo/ludum-dare-18/?uid=2396">Greasemonkey 4.07</a><br />
<strong>Humor: </strong><a href="http://www.ludumdare.com/compo/ludum-dare-18/?uid=1116">Deps 4.06</a><br />
<strong>Overall: </strong><a href="http://www.ludumdare.com/compo/ludum-dare-18/?uid=2073">Invicticide 4.07</a><br />
<strong>Community: </strong><a href="http://www.ludumdare.com/compo/ludum-dare-18/?uid=234">HybridMind 4.52</a></p>
<p>Oh well, I enjoyed the competition. Im planning on polishing the game a little more now the competition is over then im going to release it to the wider world.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-408-15-days-later-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joa Does It Again!</title>
		<link>http://mikecann.co.uk/programming/joa-does-it-again/</link>
		<comments>http://mikecann.co.uk/programming/joa-does-it-again/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 23:28:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[joa]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[Particles]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1298</guid>
		<description><![CDATA[So I have written about Mr Joa &#8216;The Flash God&#8217; Ebert before. He is well known throughout the Flash community for his incredible coding skills, particularly his work on low-level SWF optimisation. His latest project is called JITB and its nothing short of stunning as this video taken from his blog shows: Basically he has gone [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_01-Aug.-31-14.04.jpg"><img class="alignnone size-full wp-image-1300" title="ScreenHunter_01 Aug. 31 14.04" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_01-Aug.-31-14.04.jpg" alt="" width="678" height="380" /></a></p>
<p>So I have <a href="http://mikecann.co.uk/flash/funk-ioc-a-new-dependency-injection-framework/">written about Mr Joa &#8216;The Flash God&#8217; Ebert before</a>. He is well known throughout the Flash community for his incredible coding skills, particularly his work on low-level SWF optimisation.</p>
<p>His latest project is called JITB and its nothing short of stunning as this video taken <a href="http://blog.joa-ebert.com/2010/08/31/so-i-recorded-a-new-video/">from his blog</a> shows:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="700" height="550" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/atzHF7YGp6Y?fs=1&amp;hl=en_GB&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="700" height="550" src="http://www.youtube.com/v/atzHF7YGp6Y?fs=1&amp;hl=en_GB&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Basically he has gone and written a Flash Player in Java. What this means is that you get all those awesome speed benefits and optimisations that the Java team has worked hard for years and years to implement but you can write it all in a language already familiar and sexy, AS3! The result? You get about a 30x speedup! (disclaimer: a micro-benchmark taken from Joa&#8217;s blog)</p>
<p>This is all great news and very exciting. I cant wait to see a custom browser plugin using this flash player, or even having Pixel Bender shaders running on the hardware *me drools in anticipation*.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/programming/joa-does-it-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>48 Hours Later &#8211; Timelapse &amp; Gameplay Videos</title>
		<link>http://mikecann.co.uk/ludum-dare/48-hours-later-timelapse-gameplay-videos/</link>
		<comments>http://mikecann.co.uk/ludum-dare/48-hours-later-timelapse-gameplay-videos/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 22:00:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ludum Dare]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[gameplay]]></category>
		<category><![CDATA[ludum]]></category>
		<category><![CDATA[Timelapse]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1291</guid>
		<description><![CDATA[Just made these two videos. One is the timelapse video I took to show my development process and the other is to show off the gameplay for those that cant run flash (Linux) or dont want to actually play the game, just want to see what the fuss is about The timelapse was produced using [...]]]></description>
			<content:encoded><![CDATA[<p>Just made these two videos. One is the timelapse video I took to show my development process and the other is to show off the gameplay for those that cant run flash (Linux) or dont want to actually play the game, just want to see what the fuss is about <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>The timelapse was produced using 2300 ish screenshots, one taken every 60 seconds by Chronolapse.</p>
<p>Enjoy:</p>
<p><object width="700" height="418"><param name="movie" value="http://www.youtube.com/v/Qg5VMg7gnIc?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Qg5VMg7gnIc?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="700" height="418"></embed></object></p>
<p><object width="700" height="418"><param name="movie" value="http://www.youtube.com/v/KViIaLKfj0I?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KViIaLKfj0I?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="700" height="418"></embed></object></p>
<p>You can play the game here: <a href="http://mikecann.co.uk/ludum-dare/ludum-dare-hour-40-complete/#thegame">http://mikecann.co.uk/ludum-dare/ludum-dare-hour-40-complete/#thegame</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/ludum-dare/48-hours-later-timelapse-gameplay-videos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ludum Dare &#8211; Hour 40 &#8211; COMPLETE!</title>
		<link>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-40-complete/</link>
		<comments>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-40-complete/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 17:46:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ludum Dare]]></category>
		<category><![CDATA[finished]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[leiro]]></category>
		<category><![CDATA[ludum]]></category>
		<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1266</guid>
		<description><![CDATA[Okay well its not quite complete, the waves of enemies could do with some more work but I have my mum coming up from London to visit me in 30 mins so im gonna call it quits here. So, finally it has a name, I have called it &#8220;48 Hours Later&#8221; Its not technically true [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/title.png"><img class="alignnone size-full wp-image-1276" title="title" src="http://mikecann.co.uk/wp-content/uploads/2010/08/title.png" alt="" width="592" height="139" /></a></p>
<p>Okay well its not quite complete, the waves of enemies could do with some more work but I have my mum coming up from London to visit me in 30 mins so im gonna call it quits here.</p>
<p>So, finally it has a name, I have called it &#8220;48 Hours Later&#8221; <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Its not technically true as I have only had 40 hours to do it, but oh well!</p>
<p>Overall im pretty happy with my first Ludum Dare entry, im very tired right now and have a banging headache, but thats all part of the fun right?</p>
<p>So onto the game. First some shots:</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_01-Aug.-22-18.101.jpg"><img class="alignnone size-medium wp-image-1277" title="ScreenHunter_01 Aug. 22 18.10" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_01-Aug.-22-18.101-300x270.jpg" alt="" width="300" height="270" /></a><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_02-Aug.-22-18.10.jpg"><img class="alignnone size-medium wp-image-1268" title="ScreenHunter_02 Aug. 22 18.10" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_02-Aug.-22-18.10-300x269.jpg" alt="" width="300" height="269" /><br />
</a><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_03-Aug.-22-18.111.jpg"><img class="alignnone size-medium wp-image-1274" title="ScreenHunter_03 Aug. 22 18.11" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_03-Aug.-22-18.111-300x273.jpg" alt="" width="300" height="273" /></a><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_06-Aug.-22-18.111.jpg"><img class="alignnone size-medium wp-image-1275" title="ScreenHunter_06 Aug. 22 18.11" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_06-Aug.-22-18.111-300x271.jpg" alt="" width="300" height="271" /></a></p>
<p>Okay so if you have been following <a href="http://mikecann.co.uk/ludum-dare/ludum-dare-hour-1/">waaaay back my original intention</a> was to make a game with the same sort of art style as World of Goo but with the game mechanics of Boom Stick. I think I have stayed pretty true to that original idea.</p>
<p>Basically you fight against waves of enemies that float across the screen. There are currently only 10 waves, I would have liked more and with more variety but oh well <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The theme of the competition was &#8220;Enemies as Weapons&#8221;. I have incorporated that theme by having the enemies drop giblets when they die. You then have a certain amount of time to pick up those giblets and fire them back at the enemies. Enemies as weapons!</p>
<p>So as a disclaimer: im sure the game has many bugs and things, I have run out of time to do much in the way of testing and optimising. If you find any bugs however drop a comment I would love to hear about them as I plan to release this to a few flash portals, so would like to get those bugs fixed <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Anyways enough jibber jabber. A few more shots then the game is below:</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_09-Aug.-22-18.13.jpg"><img class="alignnone size-medium wp-image-1273" title="ScreenHunter_09 Aug. 22 18.13" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_09-Aug.-22-18.13-300x211.jpg" alt="" width="300" height="211" /></a><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_08-Aug.-22-18.13.jpg"><img class="alignnone size-medium wp-image-1272" title="ScreenHunter_08 Aug. 22 18.13" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_08-Aug.-22-18.13-300x296.jpg" alt="" width="300" height="296" /><br />
</a><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_07-Aug.-22-18.12.jpg"><img class="alignnone size-medium wp-image-1271" title="ScreenHunter_07 Aug. 22 18.12" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_07-Aug.-22-18.12-300x266.jpg" alt="" width="300" height="266" /></a><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_11-Aug.-22-18.39.jpg"><img class="alignnone size-medium wp-image-1280" title="ScreenHunter_11 Aug. 22 18.39" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_11-Aug.-22-18.39-300x244.jpg" alt="" width="300" height="244" /></a></p>
<p><a name="thegame"></a></p>
<p><object style="width: 600px; height: 500px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="500" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.mikecann.co.uk/DumpingGround/ld/18/05/LudumDare18.swf" /><embed style="width: 600px; height: 500px;" type="application/x-shockwave-flash" width="600" height="500" src="http://www.mikecann.co.uk/DumpingGround/ld/18/05/LudumDare18.swf"></embed></object></p>
<p><strong>EDIT:</strong> I have now made a youtube gameplay video and timelapse of development, <a href="http://mikecann.co.uk/?p=1291">check em here.</a></p>
<p>Tools Used:<br />
Adobe Photoshop CS5<br />
Adobe Flash Builder 4<br />
Adobe Flash CS5<br />
SFXR<br />
Chronolapse</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-40-complete/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Ludum Dare &#8211; Hour 31</title>
		<link>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-31/</link>
		<comments>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-31/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 08:37:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ludum Dare]]></category>
		<category><![CDATA[48hours]]></category>
		<category><![CDATA[bloom]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[gameplay]]></category>
		<category><![CDATA[Liero]]></category>
		<category><![CDATA[ludum]]></category>
		<category><![CDATA[Particles]]></category>
		<category><![CDATA[worms]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1261</guid>
		<description><![CDATA[Well its been quite a while since my last progress report. I have mostly been sleeping (well 4 hours of it anyways). So progress is coming along nicely STILL no gameplay tho :S So far you can shoot and destroy the enemies and then collect thier giblets before they become part of the terrain. The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_01-Aug.-22-09.36.jpg"><img class="alignnone size-full wp-image-1262" title="ScreenHunter_01 Aug. 22 09.36" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_01-Aug.-22-09.36.jpg" alt="" width="664" height="599" /></a></p>
<p>Well its been quite a while since my last progress report. I have mostly been sleeping (well 4 hours of it anyways).</p>
<p>So progress is coming along nicely STILL no gameplay tho :S</p>
<p>So far you can shoot and destroy the enemies and then collect thier giblets before they become part of the terrain. The idea is that you can then shoot those giblets back at the enemies. Take alook if you are interested:</p>
<p><object style="width: 600px; height: 500px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="500" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.mikecann.co.uk/DumpingGround/ld/18/04/LudumDare18.swf" /><embed style="width: 600px; height: 500px;" type="application/x-shockwave-flash" width="600" height="500" src="http://www.mikecann.co.uk/DumpingGround/ld/18/04/LudumDare18.swf"></embed></object></p>
<p>Oh I just noticed I left some debug sliders on there I was using to try and hone the bloom levels. Have a play with them if you want.</p>
<p>Right. Gameplay.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-31/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ludum Dare &#8211; Hour 22</title>
		<link>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-22/</link>
		<comments>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-22/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 23:04:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ludum Dare]]></category>
		<category><![CDATA[48hours]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[ludum]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1255</guid>
		<description><![CDATA[Okay, im starting to get pretty tired. Its not very late (midnight) but I think the lack of sleep last night is catching up with me. Im gonna get a few hours kip now then back up early to start again I think. As for progress. I have a basic enemy type in, it doesnt [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_02-Aug.-21-23.59.jpg"><img class="alignnone size-full wp-image-1256" title="ScreenHunter_02 Aug. 21 23.59" src="http://mikecann.co.uk/wp-content/uploads/2010/08/ScreenHunter_02-Aug.-21-23.59.jpg" alt="" width="660" height="597" /></a></p>
<p>Okay, im starting to get pretty tired. Its not very late (midnight) but I think the lack of sleep last night is catching up with me. Im gonna get a few hours kip now then back up early to start again I think.</p>
<p>As for progress. I have a basic enemy type in, it doesnt do much except bleed, and it doesnt look too good (I really cant draw!) but oh well.</p>
<p>As before I have done a build that you can &#8220;play&#8221;:</p>
<p><object style="width: 600px; height: 500px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="500" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.mikecann.co.uk/DumpingGround/ld/18/02/LudumDare18.swf" /><embed style="width: 600px; height: 500px;" type="application/x-shockwave-flash" width="600" height="500" src="http://www.mikecann.co.uk/DumpingGround/ld/18/03/LudumDare18.swf"></embed></object></p>
<p>So the next task for me when I wake up is to add some sort of scoring mechanism and ofcourse to add the ability to use the &#8220;Enemies as Weapons&#8221; <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/ludum-dare/ludum-dare-hour-22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

