Escape Theory Gaming For Life… views are mine, and not affiliated with The White Agency or Nomad


Goodbye Coinland

We are saying ‘farewell’ to my proudest video game project. After four years, Coinland has closed.

Most Australians at my age would have fond memories of Commonwealth Bank initiatives that were offered to them in primary school (elementary school) such as a free ‘Dollarmites’ savings account that encouraged making small, weekly deposits during class. For four years Coinland has taken this to the next level, teaching children the importance of saving (virtual) money, earning interest, finding jobs, using ATM cards and even donating money for a selfless cause - all through a browser based video game.

For over 160,000 Aussie children, Coinland was almost certainly their first MMORPG experience, and our support team receives streams of fan-mail from parents praising Coinland, and from children who are having a ball.

When Coinland was announced to close, we received offers from parents who believed that their children have learnt so much from Coinland, that they were willing to pay a fee to keep the free game running. A child sent us an email saying how upset they were about Coinland’s closure, and how it was cruelly coinciding with their sister’s Coinland-themed birthday party.

Coinland was a winner of several Australian industry awards at launch, and just before the decision to axe Coinland, a port of the game for iOS and Android was ready for submission, which I’m certain would have been a hugely successful evolution of the game.

I’m proud to have been part of Coinland, and I wish that you could have experienced it too.

See Coinland being played by an expert here!



Moving from ActionScript to Lua

So I've finally started to build my next game with Corona SDK. I don't develop on Mac very often, but since I positively need the next game to play on iOS, there's little choice!

First impressions of Lua are kinda meh - I think AS3's strict typing has turned me into an ECMA Script Nazi. In the first few tutorials, I keep finding myself trying to typeset my variables.

Listeners are taking a little effort to get used to, and no semi-colons after each line? This will take a little time!

I blame most of my problems on the lacklustre features of TextMate + Lua bundle, compared with FlashBuilder. There's just no replacement for drop-menu code hints. Huh... that's right, maybe I should download Eclipse and find a Lua plugin instead.

Will post more about my new quest!

UPDATE: got Eclipse running with LUA plugin, but no Corona specific hinting...



Zombie Ninjas available for Android

The beta of Zombie Ninjas has finally been published on Android Market!

The development cycle from Flash to Android is now complete :)

Still to come:

- Sounds

- Music

- Leaderboards

- Sharing on Facebook

I will make another post when the game is complete with music, sound and a working leaderboard!


Flexperiment 1: Physics of a Bouncing, throwable ball.

Here is a simple bit of code that demonstrates simulated physics of a ball being thrown (written with my colleague Anthony

The keystone of this experiment is the ENTER FRAME event function that tracks the motion of the ball, applying horizontal 'drag' and vertical 'gravity' as well as spelling out the boundaries of the ball's movement area. A simple hack forces the ball to stop in its tracks when it is at a certain speed and distance from the 'ground' or bottom of the screen. Understanding the physics of something like a bouncing ball helps me build on top of it with more features (such as a true collision detection system, or adding wind).

package {

 import flash.display.Graphics;
 import flash.display.Sprite;

 [ SWF( frameRate="60", width="420", height="420", backgroundColor="0x000000" ) ]
 public class BouncingBall extends Sprite {

 private var maxSpeed:Number = 100;
 private var radius:Number = 25;
 private var vx:Number;
 private var vy:Number;
 private var ball:Sprite;
 private var previousMouseX:Number=0;
 private var previousMouseY:Number=0;
 private var currentMouseX:Number;
 private var currentMouseY:Number;
 private var throwX:Number;
 private var throwY:Number;

 public function BouncingBall() {
 ball = new Sprite();
 ball.addEventListener(MouseEvent.MOUSE_DOWN, ballDownHandler);
 ball.addEventListener(MouseEvent.MOUSE_UP, ballUpHandler);
 addChild( ball );
 ball.x = Math.random() * ( stage.stageWidth - radius );
 ball.y = Math.random() * ( stage.stageHeight - radius );
 vx = Math.random() * maxSpeed + 0.5;
 vy = Math.random() * maxSpeed + 0.5;

 var g:Graphics =;
 g.beginFill( 0xFF0000 );
 g.drawCircle( 0, 0, radius );

 addEventListener( Event.ENTER_FRAME, onClipEnterFrame, false, 0, true );

 private function onClipEnterFrame( p_event:Event ):void {

 currentMouseX = this.mouseX;
 currentMouseY = this.mouseY;

 ball.x += vx;
 ball.y += vy;
 if ( vy != 0 ) vy += 0.5;
 if ( vx != 0 ) vx += (0-vx)*0.015;

 if ( ( ball.x <= radius && vx < 0 ) || ( ball.x >= stage.stageWidth - radius && vx > 0 ) ) {
 vx = -vx * 0.6;
 if ( ( ball.y <= radius && vy < 0 ) || ( ball.y >= stage.stageHeight - radius && vy > 0 ) ) {
 vy = -vy * 0.6;    

 if ( Math.abs( vx ) < 0.01 ) vx = 0;
 if ( Math.abs( vy ) < 0.1 && ball.y>=stage.stageHeight-radius-2){
 vy = 0;

 throwX = currentMouseX - previousMouseX;
 throwY = currentMouseY - previousMouseY;

 previousMouseX = currentMouseX;
 previousMouseY = currentMouseY;


 public function ballDownHandler(e:MouseEvent):void{
 vy = vx = 0;

 public function ballUpHandler(e:MouseEvent):void{
 vx = throwX;
 vy = throwY - 0.6;

Tween Class Tweens Freezing Halfway Through Animation

When creating multiple Tween instances using the Flash Tween classes, animations randomly freeze.

Error type: Bug

Error class: -

How to Induce error:

Using the built-in Flash Tween classes, create multiple tweens on one or more objects.

When these tweens are all firing , Flash randomly 'cleans up' the tween instance while it is still animating. In effect, the animation appears to freeze.

Further tween instances can unfreeze the animation, but clearly this is too annoying to ignore!


We can store the tween instance in an Array, and clear the instance when the tween is no longer required. This forces the Flash garbage collector to stop destroying your tween instance:

var tweensArray:Array = []; var tween_count:Number = 0; function tweenFunc():void{ tweensArray[tween_count] = new Tween(myObj, "alpha", Strong.easeOut, myObj.alpha, 1, 0.5, true); tween_count++; }
function fadeContent(showWhichNumber):void{

//tween class has FREEZING bug, it removes tweens before they complete when many tweens occur - this is RANDOM.
//in order to stop the removal, we store the tweens in an array, and wipe them out on each changeContent call.
//remove this fix at your own risk!

if(currentContentNumber == showWhichNumber){
tweensArray[tween_count] = new Tween(this['content'+ (showWhichNumber).toString()], "alpha", Strong.easeOut, this['content'+ (showWhichNumber).toString()].alpha, 1, 0.5, true);
tweensArray[tween_count] = new Tween(this['content'+ (showWhichNumber).toString()], "alpha", Strong.easeOut, this['content'+ showWhichNumber].alpha, 0, 0.5, true);