+ 10
Why so slow?
I created a game on HTML5 and it works fine on a computer. But on the phone it slows down. Watch my game and share what your FPS. https://code.sololearn.com/WWkBJcm6X0yJ/?ref=app
16 Respostas
+ 8
O thanks. I'll see.
I forgot about Apple.
+ 7
Interesting. I fix width and height of the game. But I have no idea why it does not work on iPad.
+ 7
What kind of errors do you see? Can you write me a text of em?
+ 7
I have no errors on my Nexus. In menu 30 fps. In game 0-1 fps. Sad.
+ 7
Another version of the game is here. Transpiled to ES5.
https://code.sololearn.com/WBGSFKX9P742/?ref=app
+ 6
Thank you for tests. I fix buttons. But slow FPS on phones is result of a lot of math in my code and mine not enough knowledge of JS.
+ 6
Of cource it have. Objects have a flag or a method 'drawable' and if they are off-screen, they are not drawn or checked for collisions. Thanks.
+ 5
Update: Now the game runs 10 times faster 20-22 fps compared to 2 fps before. Still to start i had to tap in the dead center below start button. Similar behaviour was observed with other buttons too.
Previous:
The game gets 54 fps while loading. But after that its 2fps. Clicking the 'start' button does not work -- possibly due to certain overlapping issues-- and once inside 'controls' or 'about' can't exit.
I tried your code via a web browser outside sololearn and there weren't any overlapping issues and i could start the game too. but it was 2 fps so i quit.
+ 4
ive got an ipad mini 3 and an iphone 6. on the ipad im getting 'loading' on the page and a console script error at the bottom. on my phone, i'm getting the ui for the start of the game and two concloe script errors at the bottom so i cannot continue to the actual game. i looked at your code but the solution is not obvious to me
+ 2
it isnt working at all on my ipad
+ 2
it literally just says script error. maybe youve only developed it for androids and pc? try looking up cross platform mobile developing. its an issue i always got with making my own games
+ 1
No mate! It runs on 60fps.
But it is not adaptive to my screen and half of the game is out of my screen
+ 1
Guy, Is there any optimisation code? can you check if an object is in the visible screen? If it isn't you shouldn't render it and that will make it run faster
+ 1
the button got it after press play doesn't works fine. It get pressed when I press down of it
+ 1
I got only up to 60 GPS but the buttons not really working fine on my phone though.
+ 1
some buttons don't work