HTML5 Version Ridiculously Slow On Raspberry Pi 3B+?

Hi,

Currently working on a very simple 2D game using Defold.
I ran the HTML5 version of the game on a Raspberry Pi 3b+.
(with Raspbian Linux OS and Chromium Internet browser)

HTML5 game runs very slowly on above computer?
Any tips at improving performance of HTML5 version of our game?
Let me know, thanks!

Jesse

Was it compiled in Debug mode? Compile in Release mode.

Hi,

HTML5 version was built in “Release” mode…

Jesse

If you go to YouTube do videos play laggy/slow? That device is just really slow. See if there is an option to increase GPU memory?

sudo raspi-config

Advanced Options -> Memory Split -> Change to 128 -> Reboot.

Does the game run fine on other computers? If not, then try this.

Hi,

I test HTML5 version on RPi 3b+ to simulate a “worst case scenario”(performance wise)…
Game runs full speed on Linux desktop and a 5 year old $40 Android tablet.
Just want to achieve the best performance possible for HTML5 version.

Does defold just use HTML5 or it uses WebGL too under the hood?
I’ll figure out this performance issue on HTML5…
Thanks!

Jesse

1 Like

This is the wrong assumption. The raspberry pi is so very different from a traditional computer, old or otherwise. It has a different CPU architecture, GPU, GPU driver and OS. You are not simulating a worst case scenario. What you’re trying to test is a completely different kind of scenario.

5 Likes

Defold needs WebGl to run properly, it does not have canvas support.
The Rpi needs the GPU to be setup properly. Usually a Raspian update helps.

Other pure html5 engines and tools run into the same issues, but apparently the rpi4 is much better:

As a worst case scenario I have a very old ipad2 with a very old iOS, and if the game runs just fine on that I’m good.

As briztl said the rpi represents a totally different scenario.

8 Likes

Hi,

Just fixed our Frames Per Second display…
Getting 19 FPS on the RPi 3b+.
I think with some optimizations we can double the FPS.
Frankly, 19 FPS is pretty good considering the hardware…

Jesse

3 Likes

hello…even i had the same issue and upon analyzing through various sources i found that the old version may have used memcpys whereas the new version uses DMA. Although DMA copies reduced the CPU usage, they seem to be a little slower. Going back to memcpy seems to improve video playback and the expense of higher CPU usage, which may not be a good trade-off on armv6 pis.