[Answered] How do I make sure all audio preloads?

Get help using Construct 2

Post » Thu Jan 30, 2014 11:04 pm

Hi there,

So I understand that C2 does a good job of allowing games to preload and allows audio to stream and / or download to help spread out the download bandwidth and even helps prevent downloading files that are not needed when using the browser..

that said, I wonder how I could simply force all audio and visual assets be downloaded before the first scene is visible for the player to interact with.

I've done some initial testing and even just running the game local on Chrome, there is a delay before some of the sound begin to sound off and I really would like to not see that if at all possible.

Yes this would mean a longer download and yes it would mean downloading assets that might not get used, but if i have a small game with a few big audio files and want the snappiest first impression, having this ability to not load the first scene till everything is 100% would be really great and I don't see where I could make this occur.

Thanks,
Calebpart12studios2014-02-01 16:33:59
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Thu Jan 30, 2014 11:29 pm

manual-audio

Look for 'Preload' and 'Preloads complete'.

Images are preloaded.
ImageImageImage
B
71
S
22
G
257
Posts: 3,790
Reputation: 142,696

Post » Fri Jan 31, 2014 12:42 am

ok i found the all preloads complete..

how does this sound?

i have all of scene 1 conditions require the all preloads complete.. including a black sprite which covers the screen.. and it is destroyed (or fade out if i wanted to to be smooth about it) when that condition is met which would would keep everything feeling like it's intentionally being delayed till all the audio is loaded

Thanks
Caleb
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Fri Jan 31, 2014 12:52 am

That's fine. You also need to block any input, as the player could randomly click the 'black' screen, or press keys, and trigger events.
ImageImageImage
B
71
S
22
G
257
Posts: 3,790
Reputation: 142,696

Post » Fri Jan 31, 2014 2:56 am

yea thanks for the tip.. I did that, but it was easy being the first screen only has one input.

Thanks!
Caleb
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Mon Jun 09, 2014 9:34 am

From my experience, "all preloads complete" condition is not working as it should. I made a loader layout with the contition that when "All preloads complete = true" -> wait 3 sec go to next layout. On my next layout I have a background music that should play...but instead It has a delay of 5-10 sec (The file size is 1.5 MB). From what Chrome dev tools is showing on "Network" analyzer, background music and all other sounds are still being downloaded while "All preloads complete" is set to true. That is not right. Sometimes I think of C2 as a quantum apparatus, behaving just like a random device. But Ashley always say..."This is by design"..cannot argue with that, can I?
B
84
S
21
G
23
Posts: 521
Reputation: 18,789


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 8 guests