Game not switching layouts on CocoonJS APK? [SOLVED]

Get help using Construct 2

Post » Sat Aug 09, 2014 8:48 pm

Hi Guys, I have a strange problem with my game so far. For some reason while the game performs perfectly on my PC, when I compile the project and create a signed APK to test on my android device, I can't get past the menu screen.

To further diagnose the problem I changed the first layout option on the project properties from the main menu to the game proper and after compiling that, I was able to play the game just fine but was unable to restart the game (which was a restart layout function) or go back to the main menu (Switch layout function). The strange thing is this problem only seems to occur when the project has been compiled into an APK. Testing the zip using the CocoonJS launcher yields no problems at all :S

Can anyone help?

Thanks
Last edited by dmakinde on Mon Aug 11, 2014 9:55 pm, edited 1 time in total.
B
5
Posts: 29
Reputation: 733

Post » Sat Aug 09, 2014 8:49 pm

Use Intel XDK (Crosswalk) instead. It works just fine.
B
34
S
9
G
3
Posts: 493
Reputation: 4,067

Post » Sat Aug 09, 2014 9:35 pm

Is that the only way to get it working? Crosswalk's performance seems to be quite laggy compared to cocoonjs :(
B
5
Posts: 29
Reputation: 733

Post » Sat Aug 09, 2014 11:43 pm

Sorry to bump this, but I may have found some more information on why the layout won't switch on cocoonjs. made a simple two layout project with a button to tap that switches between layout and that worked just fine. Could my game's inability to switch layout have to do with too many files being loaded at once or something like that?
B
5
Posts: 29
Reputation: 733

Post » Sun Aug 10, 2014 6:30 am

Try exporting with crosswalk to help identify the problem. If it's working with crosswalk it means that there's compatibility problem between what you are using and cocoonjs. If it's not working in crosswalk, it means there's something wrong in your cap.x that makes it not work on mobiles (ex: something wrong with the touch object)
B
18
S
4
Posts: 87
Reputation: 1,199

Post » Sun Aug 10, 2014 7:41 am

Hi Remus, I tested the game out using crosswalk and it seemed to work (albeit at a much laggier rate) but I must admit, I'm not very familiar with the wrapper so I'm not really sure how to do basic things like deploying a signed apk to test on my mobile or get rid of the status bar to make it feel like a normal game (if resources exist on how I can do that, please point me in the right direction) and given the fact that the game works fine on the cocoonjs launcher and not on the APK I'm not sure if there's a compatibility issue with crosswalk. If anyone wants to take a look and see the problem for themselves here is a link to the Capx, the CocoonJS signed APK and the CocoonJS zip.

https://drive.google.com/folderview?id= ... sp=sharing

If anyone can take a look and help me diagnose the problem I would be so grateful!
B
5
Posts: 29
Reputation: 733

Post » Mon Aug 11, 2014 9:56 pm

Found the solution! I turned out to be caused by a massive tiled texture image I used as a placeholder. Deleting to from the project solved it :)
B
5
Posts: 29
Reputation: 733


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, Blendi1223, dop2000 and 46 guests