How to reduce the black screen time before the loading layout? (mobile)

2 favourites
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hi everyone,

    I suppose this has been answered numerous times before, but the search feature of the forum seems to be down (I tag you just in case you didn't know Tom ).

    So I would like to know what I am supposed to do to fasten that horrible black screen I have for a few long seconds before the loading screen actually shows up. Should I reduce the size of something (sounds? music? art assets? code?)? Is the downloading something ? Is it because the loading screen is too heavy (I doubt it as I have nearly nothing on it)?

    Thanks for your help!

  • Possibly loading all your sprites into memory for the first layout, if your first layout is heavy (not just the loading screen). Try loading into a blank layout, and then switching to your actual first layout on trigger and see if it makes a difference.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the suggestion, I'll try that. :)

  • Make sure you don'T set "Loader style" to nothing and you should be good.

    Construct has to load the entire engine before displaying your loader layout, but can display loader styles in the meantime.

    You'Re getting a black screen because you selected "loader style: Nothing (Not reccomended)"

    Which is not reccomended.

    What gets loaded during the loader layout is images and stuff not the code

  • Thanks for you thoughts.

    Actually the game's Loader Style is already set to "Progress bar only", and still I have a few seconds black screen before the progress bar shows up (not always, and for one second maximum), THEN only the loader layout is displayed.

    Even on a good smartphone, the black screen time before the loader layout is displayed is around 14 seconds, which is HUGE! I just tried and even though "Progress bar only" is selected, the screen is completely black during these 14 seconds. :(

  • My understanding was that the loader layout was for downloading assets only, such as when loading for the first time off a web page for an embedded html5 export. An exported phone app should not require any downloading at all, as all the assets should already be on the local device.

    The black screen delay is likely loading assets into graphics memory. This can be mitigated by using a more powerful device, reducing the memory load per layout (or first layout at least), or by loading assets during runtime via load from URL (not recommended unless you are comfortable micromanaging your loads). Or all of the above.

    For reference, just in case you haven't seen it yet: scirra.com/tutorials/318/how-to-use-loader-layouts-to-make-custom-loading-screens

  • The link to the tutorial sure gives a hint in the section where it is explained how loading actually works:

    1. The page's HTML and Javascript is downloaded. Since the Construct 2 engine is not even downloaded yet, nothing is shown.

    2. Once the Javascript is downloaded (typically very quickly, since the code is small), the default loader appears. (...)

    Well... Step 1 actually takes 10-15 seconds on a very correct phone for me, yet Google states the following in the core app quality document:

    The app loads quickly or provides onscreen feedback to the user (a progress indicator or similar cue) if the app takes longer than two seconds to load.

    developer.android.com/docs/quality-guidelines/core-app-quality

    Currently, I can't apply to this. Can anyone help ? Is it possible to add something in the code exported by C2 to load something so that the screen is at least not black?

    Does C3 reduce that time where nothing is displayed at all? ( Ashley ?)

  • I've no idea how it could take that long. Are you loading a huge amount of images on the first layout or something?

    If you want engine-level improvements to this, we've done a lot of work to improve both loading times and memory management in the new C3 runtime, so you'd have to update for that.

  • Thanks for the answer.

    The first layout is the loader layout, and there is nearly nothing on it (two small images and some texts).

    It's this one ( healersquestgame.com/gametrailer ) but with even less elements, as the title is not present.

    The next layout is just a splash screen so it's probably not that either.

    I'll think about the C3 runtime, but with so many addons not compatible it will be difficult (and very long) for this project.

  • It looks like you're using an old C2 release, because the exported project still uses AppCache, which we removed in June. Is it better with the latest version?

  • The link I submitted is just to show the loading screen, it's an old HTML5 version. I'm using C2 v.262 for the mobile version I'm talking about.

    As suggested above, I tried to make my first layout blank and see how it goes from there, to be sure the black screen is not due to the loader layout. The bad news is that the black screen time is still 15 seconds.

    Ashley , I've sent to supportzvk@scirra.com a link to download the APK with the first blank layout if you want to test it for yourself. Tell me if you would like the capx of the project.

    Thanks a lot!

  • By far the best way to investigate this is reproduce it in a minimal public project that you're willing to share. You can just fill a project with dummy content so there's no need to share your artwork or anything. Otherwise we run in to all sorts of roadblocks - e.g. I don't think we can debug release APKs, and even if we could, the whole game is compiled with deliberate reverse-engineering protections (because people want them) making it a lot harder to figure out what's going on.

  • Thanks for your help Ashley , I think I figured it out.

    Here's the APK of a project which only has one small sprite, no sounds, but about 7500 big events, which are on an event sheet which is actually never played.

    APK: drive.google.com/open

    I first filled the projects with lots of big images and lenghty sounds, but the loading time was perfectly ok. But as soon as I added lots of events, the black screen appeared for quite a few seconds. Removing the images and sounds didn't reduce the black screen time.

    And here's the capx. You can probably accentuate the problem by adding even more events.

    CAPX: drive.google.com/open

    Is this the normal behavior?

    Is there a way I can reduce the black screen time on Healer's Quest, which is about 40K events?

    I mean... Any other way than removing events... ^^'

    Thanks!

  • I guess it's initialising the engine. I've never seen it taking that long. By now we wouldn't make any changes other than for the C3 runtime though.

  • Ok, thanks for the info.

    Does anyone knows if that black screen could at least be replaced by a given image or something? I guess that has to be done outside of Construct.

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