Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / HTML5 Version Is Painfully Slow Compared To Android Version?

Author
Message
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 10th Jan 2018 18:47 Edited at: 11th Jan 2018 08:19
Hi,

We have done everything we can think of to improve performance.
Android version of our game runs full speed on a 4+ year old $40 Android tablet.
We are still having major performance issues with the HTML5 version.

Can someone look at our code on below GitHub web page?
https://github.com/JeZ-l-Lee/LettersFall_110Percent
There must be something we are doing wrong or a way to make game perform better on HTML5.

Any help would be appreciated - we have scheduled the official release date for Friday, January 19th.
Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
Carharttguy
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 10th Jan 2018 18:51
Just tested, I see no performance issues? Firefox on Macbook Pro 2015 here.
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 10th Jan 2018 19:01
Hi,

Thanks for the test.

On a 5 year old Windows 10 desktop with 12GB RAM & 2GB GDDR5 AMD GPU
we see about 20 Frames Per Second (game is set to run at 30 FPS)

How can we solve this performance issue on HTML5 so game will run good on a mid-range Win 10 desktop?
Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
puzzler2018
User Banned
Posted: 10th Jan 2018 19:11
Just tested on Windows 10 - Edge - seems to work well

Kudos to you in getting this at this stage - you was only talking about doing it just before xmas
Carharttguy
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 10th Jan 2018 19:16
Quote: "On a 5 year old Windows 10 desktop with 12GB RAM & 2GB GDDR5 AMD GPU
we see about 20 Frames Per Second (game is set to run at 30 FPS)

How can we solve this performance issue on HTML5 so game will run good on a mid-range Win 10 desktop?"


Hmh your hardware seems good enough to run this. Which browser are you using (plz no edge)
Is there a way I can toggle FPS somewhere? It does seem to run good, but maybe it's still to slow, I don't know, can't see FPS anywhere.
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 11th Jan 2018 06:53
Hi,

In [Options] screen you can select Secret Code: "2777" for Frames Per Second display.
Ran game on Firefox, Chrome, & Edge.
There must be something we can do to improve performance?
Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
linuxluvuback
9
Years of Service
User Offline
Joined: 17th Oct 2015
Location:
Posted: 11th Jan 2018 07:42
I see your issue...

worst: 13fps
typical 17fps
1920x1200

I tried 800x600 bad perf there too.

fullscreen or not same perf,
firefox 57.0.4
win7

latest google chrome nonfullscreen = 21fps if not clicking
crazy
If clicking crazy then 13fps,


I ran agk compiled version and 30/30fps all day.

system that was available for test: Dell T7400 dual xeon @ 3.16 Ghz with 16GB ram and quadro fx3700

Carharttguy
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 11th Jan 2018 11:55
I just retested it with fps display.
It's worse than I thought:

Firefox: 21-22 fps ingame
Chrome: 23-24 fps ingame

I think you cannot do a whole lot about it. The AppGameKit could speed things up by compiling from LLVM to WebAssembly instead of LLVM to asm.js. But we're talking about a 10% increase or so.
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 11th Jan 2018 12:57
Hi,

Well ok, I guess...

Is there anything in my code that could be improved?:
https://github.com/JeZ-l-Lee/LettersFall_110Percent

Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 11th Jan 2018 17:32
you're calling the function to recreate every scene every frame, this is eating your performance.
you want to only display the correct scene each time the scene is changed
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 11th Jan 2018 18:29
I'll hit it with a hammer, thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
linuxluvuback
9
Years of Service
User Offline
Joined: 17th Oct 2015
Location:
Posted: 12th Jan 2018 07:32
JeZxLee,
A solution that works for my system: a 30,000 texture mapped triangle cube with the dancing dude get 60fps in html5 app mode( I click with the mouse like crazy and its still 60fps).
Can you make your sprites into quads(2 triangle) pieces of a 3d object and just render the one massive 3d object?
rebuild your gui and game pieces as quad pieces ?
linuxluvuback
9
Years of Service
User Offline
Joined: 17th Oct 2015
Location:
Posted: 12th Jan 2018 08:39
See attached picture,
I was able to get perf to nearly 60fps with 200 textured cubes(3d obj).
This will allow 200 different images for sprites.
There is a long wait time at startup to load 200 objects and 200 images.


Attachments

Login to view attachments
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 12th Jan 2018 11:17
Hi,

I hit the game with a hammer, Thor's Hammer...
...Please test again the HTML5 version:
https://github.com/JeZ-l-Lee/LettersFall_110Percent

Getting 30FPS on my 5 year old Win 10 test desktop.
(game *should* be locked to 30FPS on HTML5 and Android)

GitHub repository above has been updated with the current source code.
Please take a look at new source code and let me know if I am doing something wrong.

Thanks! Going to fall on the floor now :S
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!

Login to post a reply

Server time is: 2024-11-23 01:06:24
Your offset time is: 2024-11-23 01:06:24