Scaleform, for the love of Flash

RE-Edit : Scaleform mobile SDK 4.4 is out!

Edit, official answer from Autodesk: “Initial Indie friendly efforts have focused on MayaLT, as the most widely used Autodesk game tool. Autodesk is considering a similar option for their Game Middleware tools (such as Scaleform, Navigation and HIK) which will make them more affordable and accessible to Indies. An Indie friendly pricing model, hopefully coming soon, would allow them to offer the latest version of Scaleform to Indies and not bother maintaining a separate (and older) consumer Scaleform Mobile download. That should solve the problem for Indie devs that want the latest Metal, XCode and 64 bit support.”

We’re in 2015 and Flash is still there. It might be a dying technology but it couldn’t die right now because there isn’t any other tool which is able to replace it. The strength of Flash is obviously its vector animations. However since several years many of the flash developers don’t use the Flash Pro software in their daily job. Now we’re mostly using Starling and sometimes we grab animations from a fla and turn them into a SpriteSheets, or using DragonBones or mostly a SWC file to turn it into textures at runtime. Also there is the fact that we’re not able to reload SWF file using AS3 code on iOS.
Those facts highlight that something is broken in our production line: graphic/animation designers are increasingly dependent on developers. We are not able to take their SWF to make it running on our mobile device, so we must recreate everything ourselves via code and optimized framework (Starling). And hell, I hate doing animations jobs.

I think AAA studios were laughing when Flash was announced dead, because they use it daily. Mass Effect, Tomb Raider, The Witcher, Crysis… all of them use SWF file for their UI stuff. Have you thought a moment that even EA was using SpriteSheets with several resolutions for its menu!? Obviously not, with SWF file they are able to target all resolutions needed with just scaling/stretching their SWF without any loss, from a crappy 640 x 480 resolution to a 4k. However they are not doing it via AIR (it even doesn’t exist on console), but via Scaleform. Let’s have a look on this amazing tool!

Scaleform
workflowScaleform is an advanced, cross-platform UI solution. It is coded in C++ so available everywhere (you will compile on your iOS device via Xcode from your Mac). With the same SWFs file you may target consoles, desktops (even Linux) and mobile (even Windows Phone). Way more targets than AIR!

Scaleform uses a hardware-accelerated vector graphics technology, which tessellates vector graphic shapes into triangles that modern 3D video cards can render. Converting the data into triangles enables Scaleform to output vector graphics faster than traditional software rasterizers, making it the ideal solution for high-performance multimedia environments.

Scaleform Mobile SDK costs $295 per platform & developer. There is also a Unity plugin for Scaleform, but I won’t go further there, without any doubt it worth it.

So to summarize: Scaleform enables SWF (vector assets) to not suck on mobile. I already used SWF on mobile via the AIR GPU mode but I feel really limited due to performances.

Autodesk for better or worse
Autodesk owns Scaleform. Autodesk makes strong professional softwares that you probably heard like AutoCAD 3ds Max, Maya… They are in a professionnal market with big companies dealing with car brands, AAA game companies… So indie game market is really not their priority.
Edit: it seems that Autodesk now also focus on the indie market: 1, 2, 3.

A dead product?
If you give a look to the Scaleform Mobile SDK release notes you will be surprised: no update since 2013. Same from the Twitter. Also their Scaleform Launcher extension for Flash doesn’t work with CC on Mac unless you’re updating files yourself (tips from one year ago, luckily I still have a CS6 copy). With the Mobile SDK you will have a 4.2 version but that’s strange because everywhere they are talking of 4.4 version. Also if you try to create an account there, nothing happen. There is 4.4 version but at the moment it is “reserved” (understand it costs so much money that you can’t afford it) to AAA companies/games. An unofficial source told me the Mobile SDK “premium” version costs $5000 for : as many developers as you need, all the platforms supported but for one game only!! You wouldn’t imagine console/pc licenses pricing.
Also thanks to this premium version you may access to a private forum and have directly Scaleform developer support.

So the product isn’t dead at all but it is not designed for the small indie game developer market. I hope that Scaleform will update its “indie” mobile SDK. The 4.4 version added support to iOS 64 bits and Metal… I’m afraid that the “indie” SDK will be outdated due to the new Apple requirement (64 bits) starting in February.

