Starling engine benchmark on iPad

Having built several AIR projects on iPad, I was really disappointed over the performances delivered. I had to lower the app frame rate to a lame 12FPS in order to get acceptable interface reactivity and a minimum of GC lags. Conclusions were that, considering mobile development, the Flash engine  was out of race. I was strongly considering moving to X-Code (abandoning all hopes of ever developing something on Android), when I heard of the Starling 2D engine based on the Stage3D feature of the FP11.

So I quickly built up a simple application in order to compare conventional Flash performance to the Starling engine. The app is built using AIR 3.3 and Starling 1.2. I also used greensock’s TweenMax (could not live without it) for rotations.

The app only contains a simple button which, on each click, adds a sprite to the stage and makes it rotate:

The app, of course, also shows a FPS monitor (built in the Starling engine) in order to compare and see when performance loss are noticable.

The main MovieClip exploits the full Retina display resolution (1536×2048), just to see how it behaved and is initiated at 60FPS.

Here are the apps:

Running the apps (on an iPad 3) clearly reveals differences:

  • Standard Flash doesn’t even maintain the 60FPS with 2 sprites on stage.
  • While Starling keeps a constant FPS rate, Flash, especially with few sprites, fluctuates a lot (with 10 sprites, the delta is more than 7FPS). This behaviour tends to normalize with a greatere amount of attached sprites.
  • With a huge amount of sprites, both techniques tends to deliver the same -lame- performances.

Here is a graphical report of the tests (FPS / sprites) :


This is a Flash sampler app I’ve made this weekend in order to test touch capabilities of some hardware we’ve got at work. Wanted to see what ActionScript could do with sound processing as well. Found ans used a awesome sound processing package made by Antti Kupila.

The ActionStation main screenYou can test it on this live demo page.

MultiURLLoader – Bulkload files at once

Never had to load a series of config or xml files on your application startup ?

Instead of chaining loader initializer functions and Complete event handlers, use the MultiURLLoader class. This class will allow you to load, not only one file, but a list of files in one load operation.

The MultiURLLoader class just behaves like the URLLoader class. But, instead of providing one URL, you provide a list of URLs. Once all the files are loaded, an Event.COMPLETE will be triggered.

Labels – A simple locales tool

Building websites for the EU institutions, a common feature requested for web apps is a multi-lingual interface. I’ve designed a really simple helper class to handle labels and language versions.

The class can be downloaded here.

To use the class, simply import it into your project

Then, load your xml based labels list into the class:

From now on, your labels are available through the class using their ids :

If the user changes the locale, just reload the corresponding label list and voilà.