3 ms·
Haha, that's virtually identical to what we're doing, except with GWT, so we can hand off some of the tough stuff to the underpinnings and don't have to deal wi
by hebejebelus 16y ago
Haha, that's virtually identical to what we're doing, except with GWT, so we can hand off some of the tough stuff to the underpinnings and don't have to deal with js's strange object-oriented system (at least to us, C++ programmers ;)).
So you didn't use the audio tag's <source> option? Did you find that too slow?
(also, I don't know if it'll help you at all, but I got audio working nicely on iPhone/iPod/iPad and wrote this tutorial about it http://flax.ie/how-to-get-hidden-autoplaying-audio-in-html5-on-ios/ http://flax.ie/how-to-get-hidden-autoplaying-audio-in-html5-...)
Edit: By the way, does your map editor output as JSON? We went through a bunch of crap getting serialisation/de-serialisation working across client/server, but you probably wouldn't hit any of those problems because your code isn't "compiled"
- phoboslab 16y agoJohn Resig's Class-Object has some simple inheritance without the (very verbose) prototype stuff. It's the basis of my engine: http://ejohn.org/blog/simple-javascript-inheritance/ http://ejohn.org/blog/simple-javascript-inheritance/ I used the Audio API's canPlayType() to decide whether to use mp3 or ogg. I just found it simpler than constructing the DOM for Audio and Source elements. I'll definitely look into the sound issuse on iPhone. Thanks for your tutorial! Yes, the levels are saved in JSON format, with a bit of boiler plate code so it can get loaded and "baked" nicely. Here's the source for the first level: http://www.phoboslab.org/biolab/lib/biolab/levels/biolab1.js http://www.phoboslab.org/biolab/lib/biolab/levels/biolab1.js