Why is there a delay when using "Go to Layout"?

0 favourites
  • 4 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • So I have a main menu with a button "Play". When the player clicks Play the action "Go to Layout: Game Screen" is fired. It happens instaneously in PC. But when exported to Android using CocoonJS, it takes about 3 seconds after touching "Play" to change the layout to the Game Screen. Why is this happening? How do I fix it?

    It also happens when the player dies and touches "Try Again", it takes about 3 seconds after touching it for the game to go to the layout "Game".

    I thought maybe the "on start of layout" of the layout "Game Screen" is causing the delay. But I'm not doing much at start of the layout. I'm just playing a Sound, setting local variables to WebStorage keys and restoring some variables.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You might want to also look at how much data are to be transferred into memory between the two layouts.

    If your game layout is using huge images that need to be read and uncompressed, it's natural that it takes time, especially on weaker hardware.

    Try to post a capx of your project to see if anything can be "optimized" specifically for mobiles.

  • You might want to also look at how much data are to be transferred into memory between the two layouts.

    If your game layout is using huge images that need to be read and uncompressed, it's natural that it takes time, especially on weaker hardware.

    Try to post a capx of your project to see if anything can be "optimized" specifically for mobiles.

    Kyatric Thanks for helping!

    Yeah, there are a lot of large images in the Game Screen layout. Is there a way to preload these images in the main menu layout?

  • Not really (or at least that I know of).

    You'd be better off trying to "optimize" their use as mentioned in this blog article.

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