Via Arve, the Opera Web Applications blog talks of how the Opera 9 Browser has made extensions to the canvas element specifically for authoring games for the browser.

The extensions allow authors to:

  • get/set pixel values
  • perform collision/hit detection
  • optimize redraws of the canvas (via locking)

The benefits of such functionality should be obvious: it allows fine-grained control over the canvas contents and interactivity, something closer to what SVG developers have already:

  • While SVG developers are rarely concerned about individual pixels, SVG filters provide an ability to produce interesting effects similar to getting/setting individual pixels (for instance, blurring or lighting an image).
  • SVG developers can easily attach standard DOM event listeners to any graphical objects to test for hit detection. General collision detection could also be done via scripting the SVG DOM.
  • SVG developers can control when the image is drawn by using SVG DOM methods: suspendRedraw(), unsuspendRedraw() and forceRedraw().

Anyway, I'm not trying to downplay these advancements from Opera, I think it's all good. Putting more graphical/interactive power into the developers hands is a good thing, whether it's canvas or SVG. Either way it nudges the web closer to a platform that can support gaming technologies.

It's a pity these guys weren't also at the GDC last week to discuss these advancements and learn what game authors are looking for in the web browser space, but I suppose this is fairly minor news at the moment. What will make this bigger news is if other browser vendors start supporting these extensions in some way.

As the canvas experimentation continues, I feel it becomes more and more important for somebody to own it and publish a standard so that we don't get fractured camps like we did with JavaScript back in the first Web boom. I'm all for innovation, and it's a potential way for Opera to gain some more marketshare, but at some point to make it ultimately useful it needs to be ubiquitous across all browsers.

§242 · March 29, 2006 · Games, GDC, Opera, RIA, Software, SVG, Technology, Web · · [Print]

Leave a Comment to “Opera Extends Canvas”

  1. For what it’s worth, we agree. We like some experimenting as well though and per that specification using prefixes for extensions is perfectly fine. I guess we’ll submit our proposal at some point. Hopefully soonish.

  2. (Speaking for Opera above, in case that wasn’t clear.)