How do I preload sounds and music correctly on Web(HTML)?

0 favourites
  • 2 posts
From the Asset Store
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • Hi all!

    I have developed a Piano tiles game, however, I am having troubles to make it work with slow internet connections.

    My problem is that the game either takes forever to load (if pre-load sounds is selected), this could be caused by having 300+ small sound files on the project.

    This is what I've tried so far:

    Attempt01:

    Pre-loading all the sounds with the option "Preload sounds" on the project settings. This makes the game take forever to load on slower connections, the reason might be that I have 300+ small sound files.

    Everything else works properly.

    Link to game;

    http://abgadgets.net/HTML5Games-485132/DinoTile-465588/index.html
    

    Attempt02:

    I've tried to pre-load only the sounds of specific songs after they are selected, using a custom loading screen to wait until the preload is complete.

    However, preloading the sounds doesn't seem to work at all, they act with the same delay as if they were never pre-loaded. Also, the "All Preloads complete" condition doesn't seem to be working for me.

    No links on this one since it's not working at all. This is how I tried it;

    Attempt03

    Tried to "Play" all sounds at -300db during the "Loading" screen, then restart the layout. This seems to be working but it's very inconsistent, if the sounds don't play fast enough, they will produce a sound with a big delay after the layout is restarted.

    Here is the example for this one; abgadgets.net/HTML5Games-485132/DinoTile-1212/index.html

    As I mentioned this is very inconsistent and sometimes won't load all the sounds or it will create a big delay between the background music and the keys when starting the level.

    Any suggestions or tips would be highly appreciated!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry for the double post, can't find an option to edit.

    What is the fastest format for sounds on Construct 3? I was using 16-bit WAV and they seem to be converted to WEBM when importing to Construct 3

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