This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
A lot of focus on HTML5 when it comes to the web is focused on the low level (often 2d) graphic capabilities of the canvas component. I'm kind of wondering what else HTML5 brings to the table that is relevant to game programming in particular.
For example, HTML5 has the audio element, although I'm not sure what advantages it has over older methods of playing sounds.
I don't seen anything in HTML5 for things like basic geometry primitives, hit detection, animation (timers, easy in/out, etc) or support for gaming controllers (gamepads).
So some of these things are probably provided by js libraries/frameworks, but i'm wondering what other HTML5 components are there that are essential or more relevant to game programming, beyond basic drawing capabilities.
BTW - on hit detection, I was playing with some canvas stuff and the isPointInPath function to be puzzling. It works on a point hitting the current path, seems a bit useless. If you wanted to leverage it for graphical objects you create, you'd have to recreate the path (and not draw) on say a mouse click hit detection. Maybe I'm missing the point of this function ...
The audio element is ok for playing sounds. The key value in this is that it doesn't require a plugin. It's built into the browser. There are compatibility issues between browsers on what formats are supported. The three audio types that are supported in some shape or form are OGG(Ogg Vorbis), MP3, and WAV. The audio tag does have function called canPlayType that tells you if the specific browser might support a file type.
would tell you if the current browser supports MP3 files. Return values from canPlayType are "no", "probably", or "maybe".
CanIUse.com is another useful resource. If you want to use a library to test availability of HTML5 features, check out Modernizr.
Though not as widely supported, you should look into the WebAudio API. It picks up where the Audio tag leaves off like better support for volume/gain management, multiplexing sound, etc.
Re: collision detection and things like that, I don't believe that is a core concern for HTML5 implementers. Lots of libraries exist that do collision detection and response like bullet.js and jiglib.js.
Re: animation: Check the other threads in this forum where I talk about requestAnimationFrame, that facilitates core animation stuff but for easing functions/etc, you would have to do that yourself. One library that I like to use for easing stuff when I'm not using RaphaelJS(SVG and has built in easing funcs) is TridentJS(https://github.com/kirillcool/trident-js)