Jump to content

Sound and Music in html5 games


Recommended Posts

Can i use each sound per separate file or need unite all sounds into one file - "sound sprite"?


Yes, the example is called an 'audio sprite': http://examples.phaser.io/_site/view_full.html?d=audio&f=audio+sprite.js&t=audio%20sprite


And is enough to use only ".ogg" format?


No, to support all current browsers you will need to use mp3 or AAC (mp4/m4v) as well, though there has been discussion about mp3 being problematic from a licensing standpoint. It's a bit of a minefield - but there's a detailed (and slightly difficult to work out) guide here: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...