Android Game (Cocoonjs) - Suddenly closes

Discussion and feedback on Construct 2

Post » Wed Feb 26, 2014 3:19 pm

Hello guys...

Im having a problem with my game for Android. Im using cocoonjs for export the project and the compilation goes well.

But, when I execute the game in my phone, it shows the Ludei screen, then the loading screen and then the application suddenly closes.

I dont know which is the real problem, but I think this is a memory thing.

Can anybody help me please?? Im having this problem for a wile, I have been reading a lot but Im still stuck with this issue...

I have a Samsung S2 whit Android 4.2. The same problem occurs with a Samsung Ace, Motorola Defy and Samsung S3... :(

Thanks!!
B
3
Posts: 8
Reputation: 191

Post » Wed Feb 26, 2014 3:37 pm

Your game is the big project or a small one ?? Do you often test your game via cocoonjs using wi-fi test?? Because i've made about 4 games using cocoonjs and one of my game is the big project and it's run very smooth on my galaxy s2 and galaxy tab 1 , and never close while playing . Maybe you can check your game code again. My big game nearly 30 mb and lot of object and event sheet and it's run fine.
B
50
S
12
G
7
Posts: 259
Reputation: 10,381

Post » Wed Feb 26, 2014 3:48 pm

I had the exact same problem with my first attempt at cocoonjs. I never figured it out. Just got the Ludei screen and then went blank (solid black, non-responsive).

I switched to using Crosswalk which worked but the performance is not what I wanted (42 fps). So I'm switching back to cocoonjs, I'll post if I figure out the problem.
B
4
Posts: 17
Reputation: 259

Post » Wed Feb 26, 2014 3:51 pm

There should be a status info at bottom. It looks like "Approx. download: xxmb memory use: xxxmb". How much are yours?
B
78
S
18
G
4
Posts: 197
Reputation: 7,838

Post » Wed Feb 26, 2014 3:57 pm

Dear farsmile90

Yes, its a big one... but when I export it for cocoonjs, the zip file only have 14MB.

I have been optimizing all the images (originally the size of the zip file was 29MB) but Im still having the same problem...
B
3
Posts: 8
Reputation: 191

Post » Wed Feb 26, 2014 4:01 pm

try to test on a stronger device...
B
31
S
13
G
2
Posts: 752
Reputation: 5,541

Post » Wed Feb 26, 2014 4:15 pm

It sounds like a memory issue. The problem with CocoonJS is that it loads all the assets in the beginning.
B
98
S
36
G
17
Posts: 351
Reputation: 15,953

Post » Wed Feb 26, 2014 6:06 pm

irina,

stronger device than Samsung S3??? I am trying that my game runs in all devices possible... there must be something wrong with my project configuration or maybe with the images... I´m exporting all images in PNG-8 but nothing happens, i have the same result...

robotecollective

I feel the same but in the other way, a lot of users told me that they have been used a lot of images too (even a lot of "on screen images" or sprites) and they have had no problems... :P

thank you very much for your help...

(sorry about my english)
B
3
Posts: 8
Reputation: 191

Post » Wed Feb 26, 2014 6:08 pm

lampcord wrote:I had the exact same problem with my first attempt at cocoonjs. I never figured it out. Just got the Ludei screen and then went blank (solid black, non-responsive).

I switched to using Crosswalk which worked but the performance is not what I wanted (42 fps). So I'm switching back to cocoonjs, I'll post if I figure out the problem.


Thank you lampcord!!!!!
B
3
Posts: 8
Reputation: 191

Post » Thu Feb 27, 2014 12:07 am

That is a perfect symptom of memory management (or lack of).

Devices with 1GB of ram typically only have 500MB or even less free, due to all the background Apps and Services.

CocoonJS can easily load more than that if you have a lot of big BGs, and lots of animations in your sprites. Originally my game crashed on 1gb devices due to loading way too much assets, I had to remove a lot of animations, bgs, and resized them smaller. Then it ran fine, but it was using 450MB of ram!

Same compiled with Crosswalk uses 250MB max. I had smoother performance with Crosswalk as well.

As an example: A 1280 x 720p BG will enter a vram Texture of 2048 x 2048, and require something like 16MB (forgot the maths) of ram for that single BG alone. Now if you have multiple stages, like I did, I had about 25 of such backgrounds!! 16 x 25 = 400MB alone for the BG due to CocoonJS loading everything into vram. I had to reduce the BG to 10 only (160MB). Add in all the sprite animations...

ps. For the record, that is a stupid way to go about making mobile games, never again will I do a single large BG picture.

CocoonJS is great for smaller games, with its support for Ads and Google Store/Apple Store. But bigger more complex games with lots of art.. no go, don't even bother.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests