Im having similar problems to whats discussed in these threads:
Game Perfromance on Android Sucks
Chrome vs Cordova performance
Basically Im noticing a marked difference in performance between Chrome on Android (remote preview and HTML5 hosted online) and Android APK export.
Ive been testing on two phones: a Pixel 2 and more recently a Pixel 4a. So correct me if Im wrong but as these are Google phones, there shouldn't be any problem with blacklisted GPUs.
So basically I feel that my game is pretty well optimised. When testing on both devices the game runs at a constant 60FPS, and cpu usage stays within a tolerable range (30-40% on Pixel 2, and ~25% on Pixel 4a). This is true when testing in Chrome on Android AND Android APK. So to be clear, on Andoid APK I get 60FPS and ~25% cpu (Pixel 4a).
BUT the difference Im noticing is, in busy parts of the game, when more enemies and projectiles are moving around on screen, the Android APK will get slightly janky (happens on BOTH devices, even the new Pixel 4a). Its playable, but janks are definitely noticable.
This jankiness is simply not present when testing in Chrome on either device.
So I dont get it... Unlike the guys posting in threads above, who experienced drops in FPS (down to 40FPS for example), my game runs at a constant 60FPS and reasonable CPU usage (25% on Pixel 4a), yet I get janks!!!
Why is it that when Im seeing this jankiness, there is no corresnponding drop in FPS or increase in CPU usage...
So.. I feel like, theres something about running the game as an APK that affects performance. Its playable, but Im bummed that performance isnt the same as Chrome...
A question. I think I read a comment in one of the threads above that Cordova doesnt make use of webworkers? Is that right? So running the game as an APK is basically like playing it in Chrome with webworker disabled? Is that the case?
Some details about my project settings:
- C3 runtime
- Webwork: YES
- Fullscreen Quality: HIGH
- Im exporting a Signed Debug APK
Game has GooglePlay, InAPP and MobileAds plugins (Ive tried removing these altogether, no effect).
Ive tried exporting with Minify disabled / set to simple (Ashley says minification has no effect on performance).. and in my case he was right, this didnt help.
I dont really know what else to try.