"Preload sounds" question

Not favoritedFavorited Favorited 0 favourites
  • 4 posts
From the Asset Store
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • Hi.

    Is there a way to preload all the sounds in the Sounds folder without writing all their names? I have about 30-40 of them.

    The reason I'm asking it's because I want to do this after the game loads into the main menu.

    I am creating web games and the initial download size is very important for me.

    It would be really helpful to be able to preload all the sounds in a folder/subfolder just by selecting or naming it.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just check 'Preload sounds' in Project Properties, and it does that for you while loading.

  • Just check 'Preload sounds' in Project Properties, and it does that for you while loading.

    If I check the "Preload sounds" in Project Properties the initial download size of the game is 600KB.

    If I uncheck it the initial download size is 72KB.

    This is a big difference and counts a lot for web games.

    My question is how can I preload all the sounds in the Sounds folder without writing all their names? Because I want to do this when the player starts the level not when he is in the main menu.

    Thanks!

  • Well, if you want to preload them on the main menu, then you still download 600KB before the game starts. The only difference is when you download them. If you enable offline support, everything will be downloaded on startup anyway in order to save it for use offline, so in that case it's a moot point.

    Construct doesn't currently have a way to automatically preload all sounds, but I'm not sure if it really needs one. If you want to start the project running sooner before downloading everything, a loader layout is probably a more effective solution, as that can start the project running before all images are downloaded, and usually the project images are the majority of the download size. If your main menu is a single layout, then you can make that the loader layout, so then you can show the menu before the entire project has finished loading.

    Besides these days 600KB is a small amount of data. Loading the Apple homepage is a 10 MB download. Even on cell data, with a half decent connection it'll probably add less than a second to the load time.

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