Why you shouldn't use MP3 in your HTML5 games

1
Official Construct Post
Tom's avatar
Tom
  • 16 Dec, 2011
  • 755 words
  • ~3-5 mins
  • 6,735 visits
  • 0 favourites

We are sometimes asked how to make an MP3 play in a game made with Construct 2 or how to import MP3s into Construct 2 itself. We don’t allow it for a very good reason – the MP3 licensing fees.

The state of audio in HTML5 games and apps

If you’ve read our previous blog entries (here and here) you will see that audio in HTML5 is a real can of worms. Playing back audio at the moment is difficult partly due to the patchy format support in browsers. Despite the fact Ogg Vorbis is the ideal format for the web, Internet Explorer and Safari don’t support it.

Looking at the compatibility charts it might seem that the best combination of audio formats to support all browsers would be Ogg and MP3. However, using MP3s in your games could lead on to some tricky licensing issues that could possibly expose the game author to hefty fees.

The fact some people ignore the rules does not make it legal or morally justifiable. MP3 is patented technology and they can set the conditions for use as they see fit.

The MP3 license

The MP3 licensing website states at time of writing that an MP3 license will cost US $2,500 per game title. In their own words, a game is described as:

“Interactive software products intended to interact with a user for entertainment (action, role play, strategy, adventure, simulations, racing, sport, arcade, card and board games) and/or education, that may be published for multiple machines, platforms or media”

There is a small saving grace:

“No license fees are due if less than 5,000 copies of a particular game title are distributed”

Distribution of a particular game is not exclusive of web distribution! Take one of our most popular arcade games for example, “8 Bit Runner”. To date it’s far surpassed 5,000 plays. In their eyes this could easily qualify as 5,000 distributions. Had the author used MP3, they’d then be due to pay the MP3 licensers $2,500 for a small online game.

Not only are we worried, but we’re worried on behalf of our users too. 5,000 plays on the web isn’t actually too difficult to hit if you publicise it in the right places. So it’s a risk we don’t want to impose on Construct 2 users. This is why we have deliberately made it hard to use MP3s in Construct 2.

It would be a mistake to look at an organisation like MPEG as a passive and friendly giant. Times can change and management can change. MPEG’s strategy can change. It’s something you don’t want to take a chance on.

If this is irritating, don’t forget you can thank Microsoft and Apple for helping cause this headache by not supporting Ogg Vorbis in their browsers!

A better alternative

Fortunately Internet Explorer and Safari both support an alternative: MPEG-4 AAC (sometimes known as “MP4”, the successor to MP3). AAC is better than MP3 – it can produce smaller files that also sound better. Despite this, the license allows unlimited distribution in games without any fees whatsoever. So not only are you free from fees, it’s actually much better as well – so there’s no reason at all to use MP3! MP3 sounds worse and could cost you a lot of money, so Ogg and AAC are the best formats for a HTML5 game to cover all browsers.

Other tools

Importantly, Flash is seen as equal to HTML5 in the MP3 licensing rules. The same applies to using MP3 in Flash games. We’ve noticed some other game creation tools (for example) make it easy to use MP3 audio. You should be careful when publishing games in those tools – you have to watch your play counts very carefully to know your safe, and often it’s difficult to accurately measure it. On the other hand, using Ogg + AAC like in Construct 2, you can rest assured you’re safe.

In summary

For full browser audio coverage Ogg + AAC are the two formats you should use. It’s inefficient and also pretty ugly to have to export games with two audio formats but at least the browser will only ever download the file it needs and not both so from the players point of view there’s no problem.

MP3 is an expensive format to use in games. We currently highly recommend people don’t use this audio format in their HTML5 games and hope this blog post clears up any confusion as to why we don’t support MP3 in Construct 2.

Subscribe

Get emailed when there are new posts!