PhoneGap crash at start, is because too much sounds

Discussion and feedback on Construct 2

Post » Sat Mar 12, 2016 3:15 pm

Hi there,
Just found out that Phonegap doesn't tolerate a lot of sounds well (or their size is important, IDK)

I fixed the startup crash by disabling "Preloading of sounds" for the whole project. I think playing too many sounds at once also crashes it still. Will research my hard limit on my iPhone 6

I'm using Phonegap with the new Wkwebview option, and it seems that it's running flawlessly. It might even be faster than Cocoon.IO. If it doesn't turn the phone into a hot brick after 15 min gameplay, then AWESOME!!! :!: :!:

Just be careful with sounds :)
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Sat Mar 12, 2016 3:20 pm

Framerate is half of what it is on Cocoon.io :( Framerate is 30fps on Phonegap with Wkwebview and 60+ FPS on Cocoon.IO. Damn it.

OK another EDIT: 30 FPS seems to be clamped or something. I set it up for low battery mode and it gave me approximately the same FPS when with no low batt in Phonegap. I don't know why this is so. The rendering engine is BEAUTIFUL! we have almost no banding on gradients and it's just delicious. But the game runs on 30FPS for some reason. I'm obviously new to Phonegap.
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Sun Mar 13, 2016 11:18 am

It's good to know that. Could you share with us the procedures that you've adopted? Something simplified if is possible. Are you using phonegap/cordova or phone gap build? I tried to use cordova cli + xcode once and I got so many plugin errors that I gave up. Did you use plugins (ads/in-app/analytics/etc)? I'm very interested in this subject. I've the same issues that you (iPhone heating and draining battery) and I really want to fix them. Thanks in advance.
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Sun Mar 13, 2016 1:58 pm

@RBuster , No plugins whatsoever. Clean slate from that perspective. I exported with cordova and then loaded up the app in the Phone Gap online builder service. That service spit out an .ipa and I just double clicked, loaded up in itunes and tried it out. I made sure to force use the newest version of cordova cli as instructed by Ashley.

Are you using Cocoon.IO and it's draining your battery? My project was melting through the floor before I optimized it. Now it's warm but not explosively so. This thread I started is also loosely relevant to our topic here as-of-today-which-one-is-faster-cocoon-io-or-cordova-wkwebv_t169972
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Sun Mar 13, 2016 2:34 pm

damjancd wrote:@RBuster , No plugins whatsoever. Clean slate from that perspective. I exported with cordova and then loaded up the app in the Phone Gap online builder service. That service spit out an .ipa and I just double clicked, loaded up in itunes and tried it out. I made sure to force use the newest version of cordova cli as instructed by Ashley.


I chose to use cordova cli because I'd have more control but I also had much more work. Did you tried it?

I decided not to use phonegap build because, as I use cranberry's plugins, I'll have to change the cordova to phonegap plugins too, and cranberry games don't support them anymore (actually, I really don't know if Sang continues to support his plugins).

Are you using Cocoon.IO and it's draining your battery? My project was melting through the floor before I optimized it. Now it's warm but not explosively so.


I'm using Intel XDK. My iOS app is running perfectly well (58 fps), but some minutes later the device starts to warm. It doesn't get extremely hot, but its bothers.

This thread I started is also loosely relevant to our topic here as-of-today-which-one-is-faster-cocoon-io-or-cordova-wkwebv_t169972


ok. I'll give a look.
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Sun Mar 13, 2016 8:23 pm

@damjancd I haven't used phonegap too much, but when I had wkwebview set up through intelXDK I noticed the performance was wayyyy better with my game (60fps without any optimization). I've since managed to get canvasplus plus running smooth on an iphone 6, since their audio engine is far superior, but man does the device get hot + drain the battery super fast.

I can probably say if phonegap / wkwebview is crashing it's due to loading too many sounds. Loading your audio files from the sounds folder using webview causes them to be decompressed as .wavs in the device's memory, which takes up a very large amount of memory. Once an iOS app takes up too much memory the OS's response is to close the app, so that's probably why it happens. Canvasplus does not do this as it uses a different audio engine (that supports .ogg at that), but I find the performance is lacking comparatively.
B
37
S
5
G
1
Posts: 155
Reputation: 2,140


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests