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 xoriuz

was testing play "drop" example games on chrome. i found that after a while the sound will stop forever, and i need to restart browser to fix it.
do anyone have the same problem?
please advice for the solution.

1 decade ago by Arantor

Yes, that's a bug in Chrome and has been for a long time. No fix is currently known, certainly nothing that can be deployed on the scripting side.

1 decade ago by Arantor

Bumping for justice, it looks like it's now fixed in Chrome 17 (current beta branch)

1 decade ago by TigerJ

Thanks for posting this I was about to post the same thing. Seems after several minutes the sound would just crash out in chrome only. Good to know it looks like it may be fixed.

1 decade ago by Arantor

Yeah, it was very frustrating, but I was able to get up to a score of 15k on Drop and play through the entirety of the first level of Biolab Disaster, something I'd not been able to manage before now.

Interestingly, Chrome 16 (Mac) exhibits the broken behaviour for me while 17 (Windows) doesn't. Hopefully when 17 rolls out to Mac, and generally as stable branch, I'll be able to report that it's still the case :)

1 decade ago by momander

Here are the results of my testing with Chrome 17 and Impact 1.19 running on MacOS 10.6:

+ Calling new ig.Sound('song.mp3') does not work as I expected. The Chrome browser makes a request for 'song.ogg' and if that isn't found, no request is made for the mp3 version of the file.
+ Calling new ig.Sound('song.*') also results in a request for 'song.ogg'. If that file is available, it is loaded and can be played in the game by Chrome.

In other words, I am converting all my music and sounds to ogg, at least for the first version of my game.

Hope this helps.

1 decade ago by Arantor

The Chrome browser makes a request for 'song.ogg' and if that isn't found, no request is made for the mp3 version of the file.


I don't believe Chrome supports MP3s.

Calling new ig.Sound('song.*') also results in a request for 'song.ogg'. If that file is available, it is loaded and can be played in the game by Chrome.


That makes sense, you're telling it that there is a file called song, which can be either .mp3 or .ogg and that Chrome should load whichever makes sense.

Meanwhile, other browsers won't accept the .ogg version and require .mp3 instead.

1 decade ago by UltimateBrent

I'm not sure I'd call this a bug, but this is impact's "fault". Since Chrome does support both mp3 and ogg, but ogg is its preferred file format, that's what it is requesting. It does not have the built in logic to fall back if that sound doesn't exist.

The reason this shouldn't matter is that all modern browsers support either mp3 or ogg. There is no standard, but if you have an mp3 and an ogg, then you'll be okay. So you should really do it anyway.

If you&039;d like to change the file format preference, I believe you can do it on line 329 of #impact/sound.js

change
ig.Sound.use = [ig.Sound.FORMAT.OGG, ig.Sound.FORMAT.MP3];

to
ig.Sound.use = [ig.Sound.FORMAT.MP3, ig.Sound.FORMAT.OGG];
Page 1 of 1
« first « previous next › last »