Page 1 of 1

HTML5 games lagging on pi

Posted: Tue Feb 11, 2020 2:02 pm
by Ncm123
Hi
I am trying to build a gaming pc for my 5 year old son with the raspberry pi. I wish to make a few html5 games teaching typing , math which will play without lag in the raspberry pi.

I tried playing a few games made in construct 3 but they lagged. Can anyone help me with advice on how to make html5 games that dont lag on the pi?

Thanks!

Re: HTML5 games lagging on pi

Posted: Tue Feb 11, 2020 2:10 pm
by topguy
Which browser do you test with ?
Does resizing the browser window reduce the "lag" ? ( I interpret "lag" as a low refreshrate/stuttering in the UI )

Re: HTML5 games lagging on pi

Posted: Tue Feb 11, 2020 2:37 pm
by Ncm123
I tested on chrome. I am using raspberry pi 4. Lag meaning the frame rate is low of the game and stuttering happens.

Re: HTML5 games lagging on pi

Posted: Fri Feb 14, 2020 4:40 am
by Ncm123
Well yesterday, I tried playing this game on chrome in my Pi4 machine. It hanged the PI.
https://html5games.com/Game/Element-Blo ... 6eef2fb5ed

Is there any list online which has list of html5 games working on the pi?

I even tried playing games on the scratch website - even those games lag a lot.

Re: HTML5 games lagging on pi

Posted: Sat Feb 15, 2020 7:02 pm
by clicky
Ncm123 wrote:
Fri Feb 14, 2020 4:40 am
Well yesterday, I tried playing this game on chrome in my Pi4 machine. It hanged the PI.
https://html5games.com/Game/Element-Blo ... 6eef2fb5ed

Is there any list online which has list of html5 games working on the pi?

I even tried playing games on the scratch website - even those games lag a lot.
Something else is wrong. I've just started it on my Pi4 and it works quite well... Maybe not 60fps but works with decent framerate...

Re: HTML5 games lagging on pi

Posted: Sat Feb 15, 2020 7:50 pm
by kerry_s
i tried that block 1, it is laggy, but if you enable "GPU rasterization" the force in all layers, in chrome://flags it's a little better. also your going to have to raise the gpu split(performance in the config) mines at 128 right now, you could try that or go higher, i don't recommend more than 256 tops. normally mines at 96 and i'm running gnome, i raised it to try the game. :D

it depends on the game, some run perfectly fine, others don't seem optimized or they have a lot of things going on(aka: trying to be to fancy).
thanks for the heads up on the site though, going to use for my niece.

Re: HTML5 games lagging on pi

Posted: Mon Feb 17, 2020 12:42 pm
by Ncm123
Hi
I am using raspberry pi 4 with one gb ram. Do you think 4 gb ram would make it better? If yes, I will obtain one.

Re: HTML5 games lagging on pi

Posted: Mon Feb 17, 2020 1:41 pm
by topguy
You should check how much of the current 1GB you are using before you splash out on a new Pi.

"htop" is a nice command to install, shows the memory usage a bit better than normal "top".

Re: HTML5 games lagging on pi

Posted: Mon Feb 17, 2020 4:00 pm
by kerry_s
i got those games going pretty good.
memory split is set at 160
dropped my resolution from 1920x1080 to 1280x800
turned on all the gpu goodies.

Re: HTML5 games lagging on pi

Posted: Wed Mar 04, 2020 12:18 pm
by Ncm123
kerry_s wrote:
Mon Feb 17, 2020 4:00 pm
i got those games going pretty good.
memory split is set at 160
dropped my resolution from 1920x1080 to 1280x800
turned on all the gpu goodies.
Hi,
For us also once we drop the resolution it works well.

I am trying to build a game which will run on full screen in a browser. Can I reduce the resolution only for the browser instance?

Re: HTML5 games lagging on pi

Posted: Wed Mar 04, 2020 12:32 pm
by topguy
Can I reduce the resolution only for the browser instance?
You can not have one window in a different resolution than the rest of the desktop. ( if I understand your question correctly )