The state of Audio in HTML5 Games

HTML5 Gaming for desktop and mobile is a very trendy topic these days. The performance of canvas applications is getting better and better each day and technologies like CocoonJS or Ejecta even enable a close to native performance for canvas applications on mobile devices. – But what about audio? Is it really that easy to implement sound with your html app?
This article features some interesting points that I collected while researching for my eBook ‘From Zero to the Appstore’.

Audio != Audio

While most browsers and devices already do support audio in general, that doesn’t mean you can just play any audio file in any modern browser. The following table briefly lists the support for Audio-codecs.

Continue reading

Quickfix to enable touch of EaselJS-DisplayObjects in CocoonJS

So while on the Stage touch is working for EaselJS in CocoonJS, it is currently not possible to touch individual EaselJS-DisplayObjects in CocoonJS. I wrote a quick fix for that, in case anyone else needs it.

Download: easeljs_cocoonjs_touchfix.js

How to use: Download JS-fix and implement it through a script-tag somewhere after the EaselJS-script-tag and your done!

Hope this helps someone, comment for any issues,cheers!

“Can you make that loading screen stay longer?”

Or in other words: When everything that can be wrong with a client is wrong! – The client had already made a couple requests that seemed odd or made no sense in my eyes, but this one really sums up the nature of this client in one word.
I’m currently working on a Phonegap App and the client’s latest request was to add a loading-screen to the app(not for initial loading), so we added a loading-screen.
We didn’t think that one was necessary, but okay…the client wants a loading screen, so he gets one. Don’t get me wrong here, it’s not a splash-screen, it’s really just a loading-screen: a white screen, that says “loading…”
But it didn’t stop there: When he saw the thing implemented his reaction was like: “It dislays for less than a second, that makes the loading-screen seem kind of pointless. Can you make it stay longer?”

Long story short: This is probably the most senseless piece of code I have ever written and most likely will ever have written:

EaselJS Pixel Perfect Collision Detection for Bitmaps with Alpha Threshold

I just finished the first version of a pixel perfect collision detection for EaselJS Bitmaps and BitmapAnimations.
Get it from Github: https://github.com/olsn/Collision-Detection-for-EaselJS

Here is an example (play around with the alpha threshold and toggle the detection mode):