<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Psy-Blog</title>
	<atom:link href="http://psycokenisis.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://psycokenisis.wordpress.com</link>
	<description>COMP4431 Game Design Workshop Journal</description>
	<lastBuildDate>Fri, 16 Sep 2011 23:18:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='psycokenisis.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/d462ec652296c3a92dd74dff8f05a16b?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Psy-Blog</title>
		<link>http://psycokenisis.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://psycokenisis.wordpress.com/osd.xml" title="Psy-Blog" />
	<atom:link rel='hub' href='http://psycokenisis.wordpress.com/?pushpress=hub'/>
		<item>
		<title>GWT + GAE 007 &#8211; Check your  web.xml configurations</title>
		<link>http://psycokenisis.wordpress.com/2011/09/16/gwt-gae-007-check-your-web-xml-configurations/</link>
		<comments>http://psycokenisis.wordpress.com/2011/09/16/gwt-gae-007-check-your-web-xml-configurations/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 23:18:48 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=149</guid>
		<description><![CDATA[So, after learning about how gsp [groovy server pages!] (and thus jsp) work I thought I&#8217;d give try to make my page a bit more maintainable. But it took me quite a while to get Eclipse to recognise jsp properly and luckily I finally found a solution! http://stackoverflow.com/questions/3112497/jsp-file-not-working-for-google-app-engine-guestbook-tutorial But that wasn&#8217;t all. It&#8217;s been a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=149&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, after learning about how gsp [groovy server pages!] (and thus jsp) work I thought I&#8217;d give try to make my page a bit more maintainable.</p>
<p>But it took me quite a while to get Eclipse to recognise jsp properly and luckily I finally found a solution!</p>
<p>http://stackoverflow.com/questions/3112497/jsp-file-not-working-for-google-app-engine-guestbook-tutorial</p>
<p>But that wasn&#8217;t all. It&#8217;s been a while since I last tinkered with the appengine and all its configurations and i kept getting a 503, service_unavailable error. After an hour of staring at my web.xml file, I noticed I didn&#8217;t specify the exact path to my servlet *doh!* Let this be a lesson to all. </p>
<p>That is all for this post &#8211; nothing interesting to report but do stay tuned for something exciting soon =)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=149&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2011/09/16/gwt-gae-007-check-your-web-xml-configurations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows 7 HotKeys</title>
		<link>http://psycokenisis.wordpress.com/2011/07/17/windows-7-hotkeys/</link>
		<comments>http://psycokenisis.wordpress.com/2011/07/17/windows-7-hotkeys/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 04:00:58 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=133</guid>
		<description><![CDATA[So I accidentally stumbled across some useful hotkey combinations using the &#8216;WindowsKey&#8217; which is so common on most PC keyboards. WindowsKey + #Number This seems quite good for power users which have to manage huge number of applications simultaneously. What this feature does is it&#8217;ll select the #N&#8217;th application which is on your taskbar. If [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=133&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I accidentally stumbled across some useful hotkey combinations using the &#8216;WindowsKey&#8217; which is so common on most PC keyboards.</p>
<p>WindowsKey + #Number<br />
This seems quite good for power users which have to manage huge number of applications simultaneously. What this feature does is it&#8217;ll select the #N&#8217;th application which is on your taskbar. If the application is already selected, it&#8217;ll minimise. If its minimised, it&#8217;ll restore it. And if its not selected, it&#8217;ll select it and bring it to focus. Nifty =)</p>
<p>So if say, you have Firefox, Chrome and IE on your taskbar (in that order) WKey+1 will open Firefox. WKey+2, and you&#8217;ll pull up Chrome. WKey+2 with Chrome selected will minimise it.</p>
<p>How does it manage grouped items I hear you ask&#8230;<br />
Pressing WKey+#Number will cycle through the items. Thus, this means the minimise feature doesn&#8217;t work for grouped items but such a minor setback (WKey+DownArrow will minimise a selected window)</p>
<p>So go ahead and play with them, it&#8217;s a shame such features aren&#8217;t really advertised cos I think this is a good feature.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=133&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2011/07/17/windows-7-hotkeys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
		<item>
		<title>GAE + GWT 006 – Channels pt. II</title>
		<link>http://psycokenisis.wordpress.com/2011/06/13/gae-gwt-006-%e2%80%93-channels-pt-ii/</link>
		<comments>http://psycokenisis.wordpress.com/2011/06/13/gae-gwt-006-%e2%80%93-channels-pt-ii/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 14:29:43 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=143</guid>
		<description><![CDATA[So after some minor tweaks using channels, my Collaba-Doodle is now much more responsive and works in a manner which seems more real-time than the previously trialled polling approach. Yay for channels. However, my efforts were not completely faultless&#8230; Because of the way I structured things (all my demo modules on a single page) and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=143&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So after some minor tweaks using channels, my Collaba-Doodle is now much more responsive and works in a manner which seems more real-time than the previously trialled polling approach. Yay for channels.</p>
<p>However, my efforts were not completely faultless&#8230; Because of the way I structured things (all my demo modules on a single page) and the way channels work (only one channel per page), I clearly needed to either</p>
<ol>
<li>Put the demos on separate pages; or,</li>
<li>Have the channel at the top &#8216;live demo&#8217; page and filter to the relevant module.</li>
</ol>
<p>I didn&#8217;t quite want to have each demo on a separate page, so I opted for option 2. Thus, my Shoutbox and Collaba-Doodle share the same channel token. However, the message which is sent is encoded and interpreted differently based on the &#8216;msgType&#8217; of the message.</p>
<p>I also set up a basic ChannelListener which can register listeners based on the msgType and then act upon that data. A simple solution which works for now but there&#8217;s definately a trade off with this approach</p>
<ol>
<li>We either have to parse the message multiple times in each module and accept or ignore the message; or,</li>
<li>Out top level &#8216;live demo&#8217; page knows exactly about each of its children and what msgType message they expect.</li>
</ol>
<p>Given my LiveDemo is still quite small, opting for the first option seemed again, the easiest option and required the least amount of work in order to test the power of channels.</p>
<p>Finally I&#8217;ve been wondering how to close connections to remove the clientID from our table and it seems <em>windowCloseEvent()</em> solved my problems &#8211; called when the user navigates away from the page or the window is closed, we thus send a last message to the server telling it to close the socket and remove the clientID.</p>
<p>And thus the circle is complete &#8211; create a socket &gt; send message &gt; recieve updates &gt; close socket. Cool. What next??</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=143&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2011/06/13/gae-gwt-006-%e2%80%93-channels-pt-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
		<item>
		<title>GAE + GWT 005 &#8211; Channels</title>
		<link>http://psycokenisis.wordpress.com/2011/06/12/gae-gwt-004-channels/</link>
		<comments>http://psycokenisis.wordpress.com/2011/06/12/gae-gwt-004-channels/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 02:06:36 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=140</guid>
		<description><![CDATA[I stumbled across the Channels service provided by the AppEngine and thought to myself, this is exactly what I need and should have been using for my collaba-doodle! Basically a Channel lets you have a direct socket connection between server and client where the server can immediately &#8216;push&#8217; messages down the socket and to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=140&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I stumbled across the <a title="GAE Channel Service" href="http://code.google.com/appengine/docs/java/channel/overview.html" target="_blank"><em>Channels service</em></a> provided by the AppEngine and thought to myself, this is exactly what I need and should have been using for my collaba-doodle! Basically a Channel lets you have a direct socket connection between server and client where the server can immediately &#8216;push&#8217; messages down the socket and to the client. Since the socket connection remains connected (for a maximum of 2 hours, or until closed by the client) it makes it much more convenient to synchronise data amongst collaborators rather than polling the server each time with a RPC.</p>
<p>So I decided to give it a try, but in order to not break my existing collaba-doodle, I made a shoutbox. If anyone has noticed, I&#8217;ve always had the shoutbox on my showcase but it was only a place to vent your spleen into the void of nothing-ness. So to make it useful, I added the channel service to create a real shoutbox which broadcasts to other users.</p>
<p>When the module loads up, I give the user a random ID (it&#8217;s not perfectly unique as I&#8217;m only using a simple number generator and not checking for collisions) &#8211; as we&#8217;re only testing proof of concepts with this showcase, not devloping perfect applications. So with that ID, we send it to the server to generate a &#8216;token&#8217; for the user which acts as the unique socket connection that will be used by the server to communicate with the client. The server logs the ID so it knows to send future messages to them.</p>
<p>I set up the channel on the client side using the <a title="GWT-GAE-Channel" href="http://code.google.com/p/gwt-gae-channel/" target="_blank">gwt-gae-channel library</a> as it makes life much easier than having to fiddle with javascript. Once the connection has been established, the user is free to send messages. When a message is sent, an RPC is invoked to the server with the sender&#8217;s ID and the message. The server then looks at its table of established connections and passes the message onto all connected clients. Done. A simple shoutbox (or chatroom, which ever you want to call it).</p>
<p>Now that is done, there&#8217;s definately things which can be added like &#8216;rooms&#8217; as chatting with +100 people would be chaotic [albeit fun]. But after this simple experiment with channels, I can try to incorporate the ideas to my Collaba-Doodle =)</p>
<p>It&#8217;s on the showcase now to play around with: <em>ajt HYPHEN showcase DOT appspot DOT com</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=140&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2011/06/12/gae-gwt-004-channels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
		<item>
		<title>GAE + GWT 004 &#8211; Composite Sharding</title>
		<link>http://psycokenisis.wordpress.com/2011/06/07/gae-gwt-004-composite-sharding/</link>
		<comments>http://psycokenisis.wordpress.com/2011/06/07/gae-gwt-004-composite-sharding/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 14:57:28 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=135</guid>
		<description><![CDATA[So a &#8216;sharded counter&#8217; is technique used where fast writes are required to a single entity. Google provides a thorough explaination as to why to use this technique so do check it out. When playing with my Collaba-Doodle, I&#8217;m realising I need something similar for the doodle canvas which can possibly be update by lots [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=135&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So a &#8216;sharded counter&#8217; is technique used where fast writes are required to a single entity. Google provides a thorough <a title="Sharding Counters" href="http://code.google.com/appengine/articles/sharding_counters.html" target="_blank">explaination</a> as to why to use this technique so do check it out.</p>
<p>When playing with my Collaba-Doodle, I&#8217;m realising I need something similar for the doodle canvas which can possibly be update by lots of collaborators simultaneously and thus the need for a &#8216;sharded doodle canvas&#8217; becomes more and more apparent.</p>
<p>I was already using the sharding approach to track how many visitors my showcase was retrieving, so adapting it for a doodle canvas wouldn&#8217;t be too difficult. The main problem was that if I wanted to shard even more objects, I&#8217;d have go through the process of creating lots of sharded&#8217;elements&#8217; copying and pasting lots of code which more or less does the same thing bar a few changes. So I decided to try a more generic approach to sharding &#8211; &#8216;Composite Sharding&#8217;  for reasons which will become apparent shortly. (I&#8217;m also 90% sure this is not a novel approach but I couldn&#8217;t find anything useful on the topic from some searches, so I&#8217;m putting it out here)</p>
<p>Many developers are familiar with the composite design pattern, where a parent and its children share the same interface, allowing both objects (from the user&#8217;s perspective) to be treated as a single object but behind the scenes, the object handles the delegation to children (if any). I tried to do something similar with my parent shard (ShardedElement) and the children shards (Shard).</p>
<p>So, my ShardedDoodle and DoodleShard would implement some Doodle Interface (IDoodle &#8211; not related to &#8216;the fruit&#8217; products) and have:</p>
<ul>
<li><em>addChanges</em>(ChangesFromUser)</li>
<li><em>getChanges</em>(startTimeOfChanges)</li>
</ul>
<p>We can see, that this composite sharding approach will work as adding changes can occur to a single Doodle shard independantly. When retrieving the changes, we traverse all doodle shards and get the changes from each shard to give us all the relevant changes.</p>
<p>To make my life easier, I templated and abstracted out all the base code for sharding into the three main components:</p>
<ul>
<li>ShardedElement&lt;T extends Shard&gt;: abstract class, handles storing and retriving of shards. Subclasses should extend and implement an ElementInterface.</li>
<li>ShardCounter: class which handles book-keeping of shards matching the ShardElement name. This object is internal to a shardedElement and is never exposed.</li>
<li>Shard: abstract class which handles storing and retriving of data from the datastore. Subclasses should extend and implement an ElementInterface.</li>
</ul>
<p>In my Doodle Canvas example above:</p>
<ul>
<li>DoodleShard extends Shard implements IDoodle</li>
<li>ShardedDoodle extends ShardedElement&lt;DoodleShard&gt; implements IDoodle</li>
</ul>
<p>And that&#8217;s really all there is to it. Because most of the grunt work is handled by the ShardedElement we can simple get a random shard via <em>getShard()</em> and do PUT operations on it or we can get all the shards <em>getShards()</em> and do GET operations on them.</p>
<p>I&#8217;m looking forward to seeing how well this works in other scenarios besides counting and my doodle canvas&#8230; maybe I&#8217;ll try the guestbook =P</p>
<p>I&#8217;ll put the code up for this at one point in time&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=135&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2011/06/07/gae-gwt-004-composite-sharding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
		<item>
		<title>GAE + GWT 003 &#8211; Collaba-Doodle</title>
		<link>http://psycokenisis.wordpress.com/2011/06/01/gae-gwt-003/</link>
		<comments>http://psycokenisis.wordpress.com/2011/06/01/gae-gwt-003/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 15:15:29 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=131</guid>
		<description><![CDATA[So I&#8217;ve been tinkering around with the idea of collaborative works and social web pages. Such popular success stories can be seen by Google Documents and other &#8216;cloud&#8217; solutions out there. Ok so maybe people have notices how &#8216;pro-Google&#8217; these blog posts may be but, as of this post, I am in no way affiliated [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=131&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been tinkering around with the idea of collaborative works and social web pages. Such popular success stories can be seen by Google Documents and other &#8216;cloud&#8217; solutions out there. Ok so maybe people have notices how &#8216;pro-Google&#8217; these blog posts may be but, as of this post, I am in no way affiliated with them except for a solemn end-users which enjoys the things they put out. </p>
<p>Anyway digressing from the main point, I remember playing around with a flash-based web application a few years ago which acted like a fridge magnet board &#8211; it had numerous objects &#8216;stuck&#8217; to it and could be manipulated by anyone who joined. It was really fun (despite the some what unusually high volume of people trying to write &#8216;male genitalia&#8217; on it &#8211; you get the picture). </p>
<p>So I thought to myself, how about I try to push it one step further and have a collaborative white board where all the user has are the white board markers. Essentially, giving them an empty canvas to doodle random things on. And thus spawned &#8216;Collaba-doodle&#8217; a (HTML5) canvas where anyone with access to the board can write something on it. </p>
<p>The currently prototyped version is on my showcase for all to play around with. However, it has the following features (for now):</p>
<li>Colours are always random because we like interesting things</li>
<li>Updates occur each time only when the user stops drawing</li>
<li>The server only keeps a cache of the 200 most recent &#8216;pixels&#8217; when sending information around to other collaborators</li>
<li>You can get an image of the canvas by clicking the link</li>
<li>Clearing the canvas only affects you and does not push any changes to the server</li>
<p>Anyway, you get the picture.. there&#8217;s limitations with it now as its a simple proof of concept. And, despite being limited in functionality it is actually quite fun to play around with. I wonder what interesting images will come out of it &#8211; perhaps I should also add a gallery for this?&#8230;</p>
<p>As mentioned very briefly, I&#8217;m trying this new HTML5 canvas and luckily, GWT provides us with a canvas component to use =) This makes life much MUCH easier &#8211; Construct the canvas object, test to see if it exists (if it doesn&#8217;t, the browser doesn&#8217;t support HTML5 canvas yet). Then, we need to get a Context2D object (akin to the Java Graphics2D object). It is thought this Context2D object that we perform all out &#8216;fillRect&#8217;, &#8216;fillArc&#8217; etc&#8230; methods to actually draw stuff on the canvas &#8211; all fairly trivial.</p>
<p>Behind the scenes we simply keep a log of the user&#8217;s current &#8216;pen stroke&#8217; (what they are drawing with a single click). These get sent to the server and added to the main canvas object (preference given to the later strokes &#8211; obviously). Periodically, the server returns a list of strokes which have been written to the main canvas object since the last update and applies the changes to the user&#8217;s canvas. Simple enough? A crude and naive solution but one which tests proof of concept &#8211; Collaba-Doodle =)</p>
<p>Now&#8230; not sure what to tinker around with next or whether I should try to further optimise the Collaba-Doodle&#8230; Whatever it is, there are plenty of things to try and it is clear that GAE+GWT is a solution ftw.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=131&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2011/06/01/gae-gwt-003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
		<item>
		<title>GAE + GWT 002 &#8211; XMPP</title>
		<link>http://psycokenisis.wordpress.com/2011/05/19/gae-gwt-002/</link>
		<comments>http://psycokenisis.wordpress.com/2011/05/19/gae-gwt-002/#comments</comments>
		<pubDate>Thu, 19 May 2011 13:52:30 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=125</guid>
		<description><![CDATA[Continuing on with my on-off trials of GAE and GWT I ended up playing around with the XMPP protocol and created a very simple chat bot. And by very simple I mean one which simply echoes the message back to the user. It does however have some interesting booking skills such as tracking the number [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=125&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Continuing on with my on-off trials of GAE and GWT I ended up playing around with the XMPP protocol and created a very simple chat bot. And by very simple I mean one which simply echoes the message back to the user. It does however have some interesting booking skills such as tracking the number of users subscribed to it as well as which of those are currently online/offline. These numbers are displayed as the bot&#8217;s status [# online / # subscribed]</p>
<p>Add [uname]-test AT 3 DOT latest DOT [uname]-test DOT appspot DOT com to any XMPP complient client (such as gtalk) to see the baby in action =)</p>
<p>My eventual long term life goal is to have a chatbot capable of conversing appropriately with humans. Note: I am NOT trying to make a chatbot which is as intelligent as a human (nor attempt to pass the turing test/Loebner prize), just one which can converse purely for entertainment/killing time. Similar to the &#8216;<a href="http://cleverbot.com/" title="cleverbot" target="_blank">cleverbot</a>&#8216; which rides on the net &#8211; do check it out though its quite fun to play around with XD</p>
<p>Another thing I&#8217;ve been playing around with is the Google Maps and Spreadsheet API. If anything the Spreadsheet API seems quite powerful and can be a lightweight (in terms of infrastructure cost) alternative to an actual database storage solution. I&#8217;ve managed to play around with some of the map and spreadsheet examples and developed my first javascript &#8216;web application&#8217; which loads a bunch of locations from a spreadsheet and place them on a map. Nothing overly exciting or ground-breaking and it was meerly the result of piecing together the various pieces floating around. ajt-showcase DOT appspot DOT com is where the example resides. </p>
<p>On that note, time to do a plug for that spot =P That my friends is where I shall be showcasing various ideas and projects &#8211; a type of portfolio page. I figured it would be good to finally show off some of the things I&#8217;ve done. The page is by no means complete and things will be slowly added to it over time =)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=125&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2011/05/19/gae-gwt-002/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
		<item>
		<title>GAE + GWT 001</title>
		<link>http://psycokenisis.wordpress.com/2011/05/03/gae_gwt_001/</link>
		<comments>http://psycokenisis.wordpress.com/2011/05/03/gae_gwt_001/#comments</comments>
		<pubDate>Tue, 03 May 2011 02:30:57 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=117</guid>
		<description><![CDATA[Not a very useful heading but concisely states what this post is about &#8211; Google&#8217;s App-Engine and Web Toolkit. With the recent influx of free time, I figured it would be best to learn and hone some new skills and dive into the world of app/web development. Obviously I&#8217;m using the term &#8216;app&#8217; slightly differently [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=117&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Not a very useful heading but concisely states what this post is about &#8211; Google&#8217;s App-Engine and Web Toolkit.</p>
<p>With the recent influx of free time, I figured it would be best to learn and hone some new skills and dive into the world of app/web development. Obviously I&#8217;m using the term &#8216;app&#8217; slightly differently to the round white fruit&#8217;s naming of an application on their magical phones or slate. Anyway, GAE I&#8217;ve found makes it very easy to create and deploy apps using their infrastructure and GWT helps build those apps using various widgets like buttons and input fields to create a desktop-like browser application.</p>
<p>Not sure what all that is about? Well, its not hard to notice that in the last few years, the web has transitioned very quickly into what is known as Web 2.0 with the introduction of <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" title="Ajax" target="_blank">AJAX </a>. Go to almost any website and you&#8217;ll see that any action you perform now occurs immediately and doesn&#8217;t require the entire web page to refresh (as it once did traditionally). Even this blog I&#8217;m writing on allows me to move various windows about all seamlessly &#8211; it really is quite amazing.</p>
<p>Ok, enough ranting. The main reason for wanting to explore these solutions by Google is that I&#8217;ve been fortunate enough to play around with a lesser known tool known as <a href="http://en.wikipedia.org/wiki/Morfik" title="Morfik" target="_blank">Morfik</a>. Possibly a pre-cursor to the Web2.0 model, Morfik was simple enough to use and developing web applications was almost akin to developing traditional desktop solutions. It was quite amazing what these guys have pulled off. Seemingly a few years later, GWT was announced but the push for it has not been as strong (possibly due to patent issues?).</p>
<p>Anyway, after installing the AppEngine and GWT SDK plug-ins for Eclipse, I moved onto playing around with the sample applications given. Click the magical run (or debug) button, and it&#8217;ll create a local instance of your app which you can point your browser to to see how your app will look and execute when it is actually deployed. This is very useful given the deployment times can range depending on the size of your application.</p>
<p>Moving on, I wanted to learn a bit more than just running the sample application. I stumbled across these tutorials, albeit slightly dated the main concepts were still relevant and split up into a nice <a href="http://www.ibm.com/developerworks/java/library/j-gaej1/" title="GAE tutorial" target="_blank">3 part tutorial</a> for people with attention spans of a goldfish. Google&#8217;s StockWatcher tutorial is also a good place to start =)</p>
<p>Once I was happy testing my applications locally, obviously the next step was to deploy the application and show it off to my friends (who wouldn&#8217;t want to?). Using the Eclipse plugin certainly makes things easy: A simple click of a button and entering of user settings (such as application name and location) and the app begins to travel across the wire. Once complete, the app is available instantly to you for you to interact with and pass around to everyone &#8211; very cool indeed =)</p>
<p>One things I like about the deployment is that you can deploy different versions of your application and decide which one you want to be executing as the default. Useful for wanting to try out new versions without affecting the stable. Alternatively, I&#8217;ve decided to have a test location and deploy different apps as &#8216;different versions&#8217; so I can essentially have multiple applications running under the same domain, though a prefix identifier is necessary to navigate to the specific one, for testing I don&#8217;t really care.</p>
<p>Currently I&#8217;m play around with the various services available such as messaging (email and chat) as well as standard web app serving. Most of these can be found at &#8216;<em>[uname]-test ^ appspot * com</em>&#8216; where uname is the same as this blog&#8217;s. The content serving from there is obviously volatile and will change at any time and simply serves as a place for me to test random things.</p>
<p>For now I&#8217;ll leave it there cos the blog post is getting to long which means less people will be bothered to read it. More progress updates to ensue! In the future I&#8217;ll try keep the word count to less than 500 (excluding notes)</p>
<p>*Yes, I know its bad to reference wikipedia but seriously, its a good source of information and the vast majority of people will trust it over a random page I&#8217;ve found.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=117&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2011/05/03/gae_gwt_001/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
		<item>
		<title>Evolution TD now live</title>
		<link>http://psycokenisis.wordpress.com/2010/03/28/evolution-td-now-live/</link>
		<comments>http://psycokenisis.wordpress.com/2010/03/28/evolution-td-now-live/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 00:37:56 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=109</guid>
		<description><![CDATA[Just noting down a small part of history for myself =P As the title suggests, EvolutionTD, my first tower defence game for the popular Warcraft III game has now gone live (albeit an initial alpha release). Get it here from EpicWar http://www.epicwar.com/maps/129210/ &#8216;Why is it not version 1.0 or 0.1, or some smarter starting number?&#8217; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=109&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just noting down a small part of history for myself =P<br />
As the title suggests, <a href="http://psycokenisis.wordpress.com/2010/02/08/happy-belated-new-year/">EvolutionTD</a>, my first tower defence game for the popular Warcraft III game has now gone live (albeit an initial alpha release).</p>
<p>Get it here from EpicWar<br />
<a href="http://www.epicwar.com/maps/129210/">http://www.epicwar.com/maps/129210/</a></p>
<p>&#8216;Why is it not version 1.0 or 0.1, or some smarter starting number?&#8217; you may ask yourself. The reason is that internally I&#8217;m keeping tabs on version numbers and that just happened to be the version number I was currently up to which seemed relatively playable and able to be distributed.</p>
<p>The release is more of a stress test for any potential player scaling problems, cos I&#8217;ve never actually had the chance to test is with the full 8 players =P</p>
<p>Anyway, go grab it and any suggestions, ideas or general feedback is hugely appreciated ^^ Hopefully I&#8217;ll be able to keep maintaining it (I&#8217;d actually like to clean up some of the trigger logics and clean up potential memory leaks at some stage)</p>
<p>[Edit: As of 27-04-10 we've hit 1762 downloads ^^ I think that's alright for a first map wouldn't you say? I've added a slightly boring minimap preview image]</p>
<p>[Edit: Looking back a year, as of today (03-05-11) we have 2723 downloads - cool! I'm thinking I should move it into StarCraft II though]</p>
<div id="attachment_113" class="wp-caption alignnone" style="width: 266px"><a href="http://psycokenisis.files.wordpress.com/2010/03/evolutiontd_image.jpg"><img src="http://psycokenisis.files.wordpress.com/2010/03/evolutiontd_image.jpg?w=256&#038;h=256" alt="Evolution TD Map Image" title="EvolutionTD_image" width="256" height="256" class="size-full wp-image-113" /></a><p class="wp-caption-text">Minimap preview</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=109&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2010/03/28/evolution-td-now-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>

		<media:content url="http://psycokenisis.files.wordpress.com/2010/03/evolutiontd_image.jpg" medium="image">
			<media:title type="html">EvolutionTD_image</media:title>
		</media:content>
	</item>
		<item>
		<title>Pygame + Camera = Virtual Pong</title>
		<link>http://psycokenisis.wordpress.com/2010/02/21/pygame-camera-virtual-pong/</link>
		<comments>http://psycokenisis.wordpress.com/2010/02/21/pygame-camera-virtual-pong/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 11:31:27 +0000</pubDate>
		<dc:creator>psycokenisis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://psycokenisis.wordpress.com/?p=105</guid>
		<description><![CDATA[Since I have my N95 connected to my comp via &#8216;smartcam&#8217; so i can now use it as a webcam, I can now finally start playing around with some computer vision applications =) The first project was a version of pong where the paddles could be controlled by the user via some coloured objects. This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=105&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since I have my N95 connected to my comp via &#8216;smartcam&#8217; so i can now use it as a webcam, I can now finally start playing around with some computer vision applications =)</p>
<p>The first project was a version of pong where the paddles could be controlled by the user via some coloured objects. This turned out fairly well after a few hours of tinkering and getting a feel for pygame&#8217;s camera and mask modules.</p>
<p>Just a quick run through of how it all works is probably appropriate here:</p>
<p>1. Get the colours of the two objects which will be used to control the paddles &#8211; On screen, are two boxes which show where the paddles will start. The user places their COLOURED object of choice in each box. Once satisfied, the user registers these colours and proceeds to playing the game. Registration occurs by taking the average colour of the pixels within the paddle. This roughly corresponds to the colour of our object</p>
<p>2. Moving the coloured object up and down (close to where the corresponding paddle is) affects the paddle.We detect this object through colour blobing &#8211; finding pixels of similar (to some threshold) colour and then connecting them (pygame has a mask module for this which makes it slightly easier).</p>
<p>Some minor tweaks were used to make the paddles move as smooth as possible:</p>
<ul>
<li>When searching for the colour, we pick the blob which is closest to the previous location of the paddle, as this prevents the paddle from jumping up and down from background noise. Also, more often than not, the user is moving the paddle gradually anyway.</li>
<li>We only search the left and right quarters of the screen for our colour to eliminate junk in the middle. The player should be moving their object as close to their paddles as possible</li>
<li>A minimum blob size is required and thus, the user either needs a big object or has to play fairly close to the camera. Noise elimination was the reasoning for this choice.</li>
</ul>
<p>And for those interested in playing around with it, I&#8217;ll upload the source a bit later in the week =)</p>
<p>Edit: <a href="http://www.cse.unsw.edu.au/~ajt/pong.py.txt">Source code and game</a> (Note: Requires at least python 2.5 and pygame 1.9)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psycokenisis.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psycokenisis.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/psycokenisis.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/psycokenisis.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/psycokenisis.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/psycokenisis.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/psycokenisis.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/psycokenisis.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/psycokenisis.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/psycokenisis.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/psycokenisis.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/psycokenisis.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/psycokenisis.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/psycokenisis.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psycokenisis.wordpress.com&amp;blog=8746057&amp;post=105&amp;subd=psycokenisis&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psycokenisis.wordpress.com/2010/02/21/pygame-camera-virtual-pong/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6ed9721a1b0a5d2823e429e9ff277c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psycokenisis</media:title>
		</media:content>
	</item>
	</channel>
</rss>
