0 Favourites

Android Game (Cocoonjs) - Suddenly closes

  • 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!!

  • 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.

  • 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.

  • There should be a status info at bottom. It looks like "Approx. download: xxmb memory use: xxxmb". How much are yours?

  • 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...

  • try to test on a stronger device...

  • It sounds like a memory issue. The problem with CocoonJS is that it loads all the assets in the beginning.

  • 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...

    thank you very much for your help...

    (sorry about my english)

  • 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!!!!!

  • 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.

  • Silverforce,

    Thank you so much for your answer.

  • Large images will break CJS. CJS in theory handles 2048x2048, but your better off capping at 1024x1024.

    My big game is 120mb and will not run on CJS at all . I have no idea what it is unpacked.

  • > 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!!!!!

    I managed to get a test ap working with cocoonjs but not my main ap. That makes me think it is a memory problem. I'm going to try reducing the size of my images and porting my game from 1280 x 720 to 800 x 450. I think that will make a huge difference.

  • >

    > > 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!!!!!

    >

    I managed to get a test ap working with cocoonjs but not my main ap. That makes me think it is a memory problem. I'm going to try reducing the size of my images and porting my game from 1280 x 720 to 800 x 450. I think that will make a huge difference.

    Excellent!!!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Just curious, are you using the debug build or the release build and signing it yourself? If you are using the release build, give the debug build a try, the issue might be your signing or byte aligning.

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