Cordova stuttering on Android

0 favourites
  • 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

    Can you narrow down precisely which plugin is causing the choppiness?

  • I definitely think I found the culprit. I once again started with the flappy bird clone from the C3 home page.

    1) I downloaded the zip with the cordova project.

    2) I create a new cordova project from the command line: cordova create birds.

    3) The only plugin with the default project is the whitelist one.

    4) I replaced the www folder in the new cordova project with the www folder from the zip file

    5) I built the app and installed it on my galaxy s6.

    6) The game runs very smoothly using the default chrome web view on my phone.

    7) I changed the package name in the config.xml file so I could install the game with new plugins side by side on my device.

    8) I added the plugin cordova-plugin-wkwebview-engine to the project.

    9) I rebuilt the app and deployed it to my phone.

    Results:

    The game ran smooth without any additional plugins using the default chrome web view, but adding the cordova-plugin-wkwebview-engine plugin caused the choppiness to appear, and it is very noticeable.

  • That's weird, the plugin should only affect iOS!

  • Will exporting to older versions of Android (4.4) be implemented? Exporting only to 5.0 or higher, the game achieves only half of the devices it should reach.

    I already wanted to publish my game that I created in C3. But there are some problems that are holding me back. :/

  • When the plugin gets added it says it's the webview for android in the description as it is being added.

  • Will exporting to older versions of Android (4.4) be implemented? Exporting only to 5.0 or higher, the game achieves only half of the devices it should reach.

    No, but Android 5.0+ already covers over 70% of devices. See this thread.

  • > Will exporting to older versions of Android (4.4) be implemented? Exporting only to 5.0 or higher, the game achieves only half of the devices it should reach.

    >

    No, but Android 5.0+ already covers over 70% of devices. See this thread.

    I do not know if 70%. Well on googleplay the devices that bring my game down by half after I upload a compiled version in construct 3. But you're right to think about the future, I suspected that was the reason to use it only for versions above 5.0.

    Thanks for the answer.

    If it's not uncomfortable. I need some help with this problem. I can not find a solution.

    https://www.scirra.com/forum/error-after-publishing-my-game-on-googleplay_t192381

    I spent all day yesterday learning how to sign an apk manually. And after a lot of work, I finally learned how to do it. But now this problem is preventing my game from working normally. Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rhg1968 Cordova doesn't support platform specific plugins, at least not through config.xml, and iOS requires a few boilerplate ones hence why things like wkwebview are appearing in android. If you request a build with no iOS target from the build server you will only get the android requirements ( which should basically be nothing, unless you have plugins that need cordova plugins ).

  • I did as you mentioned and if I don't include the ios version so that the wkwebview plugin is not included, the android now runs smoothly.

    There is definitely something with the wkwebview for android that causes the issue, but removing the plugin for android definitely works, which can be done command line also if you download the files even if the ios version is included in the build.

  • rhg1968 We're pretty sure one of the iOS required plugins is causing the problem for Android.

    The issue with defining plugins for separate platforms comes from the way cordova parses it's config.xml file, as it will only download plugins for the whole project not individual platforms.

    We generate this file in the first stage of the cordova export, hence if you specify iOS and Android versions in the first prompt you end up with all the plugins. The second prompt tells the build server which builds you would like, and for consistency the server does what cordova does and installs all the plugins for both.

    It's a bit awkward that we could make the server smarter, but people taking the cordova project instead would get different results.

    As we can't modify the way cordova behaves the solution we've come up with is to split the cordova exporter into 2 separate ones: iOS and Android.

  • Nepeo I appreciate all of your feed back. I totally understand the quirks of cordova projects as I develop a lot of cordova mobile apps for my employer. It's just nice for everyone to discuss these issues and how to best work around them. I'm sure it's difficult trying to develop a generic build service that will work for everyone, but what you have made so far is impressive and build very quickly.

    I am just starting my first game in C3, I have developed one other game and released using libgdx, but so far the ease of use of C3 is awesome and much more productive.

    I guess in a long round about way I'm trying to say keep up the great work

  • Unfortunately the stutterings is not gone for me on my Samsung Galaxy S5 Neo, even with the new Cordova exporter. I decided to update my performance measuring for my Tappy Plane app, what I'm doing now is counting the length of every delta time and then showing how many ticks took place in certain delta time intervals. After playing for about 1.5 minutes each on the Cordova exported app and the web exporter running on my server, these are the values I got for the delta time values. Note that it feels smooth when running in Chrome but "mostly smooth with frequent stuttering" using the cordova app.

    Samsung Galaxy S5 Neo

    Cordova

    • 0 - 20 ms: 90 %
    • 20 - 40 ms: 8.5 %
    • 40 - 60 ms: 1.2 %
    • 60+ ms: 0.3 %

    Chrome

    • 0 - 20 ms: 99.5 %
    • 20 - 40 ms: 0.4 %
    • 40 - 60 ms: 0 %
    • 60+ ms: 0.1 %

    I thought that maybe it's just my device that is not powerful enough, so I tried both versions on my wife's Galaxy S4. These are the values on her phone, both the web export and cordova app felt smoothw when playing.

    Samsung Galaxy S4

    Cordova

    • 0 - 20 ms: 98.2 %
    • 20 - 40 ms: 1.6 %
    • 40 - 60 ms: 0.1 %
    • 60+ ms: 0.1 %

    Chrome

    • 0 - 20 ms: 99.5 %
    • 20 - 40 ms: 0.3 %
    • 40 - 60 ms: 0.1 %
    • 60+ ms: 0.1 %

    Note that even though Cordova performance was smooth on her S4 it still performed a little worse than the version running in Chrome even though I couldn't have told them apart without the measurements. Are the stutters gone for everyone else since the Cordova exporter got split into two?

  • we have had a couple of reports of "laggy" behaviour still, thanks for confirming them with some hard numbers! I'm going to have a look through the process, just to make sure the plugins are definitely not being added. If not... well it's going to require some profiling!

  • Add me to the stuttering app problem with C3. I'm using an LG Stylo android device running Android 6.0

    The game does play fine in chrome on the device.. like solid fps.. http://part12studios.com/temp/Games/soaring/ (note this is an older version but you get the idea)

    I'm "glad" to see it's not just my device doing this. I bought this phone recently just to have a newer android device to test with.. only to see it's misbehaving.. that said this phone plays other games fine I refuse to accept that this is just some edge case phone and i need to buy another phone to test successfully...

  • Testing my old https://play.google.com/store/search?q=buildpunkt&hl=en games (CocoonJS) with an S8 most delay problems have been fixed except audio delays.

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