HTML5 game framework, web audio and a new (old) game

I’ve spent a good amount of time lately working on my HTML5 game framework. It’s starting to pay dividends.

I think the thing I am most thrilled about is the support for Web Audio. Thanks to a bunch of great sites and their articles getting up to speed with producing sounds for the games has been a breeze.

I heartily recommend this site for a great introduction to the API: http://www.html5rocks.com/en/tutorials/webaudio/intro/

I currently support 3 files types: OGG, WAV and MP3. OGG files are generally larger than the other two. Generally speaking I aim to get the game code and assets in to 500k. For all audio I aim to use no more than another 500k such that the game fits in to 1Mb. Downloading a 1Mb game outside of WiFi isn’t a problem in 2012.

For the soundtracks that run through the game I use a very fine composer and old school buddy. You can find his work on SoundCloud. We grew up listening to the awesome music of Rob Hubbard on classics such as Sanxion. I can’t tell you what it means to us to be able to reproduce the arcade thrills and wonderful game music from almost 30 years ago.

Audacity logo

For the creation of sound effects I use Audacity. A wonderfully simple tool to use yet extremely versatile and rich with features. You will need a couple of plug-ins to export to different formats but the application will guide you through this.

As a source for my sound effects I fire up MAME and record the audio of a few games. Armed with a WAV file I launch Audacity and start to tweak the sounds until I’m happy that a) it sounds nothing like the original and b) it fits the game.

This is probably copyright hell but just now I’ve not used the work commercially. Most likely by the time I get to use production quality sound effects I will have commissioned them.

Adding sound and music to games is in many respects the final hurdle. Mobile web games have been largely mute this last couple of years. It’s just awesome to be able to offer rich multimedia gaming experiences.

I look forward to presenting my next project, Crossfire, in the next couple of weeks.

Leave a reply