By Paul Bakaus on Wednesday, November 2nd, 2011 9:42 AM PDT

After revealing Zynga’s first open source projects in HTML and JavaScript, I’m pleased to announce the third addition to our collection: Zynga Jukebox, a high performance sprite-based sound manager for the web.

Zynga Jukebox was formally announced during my keynote at the New Game HTML5 conference in San Francisco today, but here’s some more background on why we set out to create yet another manager on top of HTML5 Audio.

Doing audio in HTML5 is crazy hard — like, trying-to-lick-your-elbow hard. Not a single codec supports all browsers and many browsers and devices come with huge performance bottlenecks when creating new instances of sounds. Then, there’s these weird limitations like on iOS: No multi-channel sound and playback must be activated through a user action (e.g. a touch event). All of this leads to great frustration, in particular if you are trying to make a game. Read: we need it more than anyone else.

In attempt to ease some of the pain, we created the Zynga Jukebox. It uses sound sprites – multiple sounds concatenated into one file – to work around performance and latency issues and abstracts its usage to the developer so you are still dealing with single sounds through the API. It also knows how to work around some of the iOS limitations: By constantly playing back silence, the Jukebox is able to trigger sounds programmatically, even when no user event comes in (you only need to activate it once).

Give it a try. It doesn’t make audio on the web perfect, but it’s the closest we could imagine…for now.

Finally, while all of our plugins are still technically alpha and we haven’t yet gotten around to creating great examples and documentation for each. We believe some are pretty solid: so solid, in fact, that they’re already used in one of our games. Our HTML5 version of Words With Friends on Facebook Mobile includes an early development version of Zynga Jukebox.

We’re constantly looking for feedback, and we believe in the power of the web and developer community to bring those plugins to a new level.

Don’t be shy, and fork away.

 

Leave a Reply

Connect with Facebook