Issues in HTML5 Game Development
June 9, 2011
I have been slacking on my blogging. At the beginning of May, I had several articles planned in which I would catalogue and immortalize all the great times I’d had and people I’d met during my four years at high school. But I had a project I wanted to complete (Infinite Mario in HTML5) and I was still in school and working part time at MetaGeek. Time was short, and after I got out of school it only got worse as I devoted all of my spare time to finishing Infinite Mario, with utter disregard for the rest of my obligations. Anyway, Mario is pretty much done now and the “sprint of epicness” is finally wrapping up at MetaGeek, so I can get back to writing some.
But there were issues.
The State of HTML5 Audio
Currently, HTML5 Audio is disastrous. Hopefully this will soon change, but I must admit I was severely disappointed when I began to implement sound in the game. Perhaps the most irritating problem is the lack of universal support for even one file type. This means you have to include two different formats for each sound file you want to play. Eventually, I had to resort to using the embed element for music, and finally just had to remove the background music altogether due to incompatibility between different browsers and operating systems. I noticed that Firefox 4 generally had the best support for sound. Apparently both Chrome and Firefox have Audio Data APIs now, so there is a light at the end of the of this rather bumpy tunnel, but there’s still a long way to go before I’ll be satisfied with sound support in HTML5. Other issues I had to hack around include the lack of any easy looping method and the inability to have multiple instances of a sound playing simultaneously.
whereas, it could be something much easier to read (and thereby much more intuitive), like:
Of course, this is a bad example to explain my point. Here’s a better example using more complex operations.
(v1 * v2 / scalar) + v3 - v4;
That should just about sum it up, but I haven’t yet tried my hand at a browser-based multiplayer game, and that frontier will no doubt have its crevices of ugliness. But until then, I must admit being fairly satisfied with the state of 2D game development for HTML5. It works and works well... if you’re making a silent game.
blog comments powered by Disqus