All posts by Aymeric

About Aymeric

Freelance Interactive & Game Developer.

Unity, Flambe & OpenFL Skeletal animation libraries performance

Hey guys, I concluded my AS3 performances test saying that AS3 math performances are still a bit low and that with other technology, we should have better performances. So here we go!

Again I remember that it’s really hard to compare different Skeletal animation engines using different models (and so an engine/a tech). I would really enjoy to have the same model available for each soft…

Flambe
Using Flump with AS3 implementation I had very good performances 30 mascots for 54 FPS. Since Haxe optimized AS3 code, we could imagine that we would win a bit more fps. However using Flambe (which is awesome) and its own Flump runtime I didn’t save FPS. Worst, I lost many! I had 30 mascots at 30FPS. Bad surprise.

OpenFL
OpenFL still use Haxe for coding however it may export native code! On mobile we could suppose that we would win some fps too. I tried several libararies, but the only one I succeed to make working was this one from Lugludum studio. They didn’t try it a lot on mobile, they focus on desktop, but for a first mobile run it wasn’t bad at all: 34 FPS for 30 animated characters.

Unity
For Unity I searched a free library, and I was really glad to see there is an implementation (no official, there was missing an eye with my model) of DragonBones. I put 30 dragons, damn I had 60 FPS! And finally 40 dragons at 46 FPS.

So what to conclude? I was sad to see that OpenFL didn’t save me some FPS relatively to my AS3 benchmark. But we can’t judge a technology on this test. Unity math performances seems to be really good. Is it the best tool for making 2D game? Maybe, without any doubt they are on the good road.

Download sources.

P.S. Gaming for change? Have a look on A Blind Legend! A really nice mobile project using binaural tones! Oh and my colleague and me will work on it. So stay tuned 😉

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!

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
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
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
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
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!

Conclusion
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?

Silly Family, being an indie dev

Edit: Apptoonomy is no more. Selling games is even harder than making ones. I only focus on Da Viking Code now as a cross platform developer.

The game.

Hey guys, this blog post is very special for me :
– it’s my hundredth article!
– my first game as an indie dev is out!

100 blog articles
When I started blogging 4 years (already!) ago, I didn’t imagine that someday I’ll reach the hundredth article. I started mostly as an exercice in style, improving my english communication skills and coding different things for sharing (unpretentious). I continued and now when I give a look in the past I’m smiling : I can see my evolution, how I’m better as a programmer, and all the different things I did in 4 years.
Also thanks to this blog I had my first client as a freelancer! I would recommand to any programmer to have a blog and post each month an article (that’s what I’m doing since 3 years) on what he is doing.

Apptoonomy
With some friends we created a new company, Apptoonomy. So does it mean that I’m not anymore a freelancer at Da Viking Code? No way! What does a programmer on his spare time? He is programming. With Apptoonomy we mainly focus on making our own games. Let me introduce the first one!

Silly Family
silly1Silly Family is a familly-fun Puzzle Game! Do you know Suzan? Of course you do! Suzan is my father’s son’s sister’s mother’s mother! Suzan is my grandma!!!

In Silly Family, you train your logic by resolving more and more complicated enigmas about increasingly crazier families! You’ll have to find the family relationship or run through the family tree.

We offer 3 different gameplays, 5 families (maybe more) and crazy designs… not to mention the animations! Also a multiplayer mode to defeat your friend!

Obviously questions are generated dynamically, I wrote the algorithm using (family) trees and recursivity. That was funny especially managing the different languages (the application is currently available in English, French, Spanish and Italian). We’re waiting a little bit for German, it won’t be easy 😉

Being an indie dev
Silly Family is the first (finished and published) game that I made as an indie dev. It’s really a longest process than programming games for clients. A client has to be sure (or at least should) that his game design is strong and developer implementation won’t show design flaws. Otherwise programmer’s bill may be painful. I started to develop Silly Family in October 2013 so six months ago. And obviously we already had a game design document. But so many things changed during its developement. Also you can add the fact that you must be satisfied with your game’s direction, and to still have the will to work on. Anyway, it’s a very interesting experience and it improved my skills as a game designer. We’re already looking forward for the next game!

Technology
Obviously I used my beloved Citrus Engine for making this game and Starling framework. The IPA size (before submitting to Apple) is less than 17Mo! How did we achieve this size? It’s thanks to DragonBones and its awesome .dbswf format. AS3/AIR technology was perfect for making this game!

Flambe versus the World!

The game.

The (HTML5) engines war
You probably didn’t miss the engines war of the previous month: Unity announced Unity5 with WebGL support (which I already pre-ordered hurrah!) and Unreal Engine 4 did the same with an incredible price. That was for the big guys.
From a more indie friendly point of view, PixiJS continue to kick ass with awesome new features (cacheAsBitmap, blend mode for canvas, SpriteBatch…). Phaser using PixiJS as its rendering engine, is becoming much more popular every day and obviously more stable. PixiJS has really the wind in its sails because OpenFL switched to it for its HTML5 rendering engine!

Continue reading Flambe versus the World!

Finally I made a serious game

After several years in the gaming industry making mostly casual games, it was about time to give a try to serious game, right?

mef-gameMon Exploitation Forestière, only available in French at the moment, offers to the player to grow a forest. He will have to manage different tree species having their own properties (life duration, units collected, …) and cope with natural elements (fire, storm, …). The client wanted to responsibility players about the fact that a forest need to be maintain.
As cool features to develop there were saving players game in database, facebook connect and tiles’ OOP management.

