Cordova stuttering on Android

0 favourites
  • Update: Since I experience frequent stuttering even though I have a high fps I decided to measure the highest values of the variable dt each second. When I run my game with the "Remote preview" feature on my phone with the chrome browser, after a short while in the beginning of each scene I get a smooth experience with 17 ms of maximum dt most of the time, a few seconds have a maximum dt of 33/34 ms.

    However, when I run my game as an exported Cordova app I frequently get maximum dt values of 34 ms, 51 ms and even 68 ms some times. Any idea why some of the dt values would be larger when running as a Cordova app? I have a Samsung Galaxy 5 Neo.

    You can try the app version that counts the maximum dt values here: drive.google.com/open ... FVKSXphNVE

    Old post

    To get a feel for Construct 3 I've made a simple Flappy Bird clone with the Tappy Plane assets from Kenney. When running the game on my android phone with the Chrome browser it works fine but when running as an app made with the built in Cordova building service the app is stuttering even though the reported FPS is high. Has anyone else experienced this before? Feel free to try my game using your android phone to see if you get stuttering when using the cordova built app.

    Tappy plane on a webserver: eddeland.com/tappyplane

    Tappy plane .apk for android: drive.google.com/file/d/0B4VUO9 ... sp=sharing

  • To get a feel for Construct 3 I've made a simple Flappy Bird clone with the Tappy Plane assets from Kenney. When running the game on my android phone with the Chrome browser it works fine but when running as an app made with the built in Cordova building service the app is stuttering even though the reported FPS is high. Has anyone else experienced this before? Feel free to try my game using your android phone to see if you get stuttering when using the cordova built app.

    Tappy plane on a webserver: https://eddeland.com/tappyplane

    Tappy plane .apk for android: https://drive.google.com/file/d/0B4VUO9 ... sp=sharing

    No idea. I've made a much more sophisticated game using whopping amounts of memory, way above the recommended limit, tested on my crappy $30/month Alcatel Metro PCS phone via Cordova and it works fantastic. I've even used tons of transparency, which is not recommended at all. Needless to say I was blown away and glad I've invested years of my time, probably like 5 or 6 now into C2.

    I was going to say how incredibly addictive these are even as a clone, but it turns out not so without the frequent dying.

  • Update: Since I experience frequent stuttering even though I have a high fps I decided to measure the highest values of the variable dt each second. When I run my game with the "Remote preview" feature on my phone with the chrome browser, after a short while in the beginning of each scene I get a smooth experience with 17 ms of maximum dt most of the time, a few seconds have a maximum dt of 33/34 ms.

    However, when I run my game as an exported Cordova app I frequently get maximum dt values of 34 ms, 51 ms and even 68 ms some times. Any idea why some of the dt values would be larger when running as a Cordova app? I have a Samsung Galaxy 5 Neo.

    You can try the app version that counts the maximum dt values here: drive.google.com/open ... FVKSXphNVE

  • What does it say if you visit chrome://gpu on the device? Usually driver blacklisting is the cause of any performance problems.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What does it say if you visit chrome://gpu on the device? Usually driver blacklisting is the cause of any performance problems.

    I have performance problems too. I exported C2 project using crosswalk and got FPS around 60. Same project using C3 export got fps in the 50s and stuttered a lot.

    I am using Galaxy tab 4 10.1

    I get the following when I type chrome://gpu

    WebGL: Hardware accelerated

    WebGL2: Unavailable

  • What does it say if you visit chrome://gpu on the device? Usually driver blacklisting is the cause of any performance problems.

    In regards to what DarkSide posted, I get the following when going to chrome://gpu on my android device

    WebGL: Hardware accelerated

    WebGL2: Hardware accelerated

    Note that the game runs without a lot of stuttering when running in the chrome browser on my android device, the cordova exported app is the version that is experiencing more stuttering.

    I uploaded all of the information from chrome://gpu here: docs.google.com/document/d/1-HH ... sp=sharing

  • Only an idea may be is nonsense, have you tried to update webview in Google Play?

  • Only an idea may be is nonsense, have you tried to update webview in Google Play?

    Absolutely not nonsense but i checked that already last update to my WebView was april 20 this year.

  • I have performance problems too. I exported C2 project using crosswalk and got FPS around 60. Same project using C3 export got fps in the 50s and stuttered a lot.

    Crosswalk is a wrapper. Wrappers usually enhance FPS, but at a cost of features, stability and the bloat of including the runtime in the final build size. You seem to have a good fps gap. My own tests are so close performance wise, I ditched crosswalk a good while ago.

    Ultimately, mobile is a minefield for performance. Always has been. Try and test on some different devices to see what you get. Never, ever, test on one single device as take that as a final benchmark. Ive tested builds on older hardware and actually got better performance.

  • I have performance problems too. I exported C2 project using crosswalk and got FPS around 60. Same project using C3 export got fps in the 50s and stuttered a lot.

    C2 and C3's runtimes are nearly identical, so this is odd. I'd suspect it's random variation or the test mechanism more than Construct.

  • I see the same behavior just using the flappy bird clone template without any modifications. If I do the live preview feature, the game runs on my phone in the chrome browser and is very smooth.

    However, if I use the build service to get a debug apk and run it on my device, the movements of the bird are very jerky and uneven when running in the default webview.

    I have a galaxy S6 and both my chrome browser and web view are up to date. I am running android 7.0

  • Just to add a little more info to this issue.

    This time I downloaded the cordova project and built it locally. First I created an empty cordova project from the command line and just copied in the www folder. It ran much smoother and didn't seem jerky anymore.

    I then replaced the config.xml and added the config.json that was supplied with the cordova build and rebuilt the app. It installed a bunch of components through npm that is not in the default cordova app. After installing this version the app was having similar issues, with the animation appearing jerky, although it might not have been as bad. Still very noticeable though.

    I am using cordova 6.4.0, java 1.8.0_121, and node 6.10.1. I have also kept my android sdk up to date.

  • Interesting. What plugins were installed from npm the second time ?

  • Here are the plugins that were installed from the build service config.xml

    Installing "cordova-custom-config" for android

    Installing "cordova-plugin-file" for android

    Installing "cordova-plugin-compat" for android

    Installing "cordova-plugin-httpd" for android

    Installing "org.apache.cordova.inappbrowser" for android

    Installing "cordova-plugin-statusbar" for android

    Installing "cordova-plugin-wkwebview-engine" for android

  • > I have performance problems too. I exported C2 project using crosswalk and got FPS around 60. Same project using C3 export got fps in the 50s and stuttered a lot.

    >

    C2 and C3's runtimes are nearly identical, so this is odd. I'd suspect it's random variation or the test mechanism more than Construct.

    Sorry I don’t think I was clear. I imported the project into C3 and created apk using the official C3 Debug Build (without Crosswalk). The performance was better with Crosswalk than without it.

    I also just experimented with live preview and the performance was similar to what everyone is experiencing in this thread. Remote Preview using Chrome browser was very smooth with stable 60 FPS. Creating apk using the debug build, the FPS was in the 50s and stuttered a lot.

    The performance in remote preview in chrome is a lot better than the apk.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)