Is "Audio/preloads complete" event useless?

0 favourites
  • 12 posts
  • Hi everyone,

    I'm making a game for a client. They were slightly unhappy with the browser version of the game because sometimes the song would take a while to load and game would start without it.

    I saw the feature Audio/preloads complete and offered to my client that I could add a loading screen to the game, that would say "loading", and this loading screen would preload all sounds and the music, then disappear and go to the rest of the game once the pre-loads are finished....simple, right?

    Unfortunately, at least on IOS safari the action "preloads complete" NEVER triggers after the first time the game is run, so if someone resets, the game gets stuck in the loading screen.

    Worse still, it seems on IOS safari, the sounds all reload for every frame, so you can't preload them all in a loading screen, as they'll be GONE and need to be re-downloaded as soon as you go to the actual game screen.

    Am I missing something? Has anyone made any use of this event, and if so, how?



  • Hi


    -make sure all audio are stereo (very important)

    -try use lower frequency 22khz

    -before move to next layout, make sure audio preload complete is triggered (for me it will always triggered or try to add wait like 5 seconds before move to next layout as backup)

    -i put music in audio folder, not music folder

    -music try to use less than 30 seconds

    I use audacity for audio editing. So far i dont have issues anymore on audio. Usually i just use preloads event once at warming up layout.

    Clear browser or safari cache and try again

  • Hi tumira,

    Thanks very much for the suggestions...but do you see how this feels like developing voodoo rituals in hopes it fixes the problem? If you we need to use sounds so specifically formatted and placed in only a specific folder in hopes of getting a very basic feature to work, shouldn't these requisites be carefully mentioned in the manual section for the action, AND in the chapter regarding audio in general..for example: WARNING, you must jump through hoops a, b, c, d, e, f, g etc in hopes that the on pre-loaded completed event to hopefully work...

    Because now, best case scenario, I convert, re-export and reimport all my sounds and music and cross my fingers.

    I had purposefully made sure all my sound sample were mono in an attempt to save download time/file-space, and maybe even processor time...they play fine in all browsers/runtimes etc, but now I discover it might be breaking this other critical sound-related functionality...


  • I have 50 sounds in my game.

    And i preload all of them on start of layout, otherwise some sounds will not play during the game.

    I'v suggest before : Preload all sounds.

  • I would highly suggest use stereo sound. I found out it may causes audio issues in Safari. I understand your frustrations.

  • A0Nasser, I do preload the sounds. The problem is, the event Audio/ on preloads completed, does NOT work as expected, at least on the platforms/browsers I've tried.

  • There are three points I would like to add into consideration.

    IOS Safari doesn't do much with the audio until the first touch. This is a Safari browser problem. I'm not sure if this relates to preloading or not. But it might.

    Second. I found that some audio files just don't load correctly the first time. Some times I will have a sound fx that just won't play the first time(or preload). Sometimes I will have a song that won't work the first time. Usually if I edit the song in audacity and cut the first second out it fixes the problem. I have no idea what it is or why. It's really annoying.

    Three. Ashley says in the documentation that trying to preload more than 5 files at time may not work out so well.

  • Thanks so much jayderyu (and everyone else).

    I should have looked at the documentation closer to see the issue with safari on IOS not playing sounds until the first touch, at least knowing this makes it easier to tell what is actually working and now working within the confines of support for the crappy browser.



  • Hi everybody .. I'm just ressurecting this old thread because I'm having similar problems -

    the issue:

    If I use the project setting preload sounds (I.e not the preload you can set in events) the game loads, plays sounds and work correctly. secons (or third for that matter) time i start the game the loading fails and it just stops on the standard scirra load screen....

    If i disable the general preload and preload a few sounds on my first layout/eventsheet it doesn't cause any problems...

    So my question is - does anybody else have this specific problem where the general preload sound doesn't work but preload via eventsheet does work ?

    ahh and just to make it clear - this is on safari - everything works in chrome .. and even on the freaky samsung stock browser...

    2 question - I see that some of you recomend using stereo sounds because mono causes havoc on safari .. is this a confirmed thing ?

  • Kali - try the latest beta, we've made some fixes to do with audio preloading lately.

    Also since the OP is fairly old now, preloading sound effects is now redundant in the latest builds if you enable 'Preload sounds' in project properties.

  • ok thanks i'll try that -

    but just to clarify -

    using the preload sounds in project properties is what caused loading problems in safari... using preload from eventsheet and the other one turned off seemed to work - at least the game stopped having load problems - but i'm not sure any preloading actually takes place. (using stable build 178)

    in the end i ended up doing the following, which seems to be the best solution when i want the game to run fairly well on both android and IOS

    1: preload a few important sounds from eventsheet on start of layout

    2: remove all refrence to sounds in the exported offline.appcache file

    I'll try making a build with the newest BETA build and see how that behaves .. I'll post an update here

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok -

    I tried exporting with the BETA 180 build with the following results

    Used preload sound from project properties - and that seemed to work well on safari .. sounds were playing instantly and so on...

    first time i ran the game everything worked smooth and no problems.. but.. when i try to reload the game it gets stuck again while loading..

    I tried editing the offline.appcache again, deleting any reference to the sounds and viola´no loading problems again no matter how many times i reload the game.

    so it seems that the main problem lies there.

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