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

0 favourites
  • 7 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported
  • 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

  • Try taking out all "dt" expressions from your app & it should work .

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

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

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

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