Mozilla is holding an Open Web Games competition. I expect that many of the games will be use the Canvas API, since many programmers are more familiar with the imperative programming mode, and there are some games libraries that have been developed for Canvas or adapted from existing drawing or gaming libraries.
But I’m calling for SVG developers and designers to step up to the plate, as well. SVG has a lot of features that make it easier out of the box to build interfaces, animations, and even games. There is a scene graph, and the DOM event model that gives you free hit detection for pointer events, for example. And I’d love to see someone make an open-web game that’s both accessible and fun…
To help developers along, I thought I’d share a few free, open-source SVG resources that could be useful in building games:
Jonathan Watt’s Coordinate Transformer: An indispensable short code snippet that compensates for transforms and viewboxes, giving you the position of the pointer events in an intuitive way.
Robin Berjon’s SVG Boilerplate: A simple template to include SVG content embedded or inline, in a cross-browser and backwards-compatible way.
David Dailey’s SVG Primer: Background and basics on SVG, for those just getting started.
These are just a few resources, off the top of my head… there are many more out there, sorry if I failed to mention anyone. If anyone has other useful resources for making SVG games, please drop a link in the comments.
I’m excited to see what you all dream up and build!