Problems with custom loading bar - instantly stuck at 100%

0 favourites
  • 4 posts
From the Asset Store
This sound pack comes with 100 high quality, ready-to-use sound effects for all kinds of games.
  • Hello,

    This thing has been bugging me a long time now.

    Sometimes it loads from 'scratch' and at other times, my custom loading screen/bar is instantly at 100% and stays there forever. While it should normally load in chunks and you actually normally see it loading that way.

    Here's how the loading event sheet looks like:

    In incognito browser the same thing occurs.

    Everything's set - Settings:

    First layout: Loader

    Use loader layout: Yes

    Loader style: Nothing

    Preload sounds: No

    Sometimes I try again changing some of the settings but then I don't see any change.

    Other times you press, F5, or ctrl+F5 and it works, other times it doesn't help.

    I get this problem when previewing from C3, but also when I uploaded the game online and checked it in my browser. Even tried incognito, it works the first time, but if you hit F5 it will be stuck forever as well.

    The only that helps is closing the browser, or at least for incognito and load it up again.

    Is there something with my PC, or does anyelse experience this? Might not even be related to C3..?

    I use Google Chrome by the way.

    Anyone got any ideas? Thanks.

    Tagged:

  • I suspect it's because you set AudioPreloaded to 1 in the first event:

    If your game has fully loaded once before, it won't trigger event 1 again because loading progress will already be at 100% so AudioPreloaded will remain at 0.

    You can ensure all sounds are preloaded whilst the game is loading by ticking "Preload Sounds" in Project> Properties>Startup, so you won't need to preload them manually in the Loader Layout. This is fine if you only have a few sounds to load, but if you have a lot of sounds and only want to load a selection of them to keep the initial load quick, then use the manual preload actions.

    You can simplify as follows:

    dropbox.com/s/z10homwhvtsrkn6/audioLoader.c3p

    Wait until the loader has completed, then preload the audio, then progress the layout when the audio is complete.

    I've added some debug text and waits so you can see the progress when running it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! What you said makes sense. I didn't expect it to behave that way, when you refresh the page - I guess it takes the game from the browsers cache? I expected it to load it 'as new' when refreshed. I suppose that's why closing en reopening the incognito browser works for trying to load the game again. As it automatically cleares cache?

  • I think that's pretty much the size of it - if the game has been loaded once it doesn't need to be reloaded, even if you refresh the page. If there are updates to the game I believe it will automatically download in the background, although I'm not sure if that always retriggers the loader the next time the game is run. Don't quote me on any of that though! :-)

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