Yesterday, a friend sent a message in the group saying that OpenFL has serious performance issues with H5

Yesterday, a friend sent a message in the group saying that OpenFL has serious performance issues with H5


There are serious performance issues with OpenFL for H5


Try playing 50 movieclips directly without starling


But the performance gap between Flash environment and H5 environment is more than five times

This friend uses the “haxelib swf” library to play 50 movieclips simultaneously

He reported that OpenFL performs very poorly in developing HTML5 targets, with Flash targets being several times faster than HTML5 targets for the same operations ..

I suggested that he use “starling” or “creatjs”, but he didn’t reply later

The HTML5 games I make with just OpenFL play well on my wife’s Samsung phone but are very laggy on my iPhone 12.

I changed to using Starling for Haxe for one of my games and saw an immediate performance improvement on my iPhone.

It seems very device specific. But yeah, I’d suggest pulling in Starling on top of OpenFL and using that as the renderer.

1 Like

@785597448, I’d strongly suggest creating a benchmark that illustrates your use case, and prove to yourself if one, or the other, is going to be able to deliver what you need.

It’s really important that you answer these questions early on, so you’re not wasting your time going down a path that can’t deliver what you need.

Don’t take too much stock in passing comments, test these things for yourself and prove the point. I’m not saying your friend is right or wrong, I’m just suggesting you should test and confirm this for yourself.

It’s also worth noting that a Starling MovieClip should not be conflated with an OpenFL/Flash MovieClip. They share a name, but are functionally quite different.

This is a screenshot from my most recent OpenFL HTML5 project (not Starling). On screen, there are roughly 625 embers, each consisting of two independently animated sprites, so a total of 1,250 sprites. They’re all moving, swirling like a vortex, eventually dropping out of view, being removed, and ultimately re-spawned back near the middle to begin again.

It runs silky smooth on desktop and mobile.

2 Likes

@Tamar
@Bink

Thank you for your answer, it’s very encouraging,
This is just a question from a friend in the group chat, not my project,
So far he hasn’t asked any further questions, I think he has found a solution.

As far as I know, he is releasing his “Flash” game as “HTML5” and other targets, so he used “OpenFL”. I don’t know anything else, anyway it’s not my project. I saw him say a few words in the group chat, so I posted it on the forum … Feel free

The BunnyMark demo shows how you can use the drawQuads or Tilemap API in OpenFL to get faster performance for many objects. This is similar (though I think faster) than what Starling is doing:

1 Like