AS3 Skeletal animation libraries performance test

Update: part2.

Right after Silly Family (the Android & multiplayer version will be out at the end of the month!), we are already planning our next game. It will be more for gamer, a bit less family, it will be a tower defense kind of game (I enjoyed so much Bardbarian). We’ve already some fresh ideas, so it’s already time for making test implementation!

On Silly Family we used DragonBones for animations. The graphic designer enjoyed to be able to make them right in Flash, and for me the .dbswf exported file is really optimized (less than 1Mb for 6 * 5 * 16 animations and multi resolutions friendly)! However in our future game, we will have at least 30 animated characters at the same time, and in my quick prototype DragonBones wasn’t able to handle them. So it’s time for a benchmark!

Ok, first thing to consider: since I’m not a graphic designer (nor an animator) I wasn’t able to use the same graphics for each library. So I used their default model. Some may be more complex than others and so impact performances. The goal was to see if I can reach 60 FPS on my iPhone 4S (using iOS 7.1.1) in release mode obviously with AIR 13 using ASC 2.0 compiler and Starling framwork.
If you want to have a quick look on what the benchmark looks like, go there.

DragonBones has the easiest workflow since it is used directly into Flash. This is the library with which I’m the most familiar. For 30 Dragons on screen, I reached 34 Fps using version 3.0 beta and its new cacheFrameRate feature!

Flump is an other library using Flash for making animations. I found it harder to use (in Flash editor) than DragonBones when making Witchcraft Works (I used Flump with Haxe and Flambe). Making this simple performances test was a bit complicated since they don’t provide external libraries (fzip, react) directly, or I missed something. Anyway, I had 30 of their mascot running at 54 Fps!

Spine has its own software for making animations. It also has its official runtime for AS3/Starling. I had 30 orcs at 25 Fps.

Spriter also has its own software for making animations, it also has its official AS3 implementation but when I tested it performances was really, really bad. I didn’t have 30 objects at 60 FPS on my computer! Lucky me, since Spriter is very popular (it was one of the first Skeletal animation software on KickStarter) there are several implementations. And the one made by TreeFortress is pretty solid concerning performances. Have a look on Shawn’s article. I reached 45 fighters at 52 Fps!

After this benchmark, I already know that I won’t use Spine. It’s the most expensive software and concerning performances point of view, there aren’t very good. Spriter Shawn’s implementation sounds very performant however sadly it doesn’t sound to be updated and supported with latest Spriter update. We enjoyed working with DragonBones for our previous game, however for this new one it may be a bad deal. Performances aren’t enough good, but since the graphic designer and me are very familiar with it, it may worth spending time on the library to optimize it (and damn I love this .dbswf format). And finally Flump sounds like a way to gve a serious try, performances seem to be pretty good and for the graphic designer he should feel at home using Flash!

Download sources & Scout reports.

Using an other technology?:
As you can see in the Scout reports, this is really the AS3 code which is limiting performances. It reminds me Philippe Elsass blog post about the fail of AS3/AIR. For my game I won’t need 100 characters à 60 FPS, but it isn’t a reason to have a look on other tech:
– I enjoyed using Flambe, however it’s using AIR on mobile. Thanks to Haxe optimization, it should be more optimized than AS3 directly, however I doubt having so much different performances.
OpenFL may be the solution concerning performances. However I’m a bit afraid of its constant evolution.
– And finally, why not Unity? Related to my old article, here I’m facing Unity’s bad side: all Skeleton animation libraries aren’t free even for testing their runtime. It’s really sad… Smooth Moves doesn’t sound bad at all.

And you what do you think?

9 thoughts on “AS3 Skeletal animation libraries performance test

  1. Nice benchmarks Aymeric, i was just looking for something like this since i’m also evaluating alternatives.
    Imho, DragonBones and Spine are the best (DB for the dbswf format and Spine beacuse of the editor), but they surely need a runtime performance boost.
    I haven’t really looked into the code but i think that most of these solutions are trading performance for runtime flexibility, like changing bones and such. I think there is a lot of room for improvement performance wise, by selectively trading off some functionality. For example i don’t know if its already implemented or possible at all, but some sort of cache option could be used to avoid all the calculations of checking all the possible things that may have changed with the bones and animation. Just thinking out loud here…
    Anyhow, thanks for the post!

  2. flump need rectangle texture mod and png optimize to save some more ram

    BTW to be fair, you should use same sprite sheet for each test 🙂

  3. Hi Juan & katopz!
    @Juan : yes you’re right, it sounds like DB is looking this way for V3. Will test it ASAP.
    @katopz: yes however I don’t have Spriter & Spine and I’m not an animator 🙁

  4. Hi,

    In our latest production we used Spine because the the power of animation tools available in the editor and also for the one that are coming. For our animator there is no comparison, Spine is a real animation tool, features like FFD or IK Pinning are a must have and we are really waiting for those. The bad side is performance, I think the output format (JSON) it’s not best suited but the authors are planning a binary format which could reduce the loading but mostly the init time. I agree that performance does not seem ideal, I guess there is too much runtime to support so they don’t optimized as mush as it could be possible.

  5. Well this is a meaningless benchmark if you use different art assets. What if spline’s asset is 5 times more complicated that Spriters? then Spline wins by a wide margin

Leave a Reply

Your email address will not be published. Required fields are marked *