<?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>FxAIR.org</title>
	<atom:link href="http://www.fxair.org/home/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fxair.org/home</link>
	<description>Hong Kong Adobe Flex and AIR User Group</description>
	<lastBuildDate>Sat, 18 May 2013 07:04:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>haxe.unit, the unit testing package bundled in Haxe std library</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/ki4T1zJYGDY/</link>
		<comments>http://feedproxy.google.com/~r/AndyLi/~3/ki4T1zJYGDY/#comments</comments>
		<pubDate>Sat, 18 May 2013 07:04:18 +0000</pubDate>
		<dc:creator>Andy Li</dc:creator>
				<category><![CDATA[HK Developers Feed]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=1436</guid>
		<description><![CDATA[Not sure if you know, there has been a minimal basic unit testing package, haxe.unit, bundled in the Haxe std library, since Haxe 1.02! Although its functionality is minimal, but it is enough for most of the projects and being very target independent. I would&#160;definitely&#160;recommend it to any beginner of writing unit test. The haxe.unit ...]]></description>
				<content:encoded><![CDATA[<p>Not sure if you know, there has been a minimal basic unit testing package, <a href="http://haxe.org/doc/cross/unit">haxe.unit</a>, bundled in the Haxe std library, since <a href="https://code.google.com/p/haxe/source/browse/trunk/doc/CHANGES.txt#1045">Haxe 1.02</a>! Although its functionality is minimal, but it is enough for most of the projects and being very target independent. I would definitely recommend it to any beginner of writing unit test.</p>
<p>The haxe.unit package consists of only 4 classes:</p>
<ul>
<li><span style="font-family: 'courier new', courier;">TestCase</span></li>
<li><span style="font-family: 'courier new', courier;">TestResult</span></li>
<li><span style="font-family: 'courier new', courier;">TestRunner</span></li>
<li><span style="font-family: 'courier new', courier;">TestStatus</span></li>
</ul>
<p>Most of the time we need to use only 2 of them: <span style="font-family: 'courier new', courier;"><strong>TestCase</strong></span> and <span style="font-family: 'courier new', courier;"><strong>TestRunner</strong></span>. We subclass <span style="font-family: 'courier new', courier;">TestCase</span> and put the test functions as class methods, and then create a <span style="font-family: 'courier new', courier;">TestRunner</span> object to run one or multiple <span style="font-family: 'courier new', courier;">TestCase</span> instances. I usually create one class for each class I want to test and create one test method for each of the methods.</p>
<p>For example we want to test the <span style="font-family: 'courier new', courier;"><a href="http://haxe.org/api/StringTools">StringTools</a></span> class in the top-level package of the Haxe std library. Here we wrote the test function for 2 methods, <span style="font-family: 'courier new', courier;">endsWith</span> and <span style="font-family: 'courier new', courier;">hex</span>:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="haxe" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">class</span> TestStringTools <span style="color: #6699cc; font-weight: bold;">extends</span> haxe.<span style="color: #006633;">unit</span>.<span style="color: #006633;">TestCase</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">function</span> testEndsWith<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000033; font-weight: bold;">Void</span> <span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">this</span>.<span style="color: #006633;">assertTrue</span><span style="color: #000000;">&#40;</span><span style="color: #03F; ">StringTools</span>.<span style="color: #006633;">endsWith</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">&quot;abcd&quot;</span>, <span style="color: #FF0000;">&quot;cd&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #6699cc; font-weight: bold;">this</span>.<span style="color: #006633;">assertFalse</span><span style="color: #000000;">&#40;</span><span style="color: #03F; ">StringTools</span>.<span style="color: #006633;">endsWith</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">&quot;abcde&quot;</span>, <span style="color: #FF0000;">&quot;cd&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">function</span> testHex<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000033; font-weight: bold;">Void</span> <span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">this</span>.<span style="color: #006633;">assertEquals</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">&quot;FFFFFF&quot;</span>, <span style="color: #03F; ">StringTools</span>.<span style="color: #006633;">hex</span><span style="color: #000000;">&#40;</span>0xFFFFFF, <span style="color: #cc66cc;">6</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #6699cc; font-weight: bold;">this</span>.<span style="color: #006633;">assertEquals</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">&quot;000000&quot;</span>, <span style="color: #03F; ">StringTools</span>.<span style="color: #006633;">hex</span><span style="color: #000000;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">6</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">static</span> <span style="color: #6699cc; font-weight: bold;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000033; font-weight: bold;">Void</span> <span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> runner <span style="color: #339933;">=</span> <span style="color: #6699cc; font-weight: bold;">new</span> haxe.<span style="color: #006633;">unit</span>.<span style="color: #006633;">TestRunner</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
		runner.<span style="color: #006633;">add</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">new</span> TestStringTools<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> success <span style="color: #339933;">=</span> runner.<span style="color: #006633;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #330000; font-weight: bold;">#if</span> sys
		<span style="color: #03F; ">Sys</span>.<span style="color: #006633;">exit</span><span style="color: #000000;">&#40;</span>success <span style="color: #339933;">?</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #330000; font-weight: bold;">#end</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>As illustrated above, to check the return values of the function calls, there are 3 methods come from the <span style="font-family: 'courier new', courier;">TestCase</span> class we can make use of:</p>
<ul>
<li><span style="font-family: 'courier new', courier;">function assertTrue( b : Bool, ?c : PosInfos ) : Void;</span></li>
<li><span style="font-family: 'courier new', courier;">function assertFalse( b : Bool, ?c : PosInfos ) : Void;</span></li>
<li><span style="font-family: 'courier new', courier;">function assertEquals( expected : T, actual : T, ?c : PosInfos ) : Void;</span></li>
</ul>
<p>They are self-explanatory. You may have noticed, they all accept an extra optional argument of type <span style="font-family: 'courier new', courier;">PosInfos</span>, which is actually used for getting the method name, line number etc for printing the test result. We should simply ignore it and the compiler will automatically fill in the value.</p>
<p>Notice that the test methods <strong>have to be named with prefix &#8220;test&#8221;</strong>. We can create utility functions, without the &#8220;test&#8221; prefix, and they will be ignored by <span style="font-family: 'courier new', courier;">TestRunner</span>.</p>
<p>To run the tests, we created a <span style="font-family: 'courier new', courier;">TestRunner</span> in the <span style="font-family: 'courier new', courier;">main</span> entry function. The <span style="font-family: 'courier new', courier;">main</span> function can of course be put into another class, but since we&#8217;ve only one <span style="font-family: 'courier new', courier;">TestCase</span> in this example, let&#8217;s just put it into our <span style="font-family: 'courier new', courier;">TestCase</span>. When we call <span style="font-family: 'courier new', courier;">runner.run()</span>, it will test all the <span style="font-family: 'courier new', courier;">TestCase</span> objects that are added to the <span style="font-family: 'courier new', courier;">TestRunner</span>, and immediately print the test result, which for our example, it would be:</p>
<pre>Class: TestStringTools ..
OK 2 tests, 0 failed, 2 success</pre>
<p>Lastly, based on the return value of <span style="font-family: 'courier new', courier;">runner.run()</span>, which is &#8220;all tests success or not&#8221;, we exit the program properly as a best practice. It is used by many <a href="http://en.wikipedia.org/wiki/Continuous_integration">CI</a> softwares, for example <a href="http://blog.onthewings.net/2013/03/19/automated-unit-testing-for-haxe-project-using-travis-ci/">TravisCI</a>, in order to get back the test result.</p>
<p>There exist more advanced unit testing frameworks, like <a href="https://github.com/massiveinteractive/MassiveUnit">munit</a> and <a href="https://github.com/fponticelli/utest">utest</a>, but the structure and concept is somewhat similar. Anyway, writing unit test is easy and the benefit is huge: It will enables us to discover <a href="http://en.wikipedia.org/wiki/Software_regression">regression</a> that may caused by <a href="https://en.wikipedia.org/wiki/Code_refactoring">refactoring</a>, adding new features, changes in 3rd party library (or Haxe itself) as soon as possible. Let&#8217;s start doing it today if you haven&#8217;t!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=ki4T1zJYGDY:O6iIiVLMfyU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=ki4T1zJYGDY:O6iIiVLMfyU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=ki4T1zJYGDY:O6iIiVLMfyU:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/ki4T1zJYGDY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2013/05/18/haxe-unit-the-unit-testing-package-bundled-in-haxe-std-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>jQueryExtern 2.0.0-alpha.1</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/6oFsJkfZtfU/</link>
		<comments>http://feedproxy.google.com/~r/AndyLi/~3/6oFsJkfZtfU/#comments</comments>
		<pubDate>Tue, 14 May 2013 03:54:55 +0000</pubDate>
		<dc:creator>Andy Li</dc:creator>
				<category><![CDATA[HK Developers Feed]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=1433</guid>
		<description><![CDATA[It took longer than expected, but jQueryExtern for Haxe 2.0.0-alpha.1 was released to haxelib! The cool parts: Supports&#160;jQuery version 1.9.1/2.0.0! Note that 2.0.0 has the same API of 1.9.1, but removed support of IE 6,7,8. jQueryExtern is now generated from&#160;the official jQuery documentation in xml format. It means it will be updated faster, more accurate ...]]></description>
				<content:encoded><![CDATA[<p>It took longer than expected, but <a href="https://github.com/andyli/jQueryExternForHaxe">jQueryExtern for Haxe</a> 2.0.0-alpha.1 was released to haxelib!</p>
<p>The cool parts:</p>
<ul>
<li>Supports jQuery version 1.9.1/2.0.0! Note that 2.0.0 has the same API of 1.9.1, but removed support of IE 6,7,8.</li>
<li><span style="line-height: 13px;">jQueryExtern is now generated from the official jQuery documentation in xml format. It means it will be updated faster, more accurate in the future!</span></li>
<li>Fine grained configuration of the extern via&#8230; macros! e.g. Select specific jQuery support version, switching between the use of &#8220;$&#8221; or &#8220;jQuery&#8221; in generated code etc.</li>
<li>Macro based Plugin extern system! Writing jQuery plugin extern is much easier.</li>
</ul>
<p>You can find out the details at the <a href="https://github.com/andyli/jQueryExternForHaxe/wiki/Haxe-3">github wiki page</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=6oFsJkfZtfU:J8aIVcEI8Xc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=6oFsJkfZtfU:J8aIVcEI8Xc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=6oFsJkfZtfU:J8aIVcEI8Xc:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/6oFsJkfZtfU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2013/05/14/jqueryextern-2-0-0-alpha-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Setting up a Processing Android project in Eclipse</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/BZ8FfaPneTc/</link>
		<comments>http://feedproxy.google.com/~r/AndyLi/~3/BZ8FfaPneTc/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 20:32:17 +0000</pubDate>
		<dc:creator>Andy Li</dc:creator>
				<category><![CDATA[HK Developers Feed]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=1424</guid>
		<description><![CDATA[Processing is written in Java, and it plays very well with the Android platform. Every serious programmer knows that the Processing IDE is far from being a proper IDE, and the official Android IDE is&#160;Eclipse, so we better stick to Eclipse. To setup a&#160;Processing Android project in Eclipse, follow these steps: Setup a normal Eclipse ...]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-1427" alt="Processing, Android, Eclipse" src="http://blog.onthewings.net/wp-content/uploads/2013/04/android_processing_eclipse.png" width="250" height="250" /></p>
<p><a href="http://processing.org/">Processing</a> is written in Java, and it plays very well with the Android platform. Every serious programmer knows that the Processing IDE is far from being a proper IDE, and the official Android IDE is <a href="http://www.eclipse.org/">Eclipse</a>, so we better stick to Eclipse.</p>
<p>To setup a Processing Android project in Eclipse, follow these steps:</p>
<ol>
<li><span style="line-height: 13px;">Setup a normal Eclipse Android project, such that we can run a simple hello world with a <strong>blank activity</strong>, targeting Android <strong>API 10+</strong>.</span></li>
<li>Download Processing <strong>2.0+</strong>.</li>
<li>Copy <strong>android-core.zip</strong> to the <strong>libs</strong> folder as <strong>android-core.jar</strong> inside our Eclipse Android project.<br />
The location of android-core.zip is inside the Processing folder, <strong>modes/android/android-core.zip</strong>. For Mac, the Processing folder can be found by right-clicking Processing.app, show package contents, /Contents/Resources/Java.</li>
<li>Right-click the Eclipse Android project, <strong>properties</strong>. Choose <strong>Java Build Path</strong>, under the <strong>Libraries</strong> tab, click <strong>Add JARs&#8230;</strong> button. Choose the <strong>android-core.jar</strong> we&#8217;ve copied in previous step.</li>
<li>Modify the <strong>MainActivity</strong> class such that it extends <strong>processing.core.PApplet</strong> instead of android.app.Activity:

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">net.onthewings.android</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//the package of MainActivity</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">processing.core.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MainActivity <span style="color: #000000; font-weight: bold;">extends</span> PApplet <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">//PApplet in fact extends android.app.Activity</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	<span style="color: #666666; font-style: italic;">/*...*/</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	<span style="color: #666666; font-style: italic;">/*...*/</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

</li>
<li>Run the project and you should see a blank full screen app <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>Notice that it is not even necessary to use additional Eclipse plug-in like <a href="https://code.google.com/p/proclipsing/">proclipsing</a>. By coding in plain Java, we can mix the Processing drawing API with the Android API easily. Additional Processing Android details can be found at <a href="http://wiki.processing.org/w/Android">http://wiki.processing.org/w/Android</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=BZ8FfaPneTc:H9iLyCOODSE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=BZ8FfaPneTc:H9iLyCOODSE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=BZ8FfaPneTc:H9iLyCOODSE:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/BZ8FfaPneTc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2013/04/25/setting-up-a-processing-android-project-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>FxAIR.org Tech Gathering #14 Summary</title>
		<link>http://www.fxair.org/home/2013/04/fxair-org-tech-gathering-14-summary/</link>
		<comments>http://www.fxair.org/home/2013/04/fxair-org-tech-gathering-14-summary/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 11:26:52 +0000</pubDate>
		<dc:creator>fxair</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://www.fxair.org/home/?p=5144</guid>
		<description><![CDATA[以下為是次聚會既總結供大家參考 ** 請留意下一次聚會為 2013 年 5 月 25 日 ** Vicker Leung 簡介幾個近期的新 products - Apache Flex 4.9.1 (http://flex.apache.org) - Adobe AIR SDK 3.6 (http://www.adobe.com/devnet/air/air-sdk-download.html) &#160; 另外分享左 FXG o係 Adobe Flex mobile app 開發的經驗 - Presentation Slide (http://www.slideshare.net/vickerleung/fxg-and-flex-mobile-development)]]></description>
				<content:encoded><![CDATA[<p>以下為是次聚會既總結供大家參考 ** 請留意下一次聚會為 2013 年 5 月 25 日 **</p>
<p><a href="http://www.flickr.com/photos/vicker/8618405013"><img src="http://farm9.staticflickr.com/8381/8618405013_a4ba5bf6a1_n.jpg" alt="DSC_3603" width="320" height="214" /></a></p>
<h3>Vicker Leung</h3>
<p>簡介幾個近期的新 products</p>
<p>- Apache Flex 4.9.1 (<a title="http://flex.apache.org" href="http://flex.apache.org" target="_blank">http://flex.apache.org</a>)</p>
<p>- Adobe AIR SDK 3.6 (<a title="http://www.adobe.com/devnet/air/air-sdk-download.html" href="http://www.adobe.com/devnet/air/air-sdk-download.html" target="_blank">http://www.adobe.com/devnet/air/air-sdk-download.html</a>)</p>
<p>&nbsp;</p>
<p>另外分享左 FXG o係 Adobe Flex mobile app 開發的經驗</p>
<p>- Presentation Slide (<a title="http://www.slideshare.net/vickerleung/fxg-and-flex-mobile-development" href="http://www.slideshare.net/vickerleung/fxg-and-flex-mobile-development" target="_blank">http://www.slideshare.net/vickerleung/fxg-and-flex-mobile-development</a>)</p>
<p><a href="http://www.flickr.com/photos/vicker/8619512228"><img src="http://farm9.staticflickr.com/8253/8619512228_ee5fcf2f04_n.jpg" alt="DSC_3605" width="320" height="214" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fxair.org/home/2013/04/fxair-org-tech-gathering-14-summary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automated unit-testing for Haxe project using Travis-CI</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/g-PfyF-Fv-Y/</link>
		<comments>http://feedproxy.google.com/~r/AndyLi/~3/g-PfyF-Fv-Y/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 21:08:07 +0000</pubDate>
		<dc:creator>Andy Li</dc:creator>
				<category><![CDATA[HK Developers Feed]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=1406</guid>
		<description><![CDATA[What is Travis-CI? Travis-CI is &#8220;a&#160;hosted continuous integration service for the open source community&#8221;. It is tightly integrated with github, once we enabled its commit hook, whenever there is a new commit, or a pull request, on any branch, it will automatically build and run the unit test and notify us any problem respecting to ...]]></description>
				<content:encoded><![CDATA[<h3>What is Travis-CI?</h3>
<p><a href="http://about.travis-ci.org/docs/">Travis-CI</a> is &#8220;a hosted continuous integration service for the open source community&#8221;. It is tightly integrated with <a href="https://github.com/">github</a>, once we enabled its commit hook, whenever there is a new commit, or a pull request, on any branch, it will automatically build and run the unit test and notify us any problem respecting to certain commits.</p>
<h3>Why use it?</h3>
<p>It gives us an extra level of safety, which safety is what we Haxe users love, after all that&#8217;s one of the reasons to use a strictly typed language over a dynamic one. Travis-CI&#8217;s unit test on pull request is particularly useful, which we can instantly identify on the github pull request page any incoming changes that breaks our specification.</p>
<p>And did I mention this great hosted service is in fact free for open source projects?</p>
<h3>How to use it?</h3>
<p>All we have to do is to toggle the repo on in the Travis-CI accounts control panel, and then commit a <strong>.travis.yml</strong> in the root directory.</p>
<p>Here is an example <strong>.travis.yml </strong>that test C++, Neko and PHP targets:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="yaml" style="font-family:monospace;"><span style="color: blue;"># The first thing is to tell which VM environment we want the test to be run on.</span>
<span style="color: blue;"># It dosen't quite matter for Haxe, just choose one of the targets our project support (e.g. PHP),</span>
<span style="color: blue;"># and than apt-get install the others (e.g. Neko, C++).</span>
<span style="color: blue;"># For more info, see http://about.travis-ci.org/docs/user/ci-environment/</span><span style="color: green;">
language</span><span style="font-weight: bold; color: brown;">: </span>php
&nbsp;
<span style="color: blue;"># Install Haxe before running the test.</span><span style="color: #007F45;">
before_script</span><span style="font-weight: bold; color: brown;">:
</span>  - sudo apt-get install python-software-properties -y <span style="color: blue;"># for the next command</span>
  - sudo add-apt-repository ppa:eyecreate/haxe -y      <span style="color: blue;"># add the ubuntu ppa that contains haxe</span>
  - sudo apt-get update                                <span style="color: blue;"># pull info from ppa</span>
  - sudo apt-get install haxe -y                       <span style="color: blue;"># install haxe (and neko)</span>
  - sudo apt-get install gcc-multilib g++-multilib -y  <span style="color: blue;"># VM is 64bit but hxcpp builds 32bit</span>
  - mkdir ~/haxelib                                    <span style="color: blue;"># create a folder for installing haxelib</span>
  - haxelib setup ~/haxelib
  - haxelib install hxcpp                              <span style="color: blue;"># install hxcpp to test C++ target</span>
  - mkdir bin                                          <span style="color: blue;"># create an output folder if needed</span>
&nbsp;
<span style="color: blue;"># Run the test!</span><span style="color: #007F45;">
script</span><span style="font-weight: bold; color: brown;">:
</span>  - haxe travis.hxml</pre></td></tr></table></div>

<p>Note that at the time of writing, Travis-CI is running 64bit Ubuntu 12.4 VMs, and the ppa we used above will install Haxe 3.0RC and Neko 2.0.</p>
<p>Every command specified in the &#8220;script&#8221; section is actual test and <strong>should exit with code 0 if it pass or non-0 if fail</strong>. The above example simply try to compile the project. We can specify subsequent command to run a Haxe written test case, which we can use <span style="font-family: 'courier new', courier;">Sys.exit(allPass ? 0 : 1)</span> to properly inform the test result.</p>
<p>Finally, we can check the repo page on Travis-CI for the test result. By default, if the test failed, <a href="http://about.travis-ci.org/docs/user/notifications/">an email will be sent</a> to the commit author and the committer.</p>
<h3>Existing Haxe project using Travis-CI</h3>
<p>Some Haxe projects have been using the Travis-CI service for some time, for example <a href="https://github.com/aduros/flambe">flambe</a>, <a href="https://github.com/MattTuttle/HaxePunk">HaxePunk</a> and <a href="https://github.com/nadako/Ash-HaXe">Ash-HaXe</a>. We will soon re-enabled the TravisCI test of <a href="https://github.com/haxenme/NME">NME</a> too! Hope it will help Haxe to become more solid every day, every commit <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=g-PfyF-Fv-Y:W4aORs770Tw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=g-PfyF-Fv-Y:W4aORs770Tw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=g-PfyF-Fv-Y:W4aORs770Tw:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/g-PfyF-Fv-Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2013/03/19/automated-unit-testing-for-haxe-project-using-travis-ci/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>hxml tricks every haxe user should know</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/ED2QTXtjQaI/</link>
		<comments>http://feedproxy.google.com/~r/AndyLi/~3/ED2QTXtjQaI/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 09:00:11 +0000</pubDate>
		<dc:creator>Andy Li</dc:creator>
				<category><![CDATA[HK Developers Feed]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=1382</guid>
		<description><![CDATA[Haxe projects usually are compiled with a&#160;hxml file, which basically contains compiler arguments. So most of the tricks I am going to show is actually compiler arguments tricks, which may also applicable to nmml file or IDE that does not use hxml (though they should). 1. Run project right after compilation Being able to do ...]]></description>
				<content:encoded><![CDATA[<p>Haxe projects usually are compiled with a <a href="http://haxe.org/doc/compiler">hxml file</a>, which basically contains compiler arguments. So most of the tricks I am going to show is actually compiler arguments tricks, which may also applicable to <a href="https://gist.github.com/jgranick/1763850">nmml file</a> or IDE that does not use hxml (though they should).</p>
<h3>1. Run project right after compilation</h3>
<p>Being able to do so is critical to rapid development. The simple trick to use <span style="font-family: 'courier new', courier;">-cmd</span>, which run the a command after successful compilation. For different target, you have to use different command:</p>
<ul>
<li>
<h4>Neko</h4>
<p><span style="font-family: 'courier new', courier;">-neko Test.n<br />
-main Test<br />
-cmd neko Test.n</span><br />
Or there is actually a shortcut that performs exactly the same as above:<br />
<span style="font-family: 'courier new', courier;">-x Test</span></li>
<li>
<h4>C++</h4>
<p><span style="font-family: 'courier new', courier;">-cpp bin<br />
-main Test<br />
-cmd ./bin/Test</span><br />
Notice the resulting file will be Test-debug if you compile with -debug.</li>
<li>
<h4>JavaScript</h4>
<p><span style="font-family: 'courier new', courier;">-js Test.js<br />
-main Test<br />
-cmd phantomjs Test.js</span><br />
Here we use <a href="http://phantomjs.org/">phantomjs</a> to run the JS file, the trace will output to the terminal. In case it is something graphical, you have to launch a browser with a HTML file that loads the script.</li>
<li>
<h4>PHP</h4>
<p><span style="font-family: 'courier new', courier;">-php bin<br />
-main Test<br />
-cmd php bin/index.php</span><br />
I guess you have already know you can execute a php script this way?</li>
<li>
<h4>Flash</h4>
<p><span style="font-family: 'courier new', courier;">-swf Test.swf<br />
-main Test<br />
-cmd path/to/FlashDebugger Test.swf</span><br />
Or if you're on Mac, you can actually use <span style="font-family: 'courier new', courier;">-cmd open Test.swf</span>, it will do the same as you double clicked on a swf file (or any other file!).</li>
<li>
<h4>Java</h4>
<p><span style="font-family: 'courier new', courier;">-java bin<br />
-main Test<br />
-cmd java -jar bin/bin.jar</span></li>
<li>
<h4>C#</h4>
<p><span style="font-family: 'courier new', courier;">-cs bin<br />
-main Test<br />
-cmd mono bin/bin/bin.exe</span><br />
Mac/Linux has to use <a href="http://www.mono-project.com/">Mono</a> to execute it. Windows should able to run it with <span style="font-family: 'courier new', courier;">-cmd bin/bin/bin.exe</span> (not tested though).</li>
</ul>
<h3>2. Commenting a hxml file</h3>
<p>Use a hash (i.e. <span style="font-family: 'courier new', courier;">#</span>) to comment out the rest of the line. Despite of being useful to put documentation, it can let us switch between different compilation configurations:</p>
<p><span style="font-family: 'courier new', courier;">-js Main.js<br />
-main Main<br />
### comment out one of the following logging levels<br />
#-D my-log-error<br />
#-D my-log-warning<br />
-D my-log-info</span></p>
<p>And in the source file:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="haxe" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">function</span> attack<span style="color: #000000;">&#40;</span>target<span style="color: #339933;">:</span>Monster, power<span style="color: #339933;">:</span><span style="color: #000033; font-weight: bold;">Int</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000033; font-weight: bold;">Void</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #6699cc; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>target <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #330000; font-weight: bold;">#if</span> <span style="color: #000000;">&#40;</span>my_log_error <span style="color: #339933;">||</span> my_log_warning <span style="color: #339933;">||</span> my_log_info<span style="color: #000000;">&#41;</span>
        <span style="color: #6699cc; font-weight: bold;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">&quot;target is null&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #330000; font-weight: bold;">#end</span>
        <span style="color: #6699cc; font-weight: bold;">return</span><span style="color: #339933;">;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #6699cc; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>power <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #330000; font-weight: bold;">#if</span> <span style="color: #000000;">&#40;</span>my_log_warning <span style="color: #339933;">||</span> my_log_info<span style="color: #000000;">&#41;</span>
        <span style="color: #6699cc; font-weight: bold;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">&quot;attack power should be positive&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #330000; font-weight: bold;">#end</span>
        <span style="color: #6699cc; font-weight: bold;">return</span><span style="color: #339933;">;</span>
    <span style="color: #000000;">&#125;</span>
    mp <span style="color: #339933;">-=</span> power<span style="color: #339933;">;</span>
    target.<span style="color: #006633;">hp</span> <span style="color: #339933;">-=</span> power<span style="color: #339933;">;</span>
    <span style="color: #330000; font-weight: bold;">#if</span> my_log_info
    <span style="color: #6699cc; font-weight: bold;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">&quot;attacked &quot;</span> <span style="color: #339933;">+</span> target <span style="color: #339933;">+</span> <span style="color: #FF0000;">&quot; by &quot;</span> <span style="color: #339933;">+</span> power<span style="color: #000000;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #330000; font-weight: bold;">#end</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<h3>3. Append extra compiler argument when using the command line</h3>
<p>Another useful trick to switch between compilation configurations, is to simple supply more arguments after the hxml file. For example temporarily switch to debug mode:</p>
<p><span style="font-family: 'courier new', courier;">haxe project.hxml -debug</span></p>
<h3>4. Multiple compilations at once</h3>
<p>The majority knows the existence of  <span style="font-family: 'courier new', courier;">--next</span>, used for separating different builds:</p>
<p>all.hxml<span style="font-family: 'courier new', courier;"><br />
-js script/MainPage.js<br />
-main MainPage<br />
-lib jQueryExtern<br />
--next<br />
-js script/ContactPage.js<br />
-main ContactPage<br />
-lib jQueryExtern<br />
--next<br />
-js script/AlbumPage.js<br />
-main AlbumPage<br />
-lib jQueryExtern</span></p>
<p>There is an <a href="https://code.google.com/p/haxe/issues/detail?id=1080#c8"><span style="font-family: 'courier new', courier;">--each</span></a> option, which reduce the repeating params. It is used in <a href="https://code.google.com/p/haxe/source/browse/trunk/tests/unit/compile.hxml">the haxe compiler unit test hxml</a>. Rewriting the above, we will get:</p>
<p>all.hxml<br />
<span style="font-family: 'courier new', courier;"> -lib jQueryExtern<br />
--each<br />
-js script/MainPage.js<br />
-main MainPage<br />
--next<br />
-js script/ContactPage.js<br />
-main ContactPage<br />
--next<br />
-js script/AlbumPage.js<br />
-main AlbumPage</span></p>
<p>But really, separating each of them in different hxml is easier to maintain and has better compatibility with code completion (because many editors don't read hxml with <span style="font-family: 'courier new', courier;">--next</span> very well). So we may use the following instead:</p>
<p>MainPage.hxml<br />
<span style="font-family: 'courier new', courier;">-js script/MainPage.js<br />
-main MainPage<br />
-lib jQueryExtern</span></p>
<p>ContactPage.hxml<br />
<span style="font-family: 'courier new', courier;">-js script/ContactPage.js<br />
-main ContactPage<br />
-lib jQueryExtern</span></p>
<p>AlbumPage.hxml<br />
<span style="font-family: 'courier new', courier;">-js script/AlbumPage.js<br />
-main AlbumPage<br />
-lib jQueryExtern</span></p>
<p>all.hxml<br />
<span style="font-family: 'courier new', courier;">MainPage.hxml<br />
--next<br />
ContactPage.hxml<br />
--next<br />
AlbumPage.hxml</span></p>
<p>Switch the hxml for code completion when working in different pages, and use the "all.hxml" to compile at once.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=ED2QTXtjQaI:pjuRHJ51uN4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=ED2QTXtjQaI:pjuRHJ51uN4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=ED2QTXtjQaI:pjuRHJ51uN4:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/ED2QTXtjQaI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2013/03/04/hxml-tricks-every-haxe-user-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Improving Haxe Syntax Highlighting Support of Pygments</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/983BEEYOrjE/</link>
		<comments>http://feedproxy.google.com/~r/AndyLi/~3/983BEEYOrjE/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 18:00:14 +0000</pubDate>
		<dc:creator>Andy Li</dc:creator>
				<category><![CDATA[HK Developers Feed]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=1373</guid>
		<description><![CDATA[3 months ago I have started to rewrite the Haxe laxer in Pygments, which is a syntax highlighter written in Python, used in both Github and Bitbucket. Pygments included initial Haxe support back in 2010, but sadly is not complete. Haxers should have seen some broken highlighting like the following: Surely it is less than ...]]></description>
				<content:encoded><![CDATA[<p>3 months ago I have started to rewrite the Haxe laxer in <a href="http://pygments.org/">Pygments</a>, which is a syntax highlighter written in Python, used in both <a href="https://github.com/">Github</a> and <a href="https://bitbucket.org/">Bitbucket</a>. Pygments included initial Haxe support back in 2010, but sadly is not complete. Haxers should have seen some broken highlighting like the following:</p>
<p><img class="size-large wp-image-1374 alignnone" alt="Poor old haxe syntax highlight in Github" src="http://blog.onthewings.net/wp-content/uploads/2013/02/512b98bb9d29c91162000063-1024x756.jpeg" width="100%" /></p>
<p>Surely it is less than optimal, so I fixed it as the following:</p>
<p><img class="size-large wp-image-1375 alignnone" alt="Great new improved Haxe syntax highlighting" src="http://blog.onthewings.net/wp-content/uploads/2013/02/512b99d39d29c97d6f00007c-1024x756.jpeg" width="100%" /></p>
<p>Looks nice? I also took the chance to include 100% <a href="http://haxe.org/manual/haxe3">Haxe 3</a> support (and still backward compatible for highlighting Haxe2 code), which includes <a href="http://haxe.org/manual/comprehension">Array/Map comprehension</a>, <a href="http://haxe.org/manual/modules#import">import wildcard</a>, <a href="http://haxe.org/manual/macros#macro-reification">macro-reification</a> and even <a href="http://haxe.org/manual/string_interpolation">string interpolation</a>! In fact I&#8217;ve tested ALL 1589 Haxe source files appeared in the source of Haxe, including the core std library of Haxe and its unit test files. So it is guaranteed to be as complete as possible, supporting all tiny Haxe features you may have never noticed (and I myself indeed learned a few tricks and even detected some typos in the Haxe std lib when running the test!).</p>
<p>I&#8217;ve made <a href="https://bitbucket.org/birkenfeld/pygments-main/pull-request/174/rewrote-the-haxe-lexer-and-haxe-30-support">a pull request to Pygments</a>, which hopefully they will merge it soon. But even when they&#8217;ve merged it, it will still take some time to let the Github guys updates their internal Pygments. But don&#8217;t be sad, the future is here: I created a Chrome extension, <a href="https://chrome.google.com/webstore/detail/pygmentx/ckkmmhhaihbeiemghplgkhkgdgdjnddl">Pygmentx</a>, that replace the Haxe codes on Github (and <a href="https://gist.github.com/">Gist</a>) with the improved one. It only supports the normal file view at the moment, not diff view nor the previews on Gist user page at the moment. Btw, thanks Tong (a.k.a disktree) again for his <a href="https://github.com/tong/chrome.extension">chrome.extension</a> Haxe externs <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=983BEEYOrjE:m5ydVLSaT08:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=983BEEYOrjE:m5ydVLSaT08:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=983BEEYOrjE:m5ydVLSaT08:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/983BEEYOrjE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2013/02/26/improving-haxe-syntax-highlighting-support-of-pygments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Katamari Damacy (塊魂) as an artwork</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/oR2IrG4eliE/</link>
		<comments>http://feedproxy.google.com/~r/AndyLi/~3/oR2IrG4eliE/#comments</comments>
		<pubDate>Tue, 11 Dec 2012 08:11:56 +0000</pubDate>
		<dc:creator>Andy Li</dc:creator>
				<category><![CDATA[HK Developers Feed]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=1358</guid>
		<description><![CDATA[&#8220;Katamari&#8221; means clump; &#8220;Damacy&#8221; means soul. It is a game of collecting objects, creating a large clump of things. Player acts as the Prince, son of the King of All Cosmos, rolls a katamari that can pick up anything smaller than its size, forming a large sticky sphere. As more things get stuck onto the ...]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.onthewings.net/wp-content/uploads/2012/12/CRI_255704.jpeg"><img class="aligncenter size-full wp-image-1362" title="Katamari Damacy gameplay screenshot" src="http://blog.onthewings.net/wp-content/uploads/2012/12/CRI_255704.jpeg" alt="" width="500" height="377" /></a></p>
<p>“Katamari” means clump; “Damacy” means soul. It is a game of collecting objects, creating a large clump of things. Player acts as the Prince, son of the King of All Cosmos, rolls a katamari that can pick up anything smaller than its size, forming a large sticky sphere. As more things get stuck onto the katamari, it grows larger and larger and eventually able to hold people, houses, islands or even planets.</p>
<p>The story in the Katamari Damacy game series is not an important part of it, but a “pretext for inspired weirdness” (<cite title="Colgan, Mike. Review - Me and My Katamari. 18 April 2006. 3 December 2012 &lt;http://www.gamechronicles.com/reviews/psp/meandmy/katamari.htm&gt;.">Colgan</cite>). Basically it was the King of All Cosmos done something accidentally that destroyed part of universe, and the Prince was sent to roll up large clumps of things, in order to for example rebuild the moon, or to fill up a black hole. However its focus on interaction, the underlying logic or algorithm, can be seen as the narrative part of the work (<cite title="Manovich, Lev. &quot;Database and Narrative.&quot; Manovich, Lev. The Language of New Media. Cambridge: The MIT Press, 2001. 199-201.">Manovich, Database and Narrative</cite>).</p>
<p>There is a wide range of objects exist in the game scene, be composed as a fresh, relaxed, joyful hyperreality. Despite of the destructive act of rolling katamari around, the atmosphere remains fun and cheerful. It is made possible by the careful selection of background music (mostly in Jazz style), cute sound effects and graphics. The game levels are nice montages of playfulness and positive child memory, for instance playground, candy shop, theme park, sunny country park with rainbow etc. The game scenes start cluttered with objects. They are clearly more packed than their real world counterparts. For example in a bedroom there are a lot of snakes, books, toys that makes the game world a celebration of wealth and materials.</p>
<p>Rolling katamari to collect different objects is yet another form of art, a process of creating the player’s own montage. At the time of destroying or cleaning up the world, player is creating a piece of work that can be a new planet in the game world. Its seemly contradictive destruction and creation is the same as the practice of pastiche and quotation, “to select elements and styles from the ‘database of culture’” and “to put them together into new objects” (<cite title="Manovich, Lev. &quot;The Logic of Selection.&quot; Manovich, Lev. The Language of New Media. Cambridge: The MIT Press, 2001. 120-124.">Manovich, The Logic of Selection</cite>).</p>
<p>Mentioned by its Japanese creator, Keita Takahashi, at Game Developers Conference, Katamari Damacy was a comment on consumerism (<cite title="Welsh, Oli. Katamari was comment on consumerism. 30 March 2009. 3 December 2012 &lt;http://www.eurogamer.net/articles/katamari-was-comment-on-consumerism&gt;.">Welsh</cite>). On one hand, the ultra packed scene suggested the ideals of capitalism. Cleaning the scene up by rolling the katamari over can be seen as an act of subvert to “the culture of consumption and even the value of other video games” (<cite title="Sino, Cando. Metaphor: Katamari Damacy and Capitalism and Overconsumption. 8 May 2009. 4 December 2012 &lt;http://lasttoblame.blogspot.hk/2009/05/metaphor-katamari-damacy-and-capitalism.html&gt;.">Sino</cite>). It is because most of the video games nowadays, as a culture interface, reflected the real world’s favor of capitalism and/or consumerism. Classical examples are SimCity, Age of Empires, and their inspired variants, where player starts with a small plain area, develops into a large place that contains a large amount of artifacts. The “more to less” direction of Katamari Damacy is the opposite of the mainstream “less to more” progress. On the other hand, picking up objects by the katamari is also a metaphor of consuming the materials around us. Although there is a target size as the goal of each stage, player is encouraged in the game to roll as much and as large as they can. It is very similar to the concept of consumerism, that people are encouraged to purchase goods or service in great amount, often in excess of their basic needs. Having the theme of consumerism in mind, the delightfulness made up by the media elements in game seems to be compensation to the emptiness feeling after mindless consumption. Even Keita Takahashi “felt empty when the objects were gone&#8221; (<cite title="Welsh, Oli. Katamari was comment on consumerism. 30 March 2009. 3 December 2012 &lt;http://www.eurogamer.net/articles/katamari-was-comment-on-consumerism&gt;.">Welsh</cite>).</p>
<p>Katamari Damacy is a good example of a video game being successful in the consumer market, also being an art piece that contains message and thoughts from the creator. It was recently acquired as one of the video games in the permanent design collection of The Museum of Modern Art (<cite title="Antonelli, Paola. Video Games: 14 in the Collection, for Starters. 29 Novermber 2012. 4 December 2012 &lt;http://www.moma.org/explore/inside_out/2012/11/29/video-games-14-in-the-collection-for-starters/&gt;.">Antonelli</cite>).</p>
<h3>Bibliography</h3>
<p>Antonelli, Paola. Video Games: 14 in the Collection, for Starters. 29 Novermber 2012. 4 December 2012 &lt;http://www.moma.org/explore/inside_out/2012/11/29/video-games-14-in-the-collection-for-starters/&gt;.</p>
<p>Colgan, Mike. Review &#8211; Me and My Katamari. 18 April 2006. 3 December 2012 &lt;http://www.gamechronicles.com/reviews/psp/meandmy/katamari.htm&gt;.</p>
<p>Manovich, Lev. &#8220;Database and Narrative.&#8221; Manovich, Lev. The Language of New Media. Cambridge: The MIT Press, 2001. 199-201.</p>
<p>Manovich, Lev. &#8220;The Logic of Selection.&#8221; Manovich, Lev. The Language of New Media. Cambridge: The MIT Press, 2001. 120-124.</p>
<p>Sino, Cando. Metaphor: Katamari Damacy and Capitalism and Overconsumption. 8 May 2009. 4 December 2012 &lt;http://lasttoblame.blogspot.hk/2009/05/metaphor-katamari-damacy-and-capitalism.html&gt;.</p>
<p>Welsh, Oli. Katamari was comment on consumerism. 30 March 2009. 3 December 2012 &lt;http://www.eurogamer.net/articles/katamari-was-comment-on-consumerism&gt;.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=oR2IrG4eliE:TgRvRza6pAc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=oR2IrG4eliE:TgRvRza6pAc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=oR2IrG4eliE:TgRvRza6pAc:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/oR2IrG4eliE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2012/12/11/katamari-damacy-%e5%a1%8a%e9%ad%82-as-an-artwork/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>FxAIR.org Tech Gathering #13 Summary</title>
		<link>http://www.fxair.org/home/2012/12/fxair-org-tech-gathering-13-summary/</link>
		<comments>http://www.fxair.org/home/2012/12/fxair-org-tech-gathering-13-summary/#comments</comments>
		<pubDate>Mon, 10 Dec 2012 16:34:13 +0000</pubDate>
		<dc:creator>fxair</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://www.fxair.org/home/?p=5055</guid>
		<description><![CDATA[以下為是次聚會既總結供大家參考 ** 請留意下一次聚會為 2013 年 2 月 23 日 ** &#160; &#160; Vicker Leung 簡介幾個近期的新 products - Adobe Flash Builder 4.7 (http://www.adobe.com/products/flash-builder.html) - Adobe AIR SDK 3.5 (http://www.adobe.com/devnet/air/air-sdk-download.html) - Apache Flex &#62; FalconJS (https://svn.apache.org/repos/asf/incubator/flex/falcon/trunk/compiler.js/) - Adobe Game Developer Tools (http://gaming.adobe.com/getstarted/) - Adobe Scout (http://gaming.adobe.com/technologies/scout/) &#160; 另外展示左幾隻 Flash Game - Adobe Flash C++ Compiler Epic Citadel ...]]></description>
				<content:encoded><![CDATA[<p>以下為是次聚會既總結供大家參考</p>
<p>** 請留意下一次聚會為 2013 年 2 月 23 日 **</p>
<p>&nbsp;</p>
<p><a href="http://www.flickr.com/photos/vicker/8270059608"><img src="http://farm9.staticflickr.com/8362/8270059608_8278b32127_n.jpg" alt="DSC_3093" width="320" height="214" /></a></p>
<p>&nbsp;</p>
<h3>Vicker Leung</h3>
<p>簡介幾個近期的新 products</p>
<p>- Adobe Flash Builder 4.7 (<a title="http://www.adobe.com/products/flash-builder.html" href="http://www.adobe.com/products/flash-builder.html" target="_blank">http://www.adobe.com/products/flash-builder.html</a>)</p>
<p>- Adobe AIR SDK 3.5 (<a title="http://www.adobe.com/devnet/air/air-sdk-download.html" href="http://www.adobe.com/devnet/air/air-sdk-download.html" target="_blank">http://www.adobe.com/devnet/air/air-sdk-download.html</a>)</p>
<p>- Apache Flex &gt; FalconJS (<a title="https://svn.apache.org/repos/asf/incubator/flex/falcon/trunk/compiler.js/" href="https://svn.apache.org/repos/asf/incubator/flex/falcon/trunk/compiler.js/" target="_blank">https://svn.apache.org/repos/asf/incubator/flex/falcon/trunk/compiler.js/</a>)</p>
<p>- Adobe Game Developer Tools (<a title="http://gaming.adobe.com/getstarted/" href="http://gaming.adobe.com/getstarted/" target="_blank">http://gaming.adobe.com/getstarted/</a>)</p>
<p>- Adobe Scout (<a title="http://gaming.adobe.com/technologies/scout/" href="http://gaming.adobe.com/technologies/scout/" target="_blank">http://gaming.adobe.com/technologies/scout/</a>)</p>
<p>&nbsp;</p>
<p>另外展示左幾隻 Flash Game</p>
<p>- Adobe Flash C++ Compiler Epic Citadel demo (<a title="http://www.unrealengine.com/flash/" href="http://www.unrealengine.com/flash/" target="_blank">http://www.unrealengine.com/flash/</a>)</p>
<p>- Zynga FarmVille 2 (<a title="https://apps.facebook.com/farmville-two/" href="https://apps.facebook.com/farmville-two/" target="_blank">https://apps.facebook.com/farmville-two/</a>)</p>
<p>- Zynga CityVille 2 (<a title="https://apps.facebook.com/cityville-two/" href="https://apps.facebook.com/cityville-two/" target="_blank">https://apps.facebook.com/cityville-two/</a>)</p>
<p>&nbsp;</p>
<p>之後簡介左 Blackberry 10 及幾個重要活動</p>
<p>- BlackBerry SDK for Adobe AIR (<a title="https://developer.blackberry.com/air/" href="https://developer.blackberry.com/air/" target="_blank">https://developer.blackberry.com/air/</a>)</p>
<p>- BlackBerry App World (<a title="http://appworld.blackberry.com/" href="http://appworld.blackberry.com/" target="_blank">http://appworld.blackberry.com/</a>)</p>
<p>- BlackBerry APAC Get Featured (BlackBerryAppWorldMarketingAPAC@rim.com)</p>
<p>- The 10k Developer Commitment (<a title="http://developer.blackberry.com/BuiltForBlackBerry" href="http://developer.blackberry.com/BuiltForBlackBerry" target="_blank">http://developer.blackberry.com/BuiltForBlackBerry</a>)</p>
<p>- BlackBerry 10 App Development Contest (<a title="http://www.hkaim.org/BlackBerry10/" href="http://www.hkaim.org/BlackBerry10/" target="_blank">http://www.hkaim.org/BlackBerry10/</a>)</p>
<p>- BlackBerry 10 GameJam (<a title="http://www.blackberryjamhack.com/gotgame/" href="http://www.blackberryjamhack.com/gotgame/" target="_blank">http://www.blackberryjamhack.com/gotgame/</a>)</p>
<p>- BlackBerry Developer Group Hong Kong (<a title="https://www.facebook.com/groups/bbdevhk/" href="https://www.facebook.com/groups/bbdevhk/" target="_blank">https://www.facebook.com/groups/bbdevhk/</a>)</p>
<p>&nbsp;</p>
<p><a href="http://www.flickr.com/photos/vicker/8270089000"><img src="http://farm9.staticflickr.com/8355/8270089000_2a4a0abb6c_n.jpg" alt="DSC_3079" width="320" height="214" /></a></p>
<p>&nbsp;</p>
<h3>Nelson Lee</h3>
<p>講解了如何使用 Adobe Flash CS5 作手機遊戲開發</p>
<p>&nbsp;</p>
<p><a href="http://www.flickr.com/photos/vicker/8270080750"><img src="http://farm9.staticflickr.com/8204/8270080750_cb53f3f8b0_n.jpg" alt="DSC_3082" width="320" height="214" /></a></p>
<p>&nbsp;</p>
<h3>Judy Wong</h3>
<p>Adobe Edge Tools and Services (<a title="http://html.adobe.com/edge/" href="http://html.adobe.com/edge/" target="_blank">http://html.adobe.com/edge/</a>)</p>
<p>Pixlr (<a title="http://pixlr.com/" href="http://pixlr.com/" target="_blank">http://pixlr.com/</a>)</p>
<p>&nbsp;</p>
<p><a href="http://www.flickr.com/photos/vicker/8270068780"><img src="http://farm9.staticflickr.com/8490/8270068780_f64069765c_n.jpg" alt="DSC_3087" width="320" height="214" /></a></p>
<p>&nbsp;</p>
<h3>Pierre</h3>
<p>HTML5 game engine &#8211; Construct 2 (<a title="http://www.scirra.com/construct2" href="http://www.scirra.com/construct2" target="_blank">http://www.scirra.com/construct2</a>)</p>
<p>&nbsp;</p>
<p><a href="http://www.flickr.com/photos/vicker/8270066544"><img src="http://farm9.staticflickr.com/8478/8270066544_b57fb887c3_n.jpg" alt="DSC_3089" width="320" height="214" /></a></p>
<p>&nbsp;</p>
<h3>Colin Leung</h3>
<p>Typescript (<a title="http://www.typescriptlang.org/" href="http://www.typescriptlang.org/" target="_blank">http://www.typescriptlang.org/</a>)</p>
<p>App Annie (<a title="http://www.appannie.com/" href="http://www.appannie.com/" target="_blank">http://www.appannie.com/</a>)</p>
<p>TypeScript Sublime2 package (<a id=".reactRoot[3].[1][2][1]{comment10151165539323479_10151166238113479}..[1]..[1]..[0].[0][2]..[7]" href="https://github.com/digi3colin/sublime-text-2-typescript" target="_blank" rel="nofollow">https://github.com/digi3colin/sublime-text-2-typescript</a>)</p>
<p>&nbsp;</p>
<p><a href="http://www.flickr.com/photos/vicker/8270064264"><img src="http://farm9.staticflickr.com/8350/8270064264_392b6d78bb_n.jpg" alt="DSC_3090" width="320" height="214" /></a></p>
<p>&nbsp;</p>
<p>其他活動相片<br />
<a title="http://www.flickr.com/photos/vicker/sets/72157632239565802/" href="http://www.flickr.com/photos/vicker/sets/72157632239565802/" target="_blank">http://www.flickr.com/photos/vicker/sets/72157632239565802/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fxair.org/home/2012/12/fxair-org-tech-gathering-13-summary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The “simulation” and “hyperreality” aspect of Epic Win</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/J7ngD5C8Z-w/</link>
		<comments>http://feedproxy.google.com/~r/AndyLi/~3/J7ngD5C8Z-w/#comments</comments>
		<pubDate>Wed, 07 Nov 2012 13:41:54 +0000</pubDate>
		<dc:creator>Andy Li</dc:creator>
				<category><![CDATA[HK Developers Feed]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=1341</guid>
		<description><![CDATA[Epic Win is a game that runs in the Apple iOS platform (iPhone/iPad). It is a fusion of role-playing game, referred as RPG, and To-Do list application. Players define and input their own personal objectives in real life as game objectives. Once players mark an objective as complete, they will be moved forward in a ...]]></description>
				<content:encoded><![CDATA[<div class="alignleft" style="margin-right: 1em;"><img class="size-full wp-image-1343" style="margin-bottom: 1em;" title="Epic Win quests screenshot" src="http://blog.onthewings.net/wp-content/uploads/2012/11/epicwin1.jpeg" alt="Epic Win quests screenshot" width="192" height="288" /><br />
<img class="size-full wp-image-1344" style="margin-bottom: 1em;" title="Epic Win profile screenshot" src="http://blog.onthewings.net/wp-content/uploads/2012/11/epicwin2.jpeg" alt="Epic Win profile screenshot" width="192" height="288" /><br />
<img class="size-full wp-image-1345" style="margin-bottom: 1em;" title="Epic Win progress screenshot" src="http://blog.onthewings.net/wp-content/uploads/2012/11/epicwin13.jpeg" alt="Epic Win progress screenshot" width="192" height="288" /><br />
<img class="size-full wp-image-1346" style="margin-bottom: 1em;" title="Epic Win progress screenshot 2" src="http://blog.onthewings.net/wp-content/uploads/2012/11/epicwin11.jpeg" alt="Epic Win progress screenshot 2" width="192" height="288" /></div>
<p><a href="http://www.rexbox.co.uk/epicwin/">Epic Win</a> is a game that runs in the Apple iOS platform (iPhone/iPad). It is a fusion of role-playing game, referred as RPG, and To-Do list application. Players define and input their own personal objectives in real life as game objectives. Once players mark an objective as complete, they will be moved forward in a quest map and may discover loot of game item. Experience points, referred as XP in the game, will also be given which will level up the player.</p>
<p>The game is set in a strongly naturalistic virtual world in an extreme case that, in fact, the virtual game world is built on top of the real world. The game objectives are objective in real life. To complete the objective, players have to perform real life action using their own physical body. However, the game world is not exactly the real world. Epic Win’s game world is virtual in the sense that there are virtual game elements like XP, treasure loots that do not exist in real world.</p>
<p>The simulation approach of Epic Win is different from typical simulation games like The Sims. Because the game world of Epic Win is built on top of the real world with added virtual elements, instead of started as a virtual world and added real world characteristic, the simulation direction is the opposite of typical simulation games. Epic Win uses the real world and simulates a typical RPG world; typical simulation games use a virtual world and simulate the real world. As Manovich suggested, “we do not necessarily have to think of immersion in the virtual and augmentation of the physical as opposites” (<cite title="Manovich, Lev. &quot;The poetics of augmented space.&quot; Visual Communication (2006): 219-240.">Manovich, The poetics of augmented space</cite>). Although the approaches are different to each other, both outcome of Epic Win and typical simulation games is a mixed reality.</p>
<p>Simulation requires modeling the logic or behavior of the simulation target (<cite title="Manovich, Lev. &quot;The Illusions.&quot; Manovich, Lev. The Language of New Media. Cambridge: The MIT Press, 2001. 162-167.">Manovich, The Illusions</cite>). Epic Win modeled a typical medieval themed RPG world in several ways. Firstly, it modeled the game logic, which is to complete missions (objectives) to gain points and collect game items in order to level up. In RPG, when the player level up, the ability of the player will be increased. Since a game cannot directly increase the player’s abilities in real life, Epic Win modeled this with virtual abilities of a RPG character, eg. “strength”, “intelligent” etc. Secondly, a typically RPG game has a story line. Epic Win simulated it by taking the seemly non-related real life objectives, map onto a logical narrative experience. Lastly, typical RPG uses a fantasy world. Epic Win simulated the fantasy world by extensive use of heavily stylized media, including wordings, graphics, and sounds, in medieval theme. The game items contained in the loots which players collect, are also typical object in a fantasy world.</p>
<p>Epic Win presents to players a hyperreality that solving real life problems will be rewarded with XP and treasures that can enhance the virtual character of the player. Since such world presented by Epic Win does not really exist, it matches the definition of hyperreality, &#8220;A real without origin or reality&#8221; (<cite title="Baudrillard, Jean. Simulacra and Simulation. Michigan: University of Michigan Press, 1995.">Baudrillard</cite>). This character development, i.e. level up, is one of the basic fulfillments of playing RPG. The progress of player is simulated as an exploration in a virtual world. It corresponds to the story-telling part of a RPG, which can also encourage player to move forward, in terms of completing tasks, and immerse into the virtual world, the enhanced real world.</p>
<p>The process of adding playful game elements in real life activity, which is increasing popular nowadays, is referred as gamification. It is “the application of digital game design techniques to non-game problems, such as business and social impact challenges” (<cite title="Werbach, Kevin. Gamification. 2012. 29 Oct 2012 &lt;https://www.coursera.org/course/gamification&gt;.">Werbach</cite>). I consider it as a form of mixed reality as well as a hyperreality. It is because its aim is clearly to trick users to enjoy non-game activity as they enjoy games, making the boundary of entertainment and work blurry. Al Gore summed up, &#8220;Games are the new normal.&#8221; (<cite title="Tsai, Charles. Al Gore: 'Games Are the New Normal'. 22 June 2011. 30 Oct 2012 &lt;http://www.huffingtonpost.com/charles-tsai/al-gore-games-social-good_b_881017.html&gt;.">Tsai</cite>). People will increasingly treat real life as game, and work as entertainment. Even the military is using the same technologies and employing the same visual forms (<cite title="Manovich, Lev. &quot;Kino-Eye and Simulators.&quot; Manovich, Lev. The Language of New Media. Cambridge: The MIT Press, 2001. 234-240.">Manovich, Kino-Eye and Simulators</cite>). Virtual awards, game media and game concepts are natural additions to daily life activity.</p>
<p>Gamification as demonstrated by Epic Win is an interesting example of “simulation” and “hyperreality”. There were players of Epic Win observed an uptick in their productivity (<cite title="Rattray, Tim. EpicWin Gives You Loot For Doing Your Chores. 18 Augest 2010. 30 Oct 2012 &lt;http://www.slidetoplay.com/story/epicwin-gives-you-loot-for-doing-your-chores&gt;.">Rattray</cite>). Further scientific measurement of the relation between productivity improvement and game immersiveness would be useful.</p>
<h3>Bibliography</h3>
<p>Baudrillard, Jean. Simulacra and Simulation. Michigan: University of Michigan Press, 1995.</p>
<p>Manovich, Lev. &#8220;Kino-Eye and Simulators.&#8221; Manovich, Lev. The Language of New Media. Cambridge: The MIT Press, 2001. 234-240.</p>
<p>Manovich, Lev. &#8220;The Illusions.&#8221; Manovich, Lev. The Language of New Media. Cambridge: The MIT Press, 2001. 162-167.</p>
<p>Manovich, Lev. &#8220;The poetics of augmented space.&#8221; Visual Communication (2006): 219-240.</p>
<p>Rattray, Tim. EpicWin Gives You Loot For Doing Your Chores. 18 Augest 2010. 30 Oct 2012 &lt;http://www.slidetoplay.com/story/epicwin-gives-you-loot-for-doing-your-chores&gt;.</p>
<p>Tsai, Charles. Al Gore: &#8216;Games Are the New Normal&#8217;. 22 June 2011. 30 Oct 2012 &lt;http://www.huffingtonpost.com/charles-tsai/al-gore-games-social-good_b_881017.html&gt;.</p>
<p>Werbach, Kevin. Gamification. 2012. 29 Oct 2012 &lt;https://www.coursera.org/course/gamification&gt;.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=J7ngD5C8Z-w:N34d6NBsRS8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=J7ngD5C8Z-w:N34d6NBsRS8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=J7ngD5C8Z-w:N34d6NBsRS8:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/J7ngD5C8Z-w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2012/11/07/the-simulation-and-hyperreality-aspect-of-epic-win/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
	</channel>
</rss>
