Terrible performance in html5

  • I wasn't expecting amazing performance, but I can't seem to hold 30fps on a screen with 5 FlxSprites static on screen, granted some of them are 800x600 and one is animated, here's a snippet from the profiler. Any guess to what I should look into optimizing?

  • I didn't use html5, but people say that it should be used with -Dwebgl flag, do you use it?

  • what profiler is that..? I am also trying to get HTML5 working at 30fps but I have not been able to get hxScout to work since my game instantly crashes when I try to open up a windows version of the game.

  • @LangLearn-Korean I'm using the Chrome JavaScript profiler with a code map.
    I am using Dwebgl, the lag mostly seems happen on animation and alpha, so I may just remove those for the html5 version of the game.

  • @starry-abyss Thanks for this tipp! This flag made my game playable online. BUT sadly tinting sprites/fonts does not work correctly. Blue becomes Yellow, Red becomes Blue.

  • On plain Openfl, using 2D on Canvas and not webGL I'm getting great performances (60+ fps) even on a pretty old PC. WebGL performances varied a lot in time, and on different browsers too: Chrome with webGL was terrible a few months ago, but now it seems to be more or less aligned to the other browsers like Firefox, at least with our projects.
    2D on webGL is good too, but the "feeling" is different, you have to try yourself, maybe it depends on the hardware and the different antialiasing.

    I don't know how much worse can be the performances using Flixel above Openfl, I still have to start using it ;)

    Ah! Don't forget that Canvas supports a lot more blendmodes than WebGL currently!

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.