Can't switch layouts on CocoonJS Signed APK [SOLVED]

Bugs will be moved here once resolved.

Post » Sat Aug 09, 2014 10:28 pm

Problem Description
I'm not sure if this is a genuine bug or a result of something I've scripted wrong, feel free to delete this post if it turns out to be the latter. As it stands, when exporting my Capx to cocoonjs and compiling, the game launches, but when I tap the start game button, the game is meant to load the next layout, but instead, nothing happens. To further diagnose the issue I changed the default layout from the main menu to the game itself and re-exported; the game played fine but when I attempted to return to the main menu or restart the game, nothing happened. Interestingly enough, this problem does not appear to manifest when launching the game from a zip using the cocoonjs launcher.

Attach a Capx
https://drive.google.com/folderview?id= ... sp=sharing
The above folder contains a link to the Capx as well as the signed APK and zipped CocoonJS export


Steps to Reproduce Bug
  • Launch zip file with CocoonJS Launcher
  • (after the countdown has finished) Press the pause button
  • Attempt to restart the game or switch menus, observe that the game allows you to do so.
  • Install the signed APK and attempt to carry out the above instructions

Observed Result
The game does not respond to the restart and quit button, but still allows you to unpause

Expected Result
If the restart button was pressed, the game should have restarted

Affected Browsers
  • None. This problem only happens on device

Operating System and Service Pack
Windows 7 64 bit

Construct 2 Version ID
173
Last edited by dmakinde on Mon Aug 11, 2014 9:54 pm, edited 1 time in total.
B
5
Posts: 29
Reputation: 733

Post » Sat Aug 09, 2014 11:59 pm

Try taking out all "dt" expressions from your app & it should work .
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Sun Aug 10, 2014 12:14 am

I attempted this and it still didn't work :( when you say dt expressions does that also include every tick and every x seconds events?
B
5
Posts: 29
Reputation: 733

Post » Sun Aug 10, 2014 12:46 am

Oh damn, yeah I meant "dt" expressions only. Looks like your using "on touch" - text objects -to trigger other layouts, try replacing those text objects (retry,restart,resume) with actual sprites or buttons (With collision enabled) . Reason being because I don't know if CJS recognizes text objects as "clickable" since they don't have any collision settings .
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Sun Aug 10, 2014 7:31 am

I don't think the recognition is the issue here, the clicks are definitely being detected, it's just something is going wrong whenever the game attempts to switch layouts. Never the less I changed the play button on the main menu to a sprite and still no dice :( the strange thing like I said before is the project works flawlessly when testing it on the coconjs launcher. I'm at my wits end here :(
B
5
Posts: 29
Reputation: 733

Post » Mon Aug 11, 2014 2:23 pm

Please do not follow @EyezWidee's advice, dt is likely unrelated to the issue and removing it will have other adverse effects on the game.

I'm afraid this is probably a bug in CocoonJS so you will need to report it to Ludei.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Mon Aug 11, 2014 9:50 pm

Hey Ashley, I did some more experimenting and after consulting Construct2s own guide on optimising games for mobiles I realised I made a rookie mistake: one of the placeholder art assets I was using was a massive background image that I implemented as a tiled texture until the artist I was working with could produce something for me. Deleting that image from the project caused the game to run perfectly :) I'm still confused as to why it worked when using the launcher from the cocoonjs zip but not on the APK but I guess that has something to do with the way things are loaded. Ah well haha lesson learned. Thanks for the assistance none the less!
B
5
Posts: 29
Reputation: 733


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests