How do I preload all sounds?

Get help using Construct 2

Post » Mon May 12, 2014 1:02 am

The game in html5 doesnt load the sounds until they are played for the first time. Is there any way to preload all sounds in the loading so they are all ready when the game starts?
Image
B
13
S
1
Posts: 74
Reputation: 886

Post » Mon May 12, 2014 1:13 am

Have you tried using the "preload" function from the audio section?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
80
S
12
G
7
Posts: 965
Reputation: 10,750

Post » Mon May 12, 2014 1:39 am

Added a preload for all sounds on start of layout in Loader Layout. It seems to work now, but the game gets stucked in the loading, the "Go to Main Stage" action doesnt work after the loading is supposed to be finished, so i need to refresh the browser to get it to load again and then it works. :S
Image
B
13
S
1
Posts: 74
Reputation: 886

Post » Mon May 12, 2014 1:56 am

Well, as im testing it, sometimes work, sometimes not... sometimes load sounds and not music...
Image
B
13
S
1
Posts: 74
Reputation: 886

Post » Tue Jun 24, 2014 2:32 pm

@Fire Totem Arena

I've the same problem. Did you fix it?
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,058

Post » Tue Jun 24, 2014 3:08 pm

If you want an extreme loading time, then you can preload everything, but I think better practice would be to find an event somewhere before the said sound effects / music triggers. Maybe only preload the absolutely necessary sounds per layout, not everything in one shot.
B
19
S
5
G
2
Posts: 91
Reputation: 4,512

Post » Tue Jun 24, 2014 5:18 pm

I have more than 50 sounds in my game.

When the player in main menu i preload 5 sounds that will play in the start of the first layout.
When the player in the first layout i preload the rest of the sounds.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Thu Jun 26, 2014 10:40 am

It'd be good to have the option to just preload all of the audio as part of the loading of the entire game. I know using this would mean longer overall load times, but not everyone minds that.

The preload thing works, but it's not a very elegant solution - I have a huge block of about 50 sounds preloading on my first layout's event sheet because I don't like the way the sound stutters on first play otherwise, and I have to remember to add them manually to the block each time I add a new sound. Maybe a "Preload All" option or something?
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Wed Jul 02, 2014 8:52 am

Yes, i finally made the game preload all the sounds as a part of the preloader. I prefer a longer loading time than ingame sound lag. It could be good that Construct 2 gives more options to configure the sound loading and the preloader event in general.
Image
B
13
S
1
Posts: 74
Reputation: 886

Post » Sat Jul 05, 2014 12:06 am

Fire Totem Arena wrote:Yes, i finally made the game preload all the sounds as a part of the preloader.


Hi @Fire Totem Arena

Could you tell how you did it?
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,058

Next

Return to How do I....?

Who is online

Users browsing this forum: TRMG and 31 guests