SoundJS 0.5.2 Audio Plugin for CocoonJS 1.4.7

I just updated the CocoonJSAudioPlugin.js to work with SoundJS 0.5.2 and CocoonJS 1.4.7

Download: CocoonJSAudioPlugin

How to use: Just put the CocoonPlugin as the first entry to register and you can use everything else of the SoundJS-library just as is in CocoonJS now.


Playing the same sound multiple times parallel/overlapping: You will have to set the maximum number of parallel sounds in the register-method:

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

“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:

iOS html5 performance issues #2: scrollpanes and hardware acceleration

Don’t try to force hardware acceleration on elements that are placed on a touch-scroll-pane! …and here’s why:

I personally love the  ‘-webkit-overflow-scrolling: touch’-feature as it allows you to implement a scroll pane for mobile devices with just writing two lines of css and no need of hasseling around with JS to make some content scroll smooth ect., however this approach also comes with a drawback: hardware acceleration will cause performance-issues on iOS (maybe other mobile devices, though it was only tested on an iPad2 running iOS6)

In my last post I was writing about forcing html5 hardware acceleration on iOS6, turns out you do NOT want to do that on every element as this can also cause the performance to drop, pointed out by the following example:
Continue reading

iOS6 html hardware acceleration changes and how to fix them

As probably many developers have already experience this over the past weeks:
I had a phonegap application for iOS that contained some visually animated components  (a coverflow or a carousel for example). But after updating to iOS6 this is all flickring now and it feels horrible because it’s just stumbling and faltering on the new version of the OS.
There are several reasons for this and I cannot say which were already there in iOS5, however here are the two main reasons and instructions on how to fix that: Continue reading