I have to different projects that I have been trying different android builds of using various methods (crosswalk, cocoonjs & io, and phonegap).
For one game with C2 displaying an about 125 mb memory use, which I expected to run really slowly, I'm getting about 60fps on my test device. For another game with about 25mb, I am getting about 2 fps.
Can't figure out what the difference is. Tried so many settings changes, all project settings for the smaller (and slower) game I changed to mimic the faster, larger game, no box2d physics, everything I could think of.
Anyone know what behaviors or objects or settings tend to slow down phonegap builds?
I know alot of people have experienced unusable framerates from phonegap, so when I had this larger memory use game actually performing great I was really suprised. I really want to figure out what the difference is, especially given how easy a phonegap build is compared to something like ludei's cocoon.
Memory rather do not have any impact on game speed. If your mobile have not enough memory then game will probably crash or not run at all, but it won't make it work faster or slower.
I was under the impression it had alot to do with performance, but looking into it more it seems a wide range of other factors could be influencing performance.
Regardless, in the build of the smaller game, even my title screen layout, with 2 animated sprites, one event (checking for a touch to then load next layout), and one background image, seems to be running less than 5 fps.
I'm mainly wondering what might be part of the cause of it.
What kind of exporter are you using and what kind of devices you are testing on?
Cordova export, testing on a droid bionic running Android version 4.1.2
If you use C2 for mobiles, its vital to start testing performance on mobiles from the start. Use the cpuutilisation to check on your target device, this way you know when you add some new features and it drops performance (cpu usage jumps up), you know that's to be avoided.
Some behavior or effects hurt performance a lot on mobiles. I posted awhile ago with a short list of things to avoid.
Develop games in your browser. Powerful, performant & highly capable.
See Performance tips
On old Android devices the GPU may be blacklisted - check by opening Chrome and visiting chrome://gpu.
— I have tested the whole time on this mobile device, using testing on a local network on both the mobile chrome browser and one other browser since I started the project, and have always had great performance. That is part of the reason I have just been wondering if anyone has more insight on what causes the slowdown in the actual build.
I was under the impression testing on the mobile browser would give an accurate idea of how the actual build would perform, but I guess I should have been making test builds throughout the development process.
Ashley Canvas is hardware accelerated, webgl is unavailable. I have enabled webgl effects in my project, but do not actually use any webgl effects in the project. I will try to find a webgl capable device to test performance on and see if there is a difference.
Thanks for the input so far.
Ashley is there a way to force webgl acceleration within the phonegap build? I read accessing the chrome://flags in the browser allows the change, but my problem occurs in the actual phonegap build, not in the browser local network test.