HTML5 target framerate issue

Openfl 3.1.2
lime 2.4.8

Setting FPS in project.xml does not work on HTML target (does work on eg Flash). When I compile HTML5 I run uncapped (at about 60 fps). Setting the following in my project.xml seemingly is ignored.

<window background="#FFFFFF" fps="30" />

I discovered that if I use this following line in Main.hx it will set the FPS in HTML5 target appropriately…

lime.app.Application.current.frameRate = 30;

So maybe a disconnect in the project.xml?

Good news!

This is fixed now in the Lime repository. Thanks for reporting! It should default to 60 FPS (full requestAnimationFrame speed) by default, but otherwise will render less often, based on the FPS setting :slight_smile:

1 Like

Looks like this is still a problem on HTML5 target. Nothing happens if change FPS in project.xml.
My solution is to add: stage.window.frameRate = 30; in main class.

I had to do this as well for the web build of our game.

1 Like