Case Study
tiny-thiefTiny Thief has been made with Scaleform and its an excellent game. On the Starling forum, Miguel Santirso explained why they choose Scaleform to make their game.

Scaleform would have been definitely a valid solution for my small app. I would have been able to target the 60 fps like we will see later.

Getting Started with Scaleform
Download their SDK, request an evaluation license and read a lot of pdfs! That’s the hard way to learn 😉 Fortunately there are samples and some videos tutorials.

When you will try to compile their Starforce Tower Defense game (have a look on all this gorgeous HUD animations) you will encounter several issues. Since the latest SDK update backs to 2013, it wont be compatible with Xcode 6. You will have to go over this forum thread and be a bit familiar with Xcode.

Benchmark
Those benchmarks have been made with an iPhone 4S and latest SDK/OS versions. AIR 16 and Scaleform 4.2. Note that your SWF must be compiled with the Flex compiler (instead of ASC2) if you want to run it via Scaleform.
Sources.

  • pure vectors: using this project I opened the H letter of the french board. On AIR and GPU mode, I couldn’t have more than 30 FPS, on Scaleform 60 FPS!
  • Starling’s MovieClip vs Scaleform standard Flash MovieClip: I took my old blog post using 300 MovieClips this time. Starling 300 MCs : 48 fps. The same animation but via a SWC for the display list 1.5 fps. On Scaleform: 7 fps.
  • Physics: Using the Citrus Engine (it is compatible with some very small tweaks) I made a basic test with dynamic physics objects. I didn’t success to use Nape (probably due to the way it has been built via Haxe) with Scaleform so I used Box2D. On Starling/AIR I had 25 fps for 50 dynamic objects. On Scaleform 15 fps for 10 dynamic objects… ouch!

So my conclusions concerning Scaleform are the same than Philippe‘s one: AS3 scripts are interpreted and should generally run comparatively very slow and this will be a bottleneck if you want to control lots of entities/particles or do heavy maths. But if you need real vector assets renderer, Scaleform outperform AIR/GPU mode (note that I didn’t try with bitmap & bitmapdata operations).

Scaleform ANE?
Yes, Scaleform may use ANEs, but that’s not what I was thinking about. In several games I use Starling for the game core and display list (via SWF) for some UI parts (if its simple). If you have complex UI don’t bother to translate what did the graphic/animation designer to Starling. Just display it on top of your game to Scaleform via an ANE! Wait, may I do that? You could but there isn’t any ANE doing this at the moment. A Scaleform project for iOS is C++ code (Scaleform) included in an Objective-C wrapper. So technically this is something doable and since I enjoy making ANEs I would be very interesting to go deeper there.

WebGL?
Ok, let’s go further. Scaleform is coded in C++, right? So nowadays nothing prevent it to run it into a browser like Unity did. Flash playing through WebGL, that’s probably what we’re all waiting for…

To conclude, nowadays everyday we are choosing which tool to use for making a project, Scaleform is certainly an arrow that we should add to our quiver. It enables to run vector content via a SWF file on all platforms with a decent framerate. Now we’ve to raise our hands to Autodesk to show them that indie game developers are a real market for them and find a solution to have 4.4 version (and so probably a new pricing model).

Amen, and happy new years!

4 thoughts on “Scaleform, for the love of Flash

  1. Oh come on. who doesn’t like animating stuff by code!

    just kidding.
    I understand what is felt by most people, and the little room designers/illustrators/animators were getting. It’s nice to see that problem being solved.

  2. Interesting stuff, thanks Aymeric. I remember reading the posts on the Starling forum about Scaleform when Tiny Thief came out, and thinking that it sounded like it could be a great solution for being able to use vector assets in mobile apps. It’s good to now hear your thoughts on this and ideas as to whether / how it might really come about as a viable workflow.

  3. I have answer from gameware support:

    There are no current plans to update the consumer Mobile SDK. Feel free to contact us in a couple of months regarding future plans for Scaleform Unity / Mobile.

Leave a Reply

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