How do I set up a loading screen to wait for sound preloads

Get help using Construct 2

Post » Fri May 30, 2014 9:43 am

Hi, this seems like a simple question, but all common sense approaches seem to fail...

I created a frame, and simply used the "all preloads finished" event, with the action: go to splash screen

works great the first time, it seems, but NOOOOOOOOOO once it goes to the splash screen apparently all sounds have been cleared from the memory they were just loaded into.... why? :(

Even worse: When you click the refresh page icon in your browser, the loading screen is stuck in infinite loop because it thinks the sounds are already in memory ,therefore the on preloads finished event NEVER triggers!

Has anyone else found the answer to this?

I need a universal solution that will work on all devices, all browsers, and as an APP (cocoon js)

thanks,
Mike
B
49
S
9
G
4
Posts: 425
Reputation: 7,037

Post » Fri May 30, 2014 10:09 am

The sounds not loading after may come from the offline.appcache exported file (removing the sounds may help, but I think it is not the best solution)

The better way would be not to preload everything like that, but more preload just before you need.

I ve also saw that sounds seems to not stay on memory on mobile html, you could eventually try to play the sound in a silently manner, so it is actually in memory, then to restart it with a louder (audible) volume.

Also some phone (mine at least) refuse to play sounds for a reason, I think it needs sounds to come from a touch (which effectively sucks...), but my phone is a low end device that should not be targetted.I even wonder how my games runs at a 20 fps on it.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri May 30, 2014 11:31 am

Hi Aphrodite,

Thanks so much for mentioning the offline.appcache file. . I never paid any attention to it before, but opened it in a text editor, deleted the sound files from the list, and re-oploaded just that offline.appcache file.... the sound loading screen now works mostly as intended!

It still seems to completely reload the sounds at the start of each frame, which is very unfortunate, I guess the only solution is to add a loading message to every frame instead of the start of the game.

cheers,
Mike
B
49
S
9
G
4
Posts: 425
Reputation: 7,037


Return to How do I....?

Who is online

Users browsing this forum: Colludium, fnfhjfdbdjbfbfd, plinkie and 24 guests