Question

I am developing a game in Javascript/HTML/CSS and packaging it into an Android app with Phonegap. The game includes a bunch of animations (many done with jquery) such as fadeins/fadeouts, div movements, etc. - nothing out of the ordinary but certainly heavy relative to most websites out there.

In ICS, the game runs extremely well - very high fps, no lag, etc. However, now that I upgraded my Galaxy Nexus to 4.1, Jelly Bean has resulted in the game slowing down to a crawl. Fade ins are now more akin to show, I constantly notice slow responsiveness to touch, the projectiles being shot keep occasionally freezing, etc.

I realize this is quite general, but I am just curious if anyone else is seeing / has seen something similar in their applications and if you have suggestions for how to fix this mess. Any tips are much appreciated.

UPDATE: after enabling 3D transforms and rewriting part of the code to include everything in Animation Frame the issue seems to be fixed.

Was it helpful?

Solution 2

after enabling 3D transforms and rewriting part of the code to include everything in Animation Frame the issue seems to be fixed.

OTHER TIPS

More a generic statement then answering your question

Have you tried using webkit animations rather then Jquery ones ? These are more likely to be processed by the GPU.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top