Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Ant101

I've noticed that in chrome, my ogg files are being requested multiple times when the game is loaded (up to 8 times!).

These requests also don't seem to be completing properly - many of them are showing status as 'pending' or '206 partial content'.

This isn't just happening in my game, it's also apparent on the biolab disaster game. Here's a screenshot showing the problem when loading the biolab game:

http://imgur.com/qBEkmv6

Any ideas why this is happening?


Versions:
Chrome: 24.0.1312.56 m
Windows: 7 Pro 64bit

Not sure about FireFox at the moment, will check and report back.

1 decade ago by Krisjet

I noticed the same problem. Dom pointed me to an article he wrote years ago: http://phoboslab.org/log/2011/03/multiple-channels-for-html5-audio

Seems to be a browser bug, but if you find a solution post it here!

1 decade ago by svenanders

Yeah, had this problem last week where my music files was downloading several times. I managed to solve this by preloading them in the Title definition. I notice that the sound effects still do this, although they're very small, so it's not such a major issue. I'm guessing it could be solved in the same way.

1 decade ago by Ant101

Thanks Krisjet and Svenanders.

Svenanders: That sounds interesting - please could you eleborate? E.g. what tag did you use in the title? And how is this with the .ogg/.mp3 duality?

This is big issue for us as it seems that the cache headers are being ignored, and that the sound files are being pull down the wire every request. Since the sound files are pretty much the biggest resources, this will costs us $.

1 decade ago by svenanders

Sure, for http://play.svenardo.com/whopac/

GameTitle = ig.Class.extend({
l1: new ig.Sound( 'media/sound/victoryFanfareMain.*', false ),
l3: new ig.Sound( 'media/sound/iAmTheDoctor01.*', false ),
l4: new ig.Sound( 'media/sound/usefulStriker.*', false ),
init: function () {
ig.music.play("l3");
},

And then I swith between the tracks by referring to either l1,l3 or l4.

I tried other methods of loading the music files, but it inadvertently lead to them being requested and downloaded multiple times.

I haven't tried doing this with sound effects. I can see in the timeline that they're requested several times, but they're small and cached after the first request, so I didn't consider it a problem (the music was though, as a slow connection lead to javascript errors on the first load).
Page 1 of 1
« first « previous next › last »