Let’s start for some explanations with the latest one:
Each tile is designed into Flash Pro and inherit from a class with its properties (tree or empty tile for example). This way it’s very easy to modify it in real time, switch or even save it!
For saving the game, I’ve basically create a JSON with each tiles informations (+ score etc.), since everything is OOP it’s very easy to read its data and save it. For loading a save game it’s the same process. Load the JSON with all tiles informations and create objects.
Concerning the Facebook connect, I didn’t use at all the AS3 SDK but the php one. It’s very useful since you may use it for UI combined with JavaScript SDK. And using the php one in the backend is very safe 😉

AIR ANEs

Hey guys! Time flies, February is already finished.

It’s time for a very short blog post! I made many AIR Native Extensions this last months, playing with ads, analytics, sounds… it’s awesome the number of amazing SDKs you find on mobile. Unfortunately all my ANEs are private due to NDAs.

Here are some links to learn how to write your own:
– never played with ANEs? Get started with an Adobe tutorial.
– before coding your first ANE, have a look on the ones provided by StickSports. Richard Lord’s made an excellent work! He provides the best template 😉
– developing your ANE, be sure to read his tips!
– and yes, obviously you can add an Objective-C view on top of your Flash View but you unfortunately you can’t do the reverse.
– for a long run have a look on this Adobe’s PDF.

Hope this links will help!

Da Viking Code, one year of freelancing!

Hey guys, happy new year (better late than never!)!!

We’re already in 2014… and now I worked more than one year as a freelancer and it’s still awesome! I’ve detailed most of the projects made on this blog and my personnal website. Give them a look!

So what is coming up?
Now, I’ve a company name, Da Viking Code (you probably got the joke), and a new website! Thank you my friends at Curious Label for this awesome logo & design!

An other very exciting news: Tamsen aka Gsynuh joins me on Da Viking Code’s crew in February!! He’s the best Citrus Engine’s contributor and it will be awesome to work together daily at the same place!

So now we’re two freelancers for your services, playing with AS3/AIR, Unity and Canvas/WebGL technologies!

Best wishes for 2014 and see you between two lines of code!

Working with multi-resolutions assets

When we’re making mobile apps we have to support lots of resolution from 480 x 320 to 2048 x 1536 if you only target iOS. Adding Android support you have to extend it to 2560 x 1600 (for the Nexus 10)!

If your graphic designer made its design into a vector format, it will be easy to fit exactly to your screen size, and you will only fight with the different ratios format.
However if your design is made with bitmaps, you have to, firstly, be sure they have been made for the highest resolution you would like to support! When this is done, you will use a SpriteSheet to have all of your assets in one (or a little more) place.

In this blog post we will see how to manage multi-resolutions assets based on a Starling app.

Continue reading Working with multi-resolutions assets

Belle et Sébastien, fighting Android’s APK 50mb limit

It’s already time for a new app, Belle et Sébastien!

IMG_0067IMG_0068Belle et Sébastien is a famous old french book and there was a TV series. A movie is planned for the end of the year.
In this mobile application, we discover B&S’ world: an album introduce the characters and relates several informations based on elements existing in the movie: Génépi, snow, WWII, wolf, sheeps…
There is also a game, a kind of Where’s Wally?. Through pictures from the movie, you’ve to search hidden characters, animals, objects, etc.

Android’s APK 50mb limit
The development was going great until we had to release the application for Android. The app is 90mb, we wanted to be sure that it could be downloaded via 3G on mobile phone for iOS devices (limited to 100mb). When we uploaded the Android’s APK it fails because of its size: an APK can’t exceed 50mb!
I didn’t know that, what a mess! Quickly, I heard about APK expansion files. Apart form the APK, we’re able to upload two obb files, each file could be up to 2Gb! I can’t understand why Google is limiting APK to 50mb when the final application could be up to 4.05Gb. Anyway, that was the way to go. Note that you can also download yourself a zip and save the its content on disk to be used in your application, but it sounds so much user friendly to have everything downloaded at one time!

The issue finally was: how to use this obb file with AS3/AIR? I discovered this Actionscript Native Extension: Android APK expansion files, and everything worked like a charm!

To generate an obb file (don’t forget to add .obb extension to the file):

./jobb -pn air.com.europaapps.BelleEtSebastien -pv 1 -o /Users/Aymeric/Documents/Workspace/Flash/2013/Europa\ Apps/BelleEtSebastien/obbToUpload/air.com.europaapps.BelleEtSebastien/main.1001001.air.com.europaapps.BelleEtSebastien -d /Users/Aymeric/Documents/Workspace/Flash/2013/Europa\ Apps/BelleEtSebastien/bin/images

More informations there.

Available on iOS and Android, gives Belle et Sébastien a try! Note that translations are coming 😉

Assassination Classroom, back in love with the web!

Hey guys, it has been a long time since I didn’t make a project for the web. Some years ago, I decided to go away from my web training and learnt native languages (Objective-C) and focus on cross platform tools (Flash/AIR, Unity and Haxe NME which is become OpenFL). You will say that HTML5/JS is the most cross platform tool which exist, that’s right. However as a developer, I thought it wouldn’t improve my skills like Objective-C or even Unity using C-Sharp did. And that’s always true! JS isn’t a smart language, and it isn’t very interesting to deal with it (no interface…).

However some weeks ago, someone offered me a game project using HTML5 technology, and I said yes! Why the hell, I said yes? Because web has evolved. It is far to be perfect right now, but I think the road is the good one. It’s amazing to be able to play your game in any browser on your computer and your smartphone! No apps to download, just go to an URL.
Also on a technology part Canvas performances are improved “each month”, and WebGL support climbs. JavaScript is still a piece of shit but we have many meta languages (Haxe, TypeScript, Dart, CoffeeScript) doing a great job. On an other part I heard about pixi.js some months ago, a WebGL rendering engine with a Canvas fallback and I wanted to give it a try.

Continue reading Assassination Classroom, back in love with the web!