I am playing around with the latest build Solar2D-Windows-2022.3664 and tried the HTML5 export.
The build works and the app is running, but the performance is terrible.
Even if I just move one single image over the screen, the movement is choppy.
It looks like 30fps to me, even if 60fps is set (display.fps says so).
Is there a known hard FPS limit in HML5 builds? Has anyone experienced the same?
I tried it both locally with xampp and on the Solar2D Playground.
If you want to try it yourself, just use this code
local logo = display.newImage(“img/alter.png”)
logo.x = display.contentWidth * 0.5 - 200
logo.y = display.contentHeight * 0.5
function forward()
transition.to(logo, { time = 2000, x = display.contentWidth * 0.5 + 200, transition = easing.inOutQuad, onComplete = backward } )
end
function backward()
transition.to(logo, { time = 2000, x = display.contentWidth * 0.5 - 200, transition = easing.inOutQuad, onComplete = forward } )
end
Hi!
I tried your example and also exported example projects (eg Corona Cannon). And everything works fine for me. Later, I will post the exported project on itch.io so you can check how it works.
You can try running the lighting demo in your browser: Downloading: dynacam
You can also try working in the sandbox: https://playground.solar2d.com/
Just to avoid confusion: The problem is NOT that the program is not running. It builds and runs, but it runs SLOW / CHOPPY for me. I already tried the Solar2D playground, and my example program is also slow there.
For comparison, try to run my example in playground and in corona simulator simultaneously (with a config file that sets fps = 60) for a side to side comparison. If I do this, I can clearly see the image move much smoother in the simulator than in the playground.
Same behaviour here. The FPS switches back and forth btween 30 and 58 fps. Its strange that its only those two values. I did not have a closer look at the implementation yet.