Does OpenFL Improve SWF Timeline Performance?

Hello again. I discovered OpenFL a few days ago when I was struggling to export my game - made in Flash CC - to mobile. However, since then, I got Flash CC’s AIR for Android working (it wasn’t before), and was able to test my game on a mobile device without learning a new language and recoding it all. Yay.

However… It’s extremely laggy, which is rather terrifying because I’m getting the impression that I might have to redo a whole bunch of stuff after all.

The game mostly uses pixel graphics, which I imagine could easily be ported over… The biggest problem though is the fact that it also uses character ‘models’ timeline-animated in Flash. These are each stored as a separate swf outside the main .fla’s library.

I’ve seen that OpenFL can handle SWF assets like this… but would there be any performance increase over the AIR file exported by Flash CC, or would converting everything over to OpenFL just be a waste of time and effort?

I saw another thread here that mentioned a tool called Flump, which can convert swf animations into something less slow… but again, that seems problematic because the models in my game actually have facial expressions and ‘outfits’ that are dynamically altered via code. I don’t know if that would work with something like Flump.

I’ve also been looking into Starling, but I don’t know if that would offer any performance benefits over what I’ve already got since the main issue seems to be the swf-animation models.

I made a simple file in Flash CC to test FPS and memory usage and to show the general look and properties of the models; here’s a zip. On my computer, the swf is able to handle 8 models (new ones can be loaded by clicking) while retaining almost 60 FPS, but it plummets to less than 10 on mobile.

Basically, I’m sort of lost at the moment about what to do here. I’d love some kind of tool that would allow me to keep the animations that I’ve already done while allowing the code-altered facial expressions, but I don’t know whether OpenFL is it or whether I should be looking elsewhere…

OpenFL can allow better access to the GPU, with faster support for a number of core Flash operations.

However, Flash animations are going to use the CPU in order to draw vector shapes. I would recommend finding a way to make this use the GPU, if possible, in order to try and get better performance.

At least two methods are A.) a tilesheet or B.) a texture atlas. A tilesheet is simple and straightforward, but is not good for objects, like you say, that change in a number of dimensions. However, an atlas is able to handle this. I believe Flump uses a texture atlas, as do other tools like Spine.

As I understand it, AIR uses the CPU and does not use the GPU to accelerate rendering. Starling helps accelerate certain things (but divorces you from standard Flash APIs) while OpenFL allows a mixture of CPU/GPU operations