CocoonJS HELP ASAP!

Discussion and feedback on Construct 2

Post » Wed Mar 26, 2014 2:47 am

I exported my game using the CocoonJS option. I then copy the zip file onto the CocoonJS app on my iPhone through iTunes. Whenever I try launching the game on my iPhone, the screen goes black for 5 seconds and then the CocoonJS app crashes. What could the problem be?
B
3
Posts: 5
Reputation: 185

Post » Wed Mar 26, 2014 4:09 am

How big is your game? Whats the memory use in Construct 2? Because for CocoonJS, multiply whatever memory use in C2 by about 4 and thats what it uses on mobiles.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Wed Mar 26, 2014 4:15 am

I feel your pain, the best solution is to not use CocoonJS as I had similar problems:

https://www.scirra.com/tutorials/907/de ... e-easy-way

It's not a viable long term solution.
Epic Space Online - Google it!
B
34
S
10
G
5
Posts: 165
Reputation: 6,697

Post » Wed Mar 26, 2014 6:36 am

I'm working with the OP on the game. I took a screenshot of some of the warnings that we receive while trying to unzip and here are the ones that we encounter (not too sure if it make diagnosing the issue any easier):

Not implemented canvas addEventListener:
webglocontextrestored
Not implemented canvas addEventListener:
webglcontextlost
Not found getElementByld: c2canvasdiv

The game doesn't even make it to the loading screen. We did insert a custom load screen logo (but I don't think that is our issue....)

I believe our file is something close to 20MB
B
2
Posts: 3
Reputation: 158

Post » Wed Mar 26, 2014 6:44 am

How much memory does it use? What device are you trying to run it on?
Image
B
98
S
36
G
17
Posts: 351
Reputation: 15,953

Post » Wed Mar 26, 2014 6:57 am

Well, unzipped , the file was around the 22MB mark, we've been testing it on the iphone5/5c . An earlier build (which was under 5MB) works just fine.


The only other 'memory-eater' in our game is our high-score board, which uses local storage.
B
2
Posts: 3
Reputation: 158

Post » Wed Mar 26, 2014 7:01 am

Do you have an image bigger than 0.5 MB?
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Wed Mar 26, 2014 7:14 am

Hmm, ok. iPhone 5 should definitely be enough. You could try to remove objects one at a time and see what's really causing the freeze as you have managed to get it working earlier. Hope you get it running soon!
Image
B
98
S
36
G
17
Posts: 351
Reputation: 15,953

Post » Wed Mar 26, 2014 9:43 am

It's not the file size but the memory usage.

Compressed PNG 8bit or JPG don't use much filesize, but once they load into memory as a texture, they become massive. A blank 1280 x 720p sprite for example, is probably a 1kb JPG, but its actually a 16MB texture in memory due to being placed into 2048 x 2048 texture.

My Ninja game is only 17mb exported but CocoonJS loading all the assets into memory = 450MB into ram on start, crashing devices with 768MB or less ram.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Wed Mar 26, 2014 1:32 pm

Are you using any 3rd party plugins?
B
101
S
32
G
12
Posts: 1,549
Reputation: 21,993

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests