<?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.ukMikeCann.co.uk - mikey see, mikey do!</title>
	<atom:link href="http://mikecann.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikecann.co.uk</link>
	<description>mikey see, mikey do!</description>
	<lastBuildDate>Wed, 16 May 2012 19:36:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Printomi Maps</title>
		<link>http://mikecann.co.uk/personal-projects/printomi-maps/</link>
		<comments>http://mikecann.co.uk/personal-projects/printomi-maps/#comments</comments>
		<pubDate>Wed, 16 May 2012 19:36:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[Printomi]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1914</guid>
		<description><![CDATA[Well since we have made the decision to discontinue Printomi I have been backing up the databases and downloading the 90GB+ of images that users have uploaded. Well it wouldn&#8217;t be like me if I didnt start thinking about what cool things I do with all those pixels. I remember seeing those cool Mincraft maps that use [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2012/05/01.png"><img class="alignnone size-full wp-image-1907" title="01" src="http://mikecann.co.uk/wp-content/uploads/2012/05/01.png" alt="" width="700" height="330" /></a></p>
<p>Well since we have made the <a href="http://mikecann.co.uk/printomi/sunsetting-printomi/">decision to discontinue Printomi</a> I have been backing up the databases and downloading the 90GB+ of images that users have uploaded.</p>
<p>Well it wouldn&#8217;t be like me if I didnt start thinking about what cool things I do with all those pixels. I remember seeing those <a href="http://www.deadworkerspartynetwork.com/theshaft/map1/mapalt1/map.html?worldX=980&amp;worldY=0&amp;worldZ=160&amp;zoom=6">cool Mincraft maps</a> that use the Google Maps API to explore the Minecraft servers and it got me thinking if it could be possible to do something like that but for the Printomi images.</p>
<p>Well it turns out yes, you can: <a href="http://www.mikecann.co.uk/projects/PrintomiMaps/">http://www.mikecann.co.uk/projects/PrintomiMaps/</a></p>
<p>Its only 1,024 of the total 27,497 images that were uploaded but even this small ratio results in a total map size of 115,200 x 86,400 pixels. The Google Maps obviously cant handle an image that large and it would take forever to download so you must split it up into many tiles. To achieve the zooming and performance you must also provide the map at various sizes.</p>
<p>With a map of 32&#215;32 image with each image at 3600&#215;2700 pixels and each tile at 450&#215;337 this results in 87,000 tiles at 8 zoom levels! Generating and uploading all that data takes several days. But the result is you can pan and zoom around what seems like one huge 115k x 84k image.</p>
<p>If you are interested I have uploaded the source code I wrote to generate the 87k tiles at the various zoom levels from the 1024 3600&#215;2700 input images. You can find it over on Github: <a href="https://github.com/mikecann/PrintomiMaps">https://github.com/mikecann/PrintomiMaps</a></p>
<p>If I had enough disk space on my web server I would love to do the whole 37,000 images in this way. If I did 128&#215;128 that would use 16,384 of the images. This would result in 10 zoom levels and a map 460,800 x 345,600 pixels large. I have no idea or how long it would take to generate and upload all those tiles <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/personal-projects/printomi-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sunsetting Printomi</title>
		<link>http://mikecann.co.uk/printomi/sunsetting-printomi/</link>
		<comments>http://mikecann.co.uk/printomi/sunsetting-printomi/#comments</comments>
		<pubDate>Sat, 12 May 2012 16:40:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Printomi]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1906</guid>
		<description><![CDATA[267,270,840,000 pixels 93,607,639,042 bytes uploaded 34,827 prints viewed 31,073 uploads started 27,497 uploads finished 4,126 uploads claimed 3,143 members 541 likes 308 comments 0 posters sold After just 41 days live we have taken the difficult decision to turn off the Printomi servers. Despite the great stats regarding the number of uploads and views and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2012/05/02.png"><img class="size-full wp-image-1908 aligncenter" title="02" src="http://mikecann.co.uk/wp-content/uploads/2012/05/02.png" alt="" width="700" height="400" /></a></p>
<div style="text-align: center;">
<h3><strong>267,270,840,000</strong> pixels</h3>
<h3><strong>93,607,639,042</strong> bytes uploaded</h3>
<h3><strong>34,827</strong> prints viewed</h3>
<h3><strong>31,073</strong> uploads started</h3>
<h3><strong>27,497</strong> uploads finished</h3>
<h3><strong>4,126</strong> uploads claimed</h3>
<h3><strong>3,143</strong> members</h3>
<h3><strong>541</strong> likes</h3>
<h3><strong>308</strong> comments</h3>
<h3><strong>0</strong> posters sold</h3>
</div>
<p>After just 41 days live we have taken the difficult decision to turn off the Printomi servers. Despite the great stats regarding the number of uploads and views and user engagement, without the poster sales we are unable to keep funding the AWS servers and store the 90GB+ of images that users have uploaded.</p>
<p>Developing Printomi has been a great roller coaster ride of a project. It has been hard work, months of late nights to get things into a shape and despite the fact that <a href="http://mikecann.co.uk/business/introducing-printomi/">less than two months later</a> we decided to shut it all down I still think it was worth it. I am proud of what we accomplished with Printomi and hope that during its short time live others enjoyed what we created.</p>
<p>I am determined not to get downhearted, instead to grow and learn from the many lessons learnt here. Some things worked and others didnt, but it was all good experience. Printomi&#8217;s mistakes are all about driving me onto the next, bigger, better thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/printomi/sunsetting-printomi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Printomi</title>
		<link>http://mikecann.co.uk/business/introducing-printomi/</link>
		<comments>http://mikecann.co.uk/business/introducing-printomi/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 21:00:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Printomi]]></category>
		<category><![CDATA[Announce]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1880</guid>
		<description><![CDATA[I&#8217;m extremely proud to announce the launch of a project I have been working on for quite a while now. Printomi is a service for social games that allows players to take snapshots of their worlds and upload them to their own personal gallery. Players can like, comment share and order poster prints of their [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/head.png"><img class="alignnone size-full wp-image-1881" title="head" src="http://mikecann.co.uk/wp-content/uploads/2012/04/head.png" alt="" width="700" height="300" /></a></p>
<p style="text-align: justify;">I&#8217;m extremely proud to announce the launch of a project I have been working on for quite a while now.</p>
<p style="text-align: justify;"><a href="http://www.printomi.com/">Printomi</a> is a service for social games that allows players to take snapshots of their worlds and upload them to their own personal gallery. Players can like, comment share and order poster prints of their virtual creations.</p>
<p style="text-align: justify;">The way it works is we provide the game owner with a tiny API that is used to interface with Printomi. The bulk of the Printomi client is downloaded at runtime from the Printomi servers. This is good for two reasons. Firstly by keeping down the size of the code that must be embedded into the game we can keep down the initial load time the player must sit through before they can play the game. Secondly we can upload changes and fixes to Printomi without requiring the game owner to recompile their code.</p>
<p style="text-align: justify;">Once downloaded the printomi client is ready to be be used. In the case of <a href="http://apps.facebook.com/gourmetranch">Gourmet Ranch</a> a themed button is shown to the player inviting them to click:</p>
<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/btn-to-click.png"><img class="size-full wp-image-1883 aligncenter" title="btn-to-click" src="http://mikecann.co.uk/wp-content/uploads/2012/04/btn-to-click.png" alt="" width="470" height="340" /></a></p>
<p style="text-align: justify;">Once clicked (or activated by the JavaScript API) the main Printomi window opens:</p>
<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/01.jpg"><img class="wp-image-1884 aligncenter" title="01" src="http://mikecann.co.uk/wp-content/uploads/2012/04/01.jpg" alt="" width="490" height="423" /></a></p>
<p style="text-align: justify;">The window has controls to zoom in and move the print about allowing the player to get the perfect angle of their world:</p>
<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/02.jpg"><img class="size-full wp-image-1885 aligncenter" title="02" src="http://mikecann.co.uk/wp-content/uploads/2012/04/02.jpg" alt="" width="500" height="428" /></a></p>
<p style="text-align: justify;">Once happy the player can then saves the print to the printomi servers. While the image is uploading the user can continue to play the game. Once the upload is complete the window is opened once more offering to show the player their print.</p>
<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/03.jpg"><img class="size-full wp-image-1886 aligncenter" title="03" src="http://mikecann.co.uk/wp-content/uploads/2012/04/03.jpg" alt="" width="500" height="431" /></a></p>
<p style="text-align: justify;">Printomi is tightly integrated with Facebook so that it&#8217;s as easy as possible for new users to get started:</p>
<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/04.jpg"><img class="size-full wp-image-1887 aligncenter" title="04" src="http://mikecann.co.uk/wp-content/uploads/2012/04/04.jpg" alt="" width="500" height="476" /></a></p>
<p style="text-align: justify;">Once connected the new print is then available for viewing, sharing, liking, commenting, etc:</p>
<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/05.jpg"><img class="size-full wp-image-1888 aligncenter" title="05" src="http://mikecann.co.uk/wp-content/uploads/2012/04/05.jpg" alt="" width="500" height="526" /></a></p>
<p style="text-align: justify;">In addition the prints are organised into galleries so that users can browse the uploads of others:</p>
<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/06.jpg"><img class="size-full wp-image-1890 aligncenter" title="06" src="http://mikecann.co.uk/wp-content/uploads/2012/04/06.jpg" alt="" width="500" height="525" /></a></p>
<p style="text-align: justify;">If a user particularly likes one print then they can order it as a poster:</p>
<p style="text-align: justify;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/07.jpg"><img class="size-full wp-image-1891 aligncenter" title="07" src="http://mikecann.co.uk/wp-content/uploads/2012/04/07.jpg" alt="" width="500" height="426" /></a></p>
<p style="text-align: justify;">Currently we only offer posters to people living in the US however we plan on opening it up to other countries when we can.</p>
<p style="text-align: justify;">To print to such a large poster (24&#215;18&#8243; @ 150DPI) and maintain the quality of the final product we must capture a large number of pixels. For example here is a comparison between what a user would see on printomi.com and what we store behind the scenes:</p>
<p style="width: 550px; text-align: center;"><a href="http://mikecann.co.uk/wp-content/uploads/2012/04/08.jpg"><img class="size-full wp-image-1892 aligncenter" title="08" src="http://mikecann.co.uk/wp-content/uploads/2012/04/08.jpg" alt="" width="500" height="600" /></a></p>
<p style="text-align: left;">The technology that lets us capture these large images and store them in a compressed way (to conserve disk space and therefore cost) is quite complex and will have to wait for a later post.</p>
<p style="text-align: justify;">Printomi is currently only available to a small subset of the <a href="http://apps.facebook.com/gourmetranch">Gourmet Ranch</a> user base but we are performing a steady-rollout to everyone, so if you don&#8217;t have access to the button in Gourmet Ranch just yet then don&#8217;t worry it should be available for you soon!</p>
<p style="text-align: justify;">Printomi is a culmination of many many hours of hard work, late nights and stress. But its been worth it! I&#8217;ve had a blast throughout the whole process and am proud of the result. I have also learnt a whole bunch in the process. I have had to work with so many technologies to pull this off, to name a few: AS3, C++, C#, ASP.Net, MySQL, IIS, AWS. I have particularly enjoyed the C# work having largely abandoned the language since my <a href="http://mikecann.co.uk/personal-project/windows-7-taskbar-performance-monitor-v0-2/">early work</a> <a href="http://mikecann.co.uk/chainreaction/killer-space-penguins/">with it.</a></p>
<p style="text-align: justify;"><a href="http://www.facebook.com/printomi" target="_blank"><img class="size-full wp-image-1898" title="fb" src="http://mikecann.co.uk/wp-content/uploads/2012/04/fb1.jpg" alt="" width="250" height="93" /></a><a href="https://twitter.com/#!/printomi"><img class="size-full wp-image-1896" title="tw" src="http://mikecann.co.uk/wp-content/uploads/2012/04/tw.jpg" alt="" width="250" height="92" /></a></p>
<p style="text-align: justify;">If you would like to support me or if you would like to keep up to date with the goings on with <a href="http://www.printomi.com/">Printomi</a> then you can like us on <a href="http://www.facebook.com/printomi">Facebook</a> or follow us on <a href="https://twitter.com/#!/printomi">Twitter</a> <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/business/introducing-printomi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Try { Harder } 2012 Levelup</title>
		<link>http://mikecann.co.uk/misc/try-harder-2012-levelup/</link>
		<comments>http://mikecann.co.uk/misc/try-harder-2012-levelup/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 17:39:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[levelup]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[tryharder]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1869</guid>
		<description><![CDATA[Last year I was fortunate to be one of the lucky 16 to attend the first try { harder } experimental conference / coder retreat in Nottingham. As mentioned in my blog post at the time it was an incredible 4-day event in which I learnt so much from some of the most talented and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2012/03/header.png"><img class="size-full wp-image-1870 alignnone" title="header" src="http://mikecann.co.uk/wp-content/uploads/2012/03/header.png" alt="" width="700" height="300" /></a></p>
<p><a href="http://mikecann.co.uk/programming/try-harder-my-haxe-slides-and-code/">Last year I was fortunate</a> to be one of the lucky 16 to attend the first try { harder } experimental conference / coder retreat in Nottingham. As mentioned in my <a href="http://mikecann.co.uk/programming/try-harder-my-haxe-slides-and-code/">blog post</a> at the time it was an incredible 4-day event in which I learnt so much from some of the most talented and experienced people in the flash community.</p>
<p>The event was such a success that not only is it going to run again this year (which I hope very much to attend) but there is also an additional &#8220;levelup&#8221; conference happening <a href="http://www.tryharder.org.uk/level-up-2012/">next week</a>. The idea behind the levelup is to provide businesses and freelancers with an intensive 4-day training and motoring session. The mentors are hand picked from the previous try harder members and so represent some of the best in their field.</p>
<p>What&#8217;s more <a href="http://www.xxcoder.net/">Stray</a>, the primary organiser of the event has just announced that Jetbrains the makers of the popular <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a> IDE are going to be sponsoring the event meaning each paying participant will receive a licence to use the IDE!</p>
<p>Interested? Head over to the levelup site and sign up: <a href="http://www.tryharder.org.uk/level-up-2012/">http://www.tryharder.org.uk/level-up-2012/</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/misc/try-harder-2012-levelup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Artificial &#8211; Second Life</title>
		<link>http://mikecann.co.uk/audio/artificial-second-life/</link>
		<comments>http://mikecann.co.uk/audio/artificial-second-life/#comments</comments>
		<pubDate>Sun, 26 Feb 2012 17:10:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[Personal Mixes]]></category>
		<category><![CDATA[dnb]]></category>
		<category><![CDATA[dubstep]]></category>
		<category><![CDATA[Mix]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1863</guid>
		<description><![CDATA[Just finished and uploaded a new mix I have been putting together over the last couple of weeks. The mix is mostly Dubstep with some Drum&#8217;n'Bass thrown in to mix it up a bit. The tracks are mostly all favourites I have had on repeat in the last 6 months. Give it at listen, see [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2012/02/header.png"><img class="size-full wp-image-1864 alignnone" title="header" src="http://mikecann.co.uk/wp-content/uploads/2012/02/header.png" alt="" width="700" height="400" /></a></p>
<p>Just finished and uploaded a new mix I have been putting together over the last couple of weeks. The mix is mostly Dubstep with some Drum&#8217;n'Bass thrown in to mix it up a bit. The tracks are mostly all favourites I have had on repeat in the last 6 months.</p>
<p>Give it at listen, see what you think:</p>
<p><iframe src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F37897361&amp;show_artwork=true" frameborder="no" scrolling="no" width="100%" height="166"></iframe></p>
<p>Tracklist:</p>
<p>01 Noisia &#8211; Tommys theme<br />
02 Gemini &#8211; Vision<br />
03 Nero &#8211; Promises (Skrillex &amp; Nero Remix)<br />
04 Tasha &#8211; Journey (Culprate &amp; Twist Remix)<br />
05 Labrinth feat. Tinie Tempah &#8211; Earthquake (Noisia Remix)<br />
06 Xilent &#8211; Choose Me II<br />
07 Gemini &#8211; Feel Stronger<br />
08 Porter Robinson &#8211; Spitfire<br />
09 Porter Robinson &#8211; Spitfire (Kill The Noise Remix)<br />
10 Nero &#8211; New Life<br />
11 Camo &amp; Krooked &#8211; Cross The Line (Metrik Remix)<br />
12 Camo &amp; Krooked, Body &amp; Soul &#8211; The Big Rush<br />
13 John B &#8211; Numbers (Camo &amp; Krooked Remix)<br />
14 Noisia &#8211; Could This Be<br />
15 Gemini &#8211; H. A. T. D.<br />
16 KOAN Sound &#8211; Funk Blaster<br />
17 Skrillex &#8211; Kill Everybody (KOAN Sound Remix)<br />
18 Two Door Cinema Club &#8211; What You Know (Feed Me Cover)<br />
19 Noisia &#8211; Tommys theme</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/audio/artificial-second-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playdemic on the Northwest News</title>
		<link>http://mikecann.co.uk/photos-personal/playdemic-on-the-northwest-news/</link>
		<comments>http://mikecann.co.uk/photos-personal/playdemic-on-the-northwest-news/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 13:20:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Photos & Personal]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Playdemic]]></category>
		<category><![CDATA[tv]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1854</guid>
		<description><![CDATA[Yesterday at Playdemic we had a visit from Ed Vaizey the Minister for Culture, Communications and Creative Industries. As one of the more successful games companies in the North West at the moment he wanted to come and talk to us. Along with him were a TV crew for the Northwest News. It was a good opportunity for [...]]]></description>
			<content:encoded><![CDATA[<p><iframe width="600" height="335" src="http://www.youtube.com/embed/TjMnDQw4zqI" frameborder="0" allowfullscreen></iframe></p>
<p>Yesterday at Playdemic we had a visit from Ed Vaizey the Minister for Culture, Communications and Creative Industries. As one of the more successful games companies in the North West at the moment he wanted to come and talk to us.</p>
<p>Along with him were a TV crew for the Northwest News. It was a good opportunity for us to show off GourmetRanch abit. Anyways check out the video above. I cant believe they used the Playdemic timeline I wrote on whiteboard in the kitchen including the joke about world domination!</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/photos-personal/playdemic-on-the-northwest-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Homebrewin&#8217; Tip</title>
		<link>http://mikecann.co.uk/misc/homebrewin-tip/</link>
		<comments>http://mikecann.co.uk/misc/homebrewin-tip/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 13:08:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1848</guid>
		<description><![CDATA[This post is a little off the normal beaten track for my blog. I have been so super busy of late on a project that I havent really had any time for technical personal projects. I have however had time to do a little home-brewing so I thought I would share a little tip I had picked [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2012/01/head.jpg"><img class="size-full wp-image-1849 alignnone" title="head" src="http://mikecann.co.uk/wp-content/uploads/2012/01/head.jpg" alt="" width="700" height="451" /></a></p>
<p>This post is a little off the normal beaten track for my blog. I have been so super busy of late on a project that I havent really had any time for technical personal projects.</p>
<p>I have however had time to do a little home-brewing so I thought I would share a little tip I had picked up. A little white back a friend lent me his kit for homebrewing. Its so simple all you have to do is fill a two litre bottle with juice and sugar, add a little yeast and cap it off with a simple valve-cap. Leave it for a few weeks and you have a &#8216;tastey&#8217; strong beverage.</p>
<p>The problem however is knowing how long to leave it. The instructions say 2-3weeks but that is heavily dependant on a number of factors such as the ambient temperature of the room. At first what I was doing was putting the juice, yeast and sugar in at the same time then giving it a good shake so all the sugar was disolved.</p>
<p>I have discovered a better way of doing things however. If you put the sugar in the bottom then put the yeast on top then gently pour in the juice over it then you get a rough indicator of when the fermentation process has completed. As the yeast grows and respirates it burns its way down through the sugar slowly converting the sucrose to alcohol. What this results in is a slowly shifting yeast layer as it works it way down. When the layer hits the bottom, no more sugar left and the brew is ready for drinking <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/misc/homebrewin-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring Cleaning &amp; Updated Bio</title>
		<link>http://mikecann.co.uk/photos-personal/spring-cleaning-updated-bio/</link>
		<comments>http://mikecann.co.uk/photos-personal/spring-cleaning-updated-bio/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 16:24:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Photos & Personal]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1842</guid>
		<description><![CDATA[I have been meaning to do this for a while, but never gotten round to it. Well more precisely other projects have always been more interesting so I pursued those instead This Christmas however I decided it was about time that I finally did it. Anyways I have finally given my bio on the About page abit of a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://mikecann.co.uk/wp-content/uploads/2007/09/about01.png" alt="" width="700" height="400" /></p>
<p>I have been meaning to do this for a while, but never gotten round to it. Well more precisely other projects have always been more interesting so I pursued those instead <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  This Christmas however I decided it was about time that I finally did it.</p>
<p>Anyways I have finally given my bio on the <a href="http://mikecann.co.uk/about-2/">About</a> page abit of a spit shine. I originally wrote it based on my CV a long time ago and thought it deserved a little bit of love considering that it gets quite a few hits. Its all written in the third person, im not entirely sure why I decided to do it like that originally, oh well.</p>
<p>I have also rearranged some of my earlier work so best to give the archive a more accurate timeline.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/photos-personal/spring-cleaning-updated-bio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hxaria, Infinite Terrain [HaXe, WebGL,dat.GUI]</title>
		<link>http://mikecann.co.uk/personal-project/hxaria-infinite-terrain-haxe-webgldat-gui/</link>
		<comments>http://mikecann.co.uk/personal-project/hxaria-infinite-terrain-haxe-webgldat-gui/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 14:19:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GLSL]]></category>
		<category><![CDATA[HaXe]]></category>
		<category><![CDATA[Hxaria]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[haxe]]></category>
		<category><![CDATA[Particles]]></category>
		<category><![CDATA[terraria]]></category>
		<category><![CDATA[tilemaps]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1790</guid>
		<description><![CDATA[So I have been working on my &#8220;Terraria like Terrain&#8221; project &#8220;Hxaria&#8221; again. Following on from the last post, I have now made it so that each particle can have its texture changed. This completes the functionality required to render each tile as a point sprite, as talked about in my previous post. The way [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/11/header.jpg"><img class="alignnone size-full wp-image-1792" title="header" src="http://mikecann.co.uk/wp-content/uploads/2011/11/header.jpg" alt="" width="700" height="416" /></a></p>
<p>So I have been working on my &#8220;<a href="http://mikecann.co.uk/personal-project/hxaria-terraria-like-terrain-in-haxe-and-webgl/">Terraria like Terrain</a>&#8221; project &#8220;Hxaria&#8221; again.</p>
<p>Following on from the last post, I have now made it so that each particle can have its texture changed. This completes the functionality required to render each tile as a point sprite, as talked about in my<a href="http://mikecann.co.uk/personal-project/hxaria-terraria-like-terrain-in-haxe-and-webgl/"> previous post</a>.</p>
<p>The way it works is that the entire world is recorded in a 2&#215;2 array Tilemap. This 2&#215;2 array holds a single Tile object for every single tile in the world:</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="actionscript3" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw4">class</span> Tile</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> <span class="kw7">x</span> <span class="sy0">:</span> Int<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw2">var</span> <span class="kw7">y</span> <span class="sy0">:</span> Int<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw2">var</span> <span class="kw7">type</span> <span class="sy0">:</span> Int<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw1">new</span><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> <span class="kw7">type</span><span class="sy0">:</span>Int<span class="br0">&#41;</span> <span class="br0">&#123;</span> <span class="kw1">this</span><span class="sy0">.</span><span class="kw7">x</span> = <span class="kw7">x</span><span class="sy0">;</span> <span class="kw1">this</span><span class="sy0">.</span><span class="kw7">y</span> = <span class="kw7">y</span><span class="sy0">;</span> <span class="kw1">this</span><span class="sy0">.</span><span class="kw7">type</span> = <span class="kw7">type</span><span class="sy0">;</span> <span class="br0">&#125;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li></ol></pre></div></div>
<p>&nbsp;</p>
<p>When the TileRenderer needs to render it asks this Tilemap for a Tile that represents that screen coordinate, the Tilemap then offsets the position due to the camera movement and returns a tile. So it looks something like:</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/11/tm.png"><img class="alignnone size-full wp-image-1795" title="tm" src="http://mikecann.co.uk/wp-content/uploads/2011/11/tm.png" alt="" width="600" height="357" /></a></p>
<p>The tile type is then passed to the shader in attribute buffers per point sprite / tile along with all the tiles which are stored on a single texture:</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/11/tilescompressed.png"><img class="alignnone size-full wp-image-1803" title="tilescompressed" src="http://mikecann.co.uk/wp-content/uploads/2011/11/tilescompressed.png" alt="" width="256" height="352" /></a></p>
<p>The shader then performs the neccessary calculations to work out what the UV coordinate in the texture. The Vertex Shader:</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="glsl" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">float</span> amplitude<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">float</span> tileSize<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">float</span> texTilesWide<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">float</span> texTilesHigh<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">float</span> invTexTilesWide<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">float</span> invTexTilesHigh<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw2">attribute</span> <span class="kw3">float</span> size<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">attribute</span> <span class="kw3">vec3</span> customColor<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">attribute</span> <span class="kw3">float</span> tileType<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw2">varying</span> <span class="kw3">vec3</span> vColor<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">varying</span> <span class="kw3">vec2</span> vTilePos<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw3">void</span> main<span class="br0">&#40;</span><span class="br0">&#41;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">	vColor <span class="sy0">=</span> customColor<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="kw3">float</span> t <span class="sy0">=</span> <span class="kw5">floor</span><span class="br0">&#40;</span>tileType<span class="sy0">/</span>texTilesWide<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	vTilePos <span class="sy0">=</span> <span class="kw3">vec2</span><span class="br0">&#40;</span>tileType<span class="sy0">-</span><span class="br0">&#40;</span>t<span class="sy0">*</span>texTilesWide<span class="br0">&#41;</span><span class="sy0">,</span> t<span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// +(.5/tileSize)</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="kw6">gl_PointSize</span> <span class="sy0">=</span> size<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw6">gl_Position</span> <span class="sy0">=</span> projectionMatrix <span class="sy0">*</span> modelViewMatrix <span class="sy0">*</span> <span class="kw3">vec4</span><span class="br0">&#40;</span> position<span class="sy0">,</span> 1<span class="sy0">.</span>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></ol></pre></div></div>
<p>&nbsp;</p>
<p>And the Fragment Shader:</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="glsl" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">vec3</span> color<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">sampler2D</span> texture<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">float</span> invTexTilesWide<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">uniform</span> <span class="kw3">float</span> invTexTilesHigh<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw2">varying</span> <span class="kw3">vec3</span> vColor<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="kw2">varying</span> <span class="kw3">vec2</span> vTilePos<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1"><span class="kw3">void</span> main<span class="br0">&#40;</span><span class="br0">&#41;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">	<span class="kw3">vec2</span> uv <span class="sy0">=</span> <span class="kw3">vec2</span><span class="br0">&#40;</span> <span class="kw6">gl_PointCoord</span><span class="sy0">.</span><span class="me1">x</span><span class="sy0">*</span>invTexTilesWide <span class="sy0">+</span> invTexTilesWide<span class="sy0">*</span>vTilePos<span class="sy0">.</span><span class="me1">x</span><span class="sy0">,</span> <span class="kw6">gl_PointCoord</span><span class="sy0">.</span><span class="me1">y</span><span class="sy0">*</span>invTexTilesHigh <span class="sy0">+</span> invTexTilesHigh<span class="sy0">*</span>vTilePos<span class="sy0">.</span><span class="me1">y</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="kw6">gl_FragColor</span> <span class="sy0">=</span> <span class="kw5">texture2D</span><span class="br0">&#40;</span> texture<span class="sy0">,</span> uv <span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li></ol></pre></div></div>
<p>So it works in a way very much like a raster engine. You only have to render as many particles as the screen can contain.</p>
<p>If the screen area moves beyond the extent of the Tilemap then more tiles are randomly generated:</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/11/22222.png"><img class="alignnone size-full wp-image-1796" title="22222" src="http://mikecann.co.uk/wp-content/uploads/2011/11/22222.png" alt="" width="515" height="335" /></a></p>
<p>The new tiles are randomly selected from 4 different types, Dirt, Gold, Diamonds and Rock. I have added some controls to the demo that allow you to tweak these values to demonstrate the random tile generation:</p>
<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/11/Shot_041.png"><img class="alignnone size-full wp-image-1797" title="Shot_04" src="http://mikecann.co.uk/wp-content/uploads/2011/11/Shot_041.png" alt="" width="254" height="168" /></a></p>
<p>The UI may look familiar to people that have seen any experiments anyone who has worked with Three.js before, its the very popular <a href="http://code.google.com/p/dat-gui/">dat.GUI</a>. Its a really simple library written in javascript for creating controls that can be used to tweak experiments, perfect for me!</p>
<p>To get dat.GUI to work with haxe, I used the awesome <a href="http://www.google.co.uk/url?sa=t&amp;rct=j&amp;q=haxe%20externs&amp;source=web&amp;cd=1&amp;ved=0CBwQFjAA&amp;url=http%3A%2F%2Fhaxe.org%2Fdoc%2Fjs%2Fexterns&amp;ei=Gu_QTvK8IYP4sgbo15TzDA&amp;usg=AFQjCNEQvrXVfGjjQNO-yHhZ6HRTKlcmYw">Extern feature of HaXe</a>. This means that all I have to do is provide a stub interface to dat.GUI rather than a full implementation in haXe. This is great as it allows me to rapidly begin to use the library but also have the type safety of HaXe. It didnt take long to stub out the bits of the library I needed in an extern:</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="actionscript3" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw4">package</span> dat<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 Mike Cann</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">extern <span class="kw4">class</span> GUI</div></li><li class="li1"><div class="de1"><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw1">new</span><span class="br0">&#40;</span>options<span class="sy0">:</span>Dynamic<span class="br0">&#41;</span> <span class="sy0">:</span> Void<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw7">add</span><span class="br0">&#40;</span>options<span class="sy0">:</span>Dynamic<span class="sy0">,</span> <span class="kw7">name</span><span class="sy0">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span class="kw5">String</span></a><span class="br0">&#41;</span> <span class="sy0">:</span> GUI<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw7">name</span><span class="br0">&#40;</span><span class="kw7">value</span><span class="sy0">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span class="kw5">String</span></a><span class="br0">&#41;</span> <span class="sy0">:</span> GUI<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw7">min</span><span class="br0">&#40;</span><span class="kw7">value</span><span class="sy0">:</span>Float<span class="br0">&#41;</span> <span class="sy0">:</span> GUI<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw7">max</span><span class="br0">&#40;</span><span class="kw7">value</span><span class="sy0">:</span>Float<span class="br0">&#41;</span> <span class="sy0">:</span> GUI<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> step<span class="br0">&#40;</span><span class="kw7">value</span><span class="sy0">:</span>Float<span class="br0">&#41;</span> <span class="sy0">:</span> GUI<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> onFinishChange<span class="br0">&#40;</span>f<span class="sy0">:</span>Void <span class="sy0">-&gt;</span> Void<span class="br0">&#41;</span> <span class="sy0">:</span> GUI<span class="sy0">;</span></div></li><li class="li1"><div class="de1">	<span class="kw1">public</span> <span class="kw3">function</span> listen<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy0">:</span> GUI<span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li></ol></pre></div></div>
<p>Then I used it like:</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> dat<span class="sy0">.</span>GUI<span class="sy0">;</span>
&nbsp;
<span class="coMULTI">/**
 * ...
 * @author
 */</span>
&nbsp;
<span class="kw4">class</span> GUIManager
<span class="br0">&#123;</span>
	<span class="kw1">public</span> <span class="kw2">var</span> goldChance <span class="sy0">:</span> Float<span class="sy0">;</span>
	<span class="kw1">public</span> <span class="kw2">var</span> rockChance <span class="sy0">:</span> Float<span class="sy0">;</span>
	<span class="kw1">public</span> <span class="kw2">var</span> diamondsChance <span class="sy0">:</span> Float<span class="sy0">;</span>
	<span class="kw1">public</span> <span class="kw2">var</span> mapWidth <span class="sy0">:</span> Int<span class="sy0">;</span>
	<span class="kw1">public</span> <span class="kw2">var</span> mapHeight <span class="sy0">:</span> Int<span class="sy0">;</span>
&nbsp;
	<span class="kw1">private</span> <span class="kw2">var</span> gui <span class="sy0">:</span> GUI<span class="sy0">;</span>
	<span class="kw1">private</span> <span class="kw2">var</span> game <span class="sy0">:</span> Game<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>game<span class="sy0">:</span>Game<span class="br0">&#41;</span>
	<span class="br0">&#123;</span>
		<span class="kw1">this</span><span class="sy0">.</span>game = game<span class="sy0">;</span>
&nbsp;
		gui = <span class="kw1">new</span> GUI<span class="br0">&#40;</span> <span class="br0">&#123;</span> <span class="kw7">height</span> <span class="sy0">:</span> 5 <span class="sy0">*</span> 32 <span class="sy0">-</span> 1 <span class="br0">&#125;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
		goldChance = game<span class="sy0">.</span>tilemap<span class="sy0">.</span>goldSpawnChance<span class="sy0">;</span>
		rockChance = game<span class="sy0">.</span>tilemap<span class="sy0">.</span>rockSpawnChance<span class="sy0">;</span>
		diamondsChance = game<span class="sy0">.</span>tilemap<span class="sy0">.</span>diamondsSpawnChance<span class="sy0">;</span>
		game<span class="sy0">.</span>tilemap<span class="sy0">.</span>mapResized = onTilemapResized<span class="sy0">;</span>
		mapWidth = <span class="nu0">0</span><span class="sy0">;</span>
		mapHeight = <span class="nu0">0</span><span class="sy0">;</span>
&nbsp;
		gui<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span><span class="kw1">this</span><span class="sy0">,</span> <span class="st0">'goldChance'</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">name</span><span class="br0">&#40;</span><span class="st0">&quot;Gold&quot;</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">min</span><span class="br0">&#40;</span>0<span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">max</span><span class="br0">&#40;</span>1<span class="br0">&#41;</span><span class="sy0">.</span>step<span class="br0">&#40;</span>0<span class="sy0">.</span>001<span class="br0">&#41;</span><span class="sy0">.</span>onFinishChange<span class="br0">&#40;</span><span class="kw3">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> game<span class="sy0">.</span>tilemap<span class="sy0">.</span>goldSpawnChance = goldChance<span class="sy0">;</span> <span class="br0">&#125;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
		gui<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span><span class="kw1">this</span><span class="sy0">,</span> <span class="st0">'rockChance'</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">name</span><span class="br0">&#40;</span><span class="st0">&quot;Rock&quot;</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">min</span><span class="br0">&#40;</span>0<span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">max</span><span class="br0">&#40;</span>1<span class="br0">&#41;</span><span class="sy0">.</span>step<span class="br0">&#40;</span>0<span class="sy0">.</span>001<span class="br0">&#41;</span><span class="sy0">.</span>onFinishChange<span class="br0">&#40;</span><span class="kw3">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> game<span class="sy0">.</span>tilemap<span class="sy0">.</span>rockSpawnChance = rockChance<span class="sy0">;</span> <span class="br0">&#125;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
		gui<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span><span class="kw1">this</span><span class="sy0">,</span> <span class="st0">'diamondsChance'</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">name</span><span class="br0">&#40;</span><span class="st0">&quot;Diamond&quot;</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">min</span><span class="br0">&#40;</span>0<span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">max</span><span class="br0">&#40;</span>1<span class="br0">&#41;</span><span class="sy0">.</span>step<span class="br0">&#40;</span>0<span class="sy0">.</span>001<span class="br0">&#41;</span><span class="sy0">.</span>onFinishChange<span class="br0">&#40;</span><span class="kw3">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> game<span class="sy0">.</span>tilemap<span class="sy0">.</span>diamondsSpawnChance = diamondsChance<span class="sy0">;</span> <span class="br0">&#125;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
		gui<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span><span class="kw1">this</span><span class="sy0">,</span> <span class="st0">'mapWidth'</span><span class="br0">&#41;</span><span class="sy0">.</span>listen<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
		gui<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span><span class="kw1">this</span><span class="sy0">,</span> <span class="st0">'mapHeight'</span><span class="br0">&#41;</span><span class="sy0">.</span>listen<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
	<span class="br0">&#125;</span>
&nbsp;
	<span class="kw1">private</span> <span class="kw3">function</span> onTilemapResized<span class="br0">&#40;</span>mapW<span class="sy0">:</span>Int<span class="sy0">,</span> mapH<span class="sy0">:</span>Int<span class="br0">&#41;</span><span class="sy0">:</span>Void
	<span class="br0">&#123;</span>
		mapWidth = mapW<span class="sy0">;</span>
		mapHeight = mapH<span class="sy0">;</span>
	<span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>
<p>Simples!</p>
<p>Anyways you can check the final result out on this page: <a href="http://mikecann.co.uk/projects/hxaria/02/">http://mikecann.co.uk/projects/hxaria/02/<br />
</a>(Click and drag to move the camera about)</p>
<p>I have also uploaded a quick video too:</p>
<p><iframe width="650" height="471" src="http://www.youtube.com/embed/Hw1bntVoNmU?hd=1" frameborder="0" allowfullscreen></iframe></p>
<p>I have also uploaded the source again to my github page: <a href="https://github.com/mikecann/Hxaria">https://github.com/mikecann/Hxaria</a><br />
(I have also created a tag, incase the source changes in the future)</p>
<p>Next up, lighting!</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/personal-project/hxaria-infinite-terrain-haxe-webgldat-gui/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New Blog Host &amp; Face-lift</title>
		<link>http://mikecann.co.uk/misc/new-blog-host-face-lift/</link>
		<comments>http://mikecann.co.uk/misc/new-blog-host-face-lift/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 15:48:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[strato]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1783</guid>
		<description><![CDATA[Just a quick post to say I have finally moved away from my old hosting on WebFusion and now im on the cheaper (and hopefully) more reliable hosting by STRATO. Its the first time I have had hosting on a windows machine and I must say I really like it. I feel much more at [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2011/11/mememe.jpg"><img class="alignnone size-full wp-image-1784" title="mememe" src="http://mikecann.co.uk/wp-content/uploads/2011/11/mememe.jpg" alt="" width="700" height="400" /></a><br />
Just a quick post to say I have finally moved away from my old hosting on WebFusion and now im on the cheaper (and hopefully) more reliable hosting by <a href="http://www.strato-hosting.co.uk/">STRATO</a>.</p>
<p>Its the first time I have had hosting on a windows machine and I must say I really like it. I feel much more at home on a windows machine, I know where everything is and im more familiar in a graphical OS. I had a couple of permissions problems related to uploading new images on wordpress but a quick Google turned up this post:</p>
<p><a href="http://wordpress.org/support/topic/weird-permissions-with-iis7-and-uploaded-images">http://wordpress.org/support/topic/weird-permissions-with-iis7-and-uploaded-images</a></p>
<p>Apparently WordPress sticks new uploads in the c:\windows\temp directory, before it moves them to the usual \wp-content\ folder, so you have to ensure that temporary folder has the correct permissions for IIS_IUSRS too else it wont work correctly when the file is moved to the content folder.</p>
<p>You may also notice that I have decided to give the blog a little face-lift too with a new theme. I decided this time to go for a paid theme, as they aren&#8217;t that expensive (compared to hosting costs) and the quality and customization with paid themes are go much better than their free counterparts. I found it on the excellent <a href="http://themeforest.net/">themeforest</a> site, the theme is called <a href="http://themeforest.net/item/pixelpower-responsive-html5css3-wordpress-theme/705136">PixelPower</a>.</p>
<p>Anyways if you find any broken links or anything off with the site then let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/misc/new-blog-host-face-lift/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

