Vivern Posted May 20, 2014 Share Posted May 20, 2014 What advantages give audio sprites in html5 games (whether necessarily)?. Download speed will be faster sounds, what else? Link to comment Share on other sites More sharing options...
rich Posted May 20, 2014 Share Posted May 20, 2014 Audio Sprites are generally a 'hang over' from pre-Web Audio days, where they were literally the only way to have multiple sound effects / music in a game. However they're still pretty useful even for web audio playback, as it means less http requests and mostly retains compatibility with older devices that still don't support Web Audio, or browsers like IE that don't at all either. Link to comment Share on other sites More sharing options...
Vivern Posted May 23, 2014 Author Share Posted May 23, 2014 Thanks. Another wanted to clarify.How to do a check:If( device support WebAudio ) { Play background music + play game sounds (click, explodes, etc.)} else { Only play background music}? Link to comment Share on other sites More sharing options...
rich Posted May 23, 2014 Share Posted May 23, 2014 if (game.device.webAudio) {...} Link to comment Share on other sites More sharing options...
Recommended Posts