views:

98

answers:

2

Also, since it takes so long for a standard to come out for things like HTML, is it possible that the <canvas> in HTML5, though it may not be replaced in specs, will be updated often in the browser so that it can get better and better like Flash did/does in its various iterations?

In other words, we may have <canvas> ten years from now but the canvas of today will not be the canvas of five years from now, except in name?

A: 

Yes, canvas is already capable of the abilities of Flash. The latest versions of all the major browsers support hardware-accelerated 2D canvas, and some support GPU-accelerated 3D canvas through WebGL, a JavaScript binding for OpenGL.

Please note that Flash is slightly broader than canvas; you'll need the audio element to incorporate audio with video and graphics.

Browser support and performance is very good now, far improved from the state only six months ago.

Delan Azabani
Yes, but I don't think we should compare things like this - most of the improvements came from a single *revolutionary* change (ie. GPU hardware acceleration), while most of the *evolutionary* changes have been really really slow.
Yi Jiang
+7  A: 

The short answer is, currently, and in the foreseeable future, no.

First, you need to realize that it's not just HTML5 we're talking about here. Javascript is also needed for the animation, game logic, 2D/3D engine, etc. And although Actionscript performance is very poor, Javascript performance is abysmal compared to that. In addition, Flash has a mature and developed IDE and a set of drawing tools that allow the creation of complex vector graphics and animation. No such things exist for <canvas> as far as I'm aware of.

As for the specifications part, again, impossible. Adobe controls the IDE, the language specifications and the client-side player for Flash. This basically means that they can do whatever they want with it. If you don't like any of the changes, don't buy/use their product. This means that they can develop their product in whatever direction they see fit, and at a pace the W3C will never be able to match.

HTML on the other hand, is very different. The W3C has to sit down with the major browser vendors, as well as listen to the web developers and end users. And even though flashy, interesting features like <audio> and <canvas> are at the top of every web developer's wishlist, backwards compatibility is also incredibly important to the specifications. This is one of the reason why development on the specifications is so slow - the specifications do not just depend on the W3C rolling out them out - it's also browser vendors adopting the specs, web developers using the features, and end users upgrading their browsers. None of that is going to change with HTML5, so why do you expect the speed of development to pick up?

Yi Jiang
Even though there are some fundamental conceptual obstacles, there are already many good games written in 2D and 3D canvas, with hardware acceleration. Browser support may be an issue, but once one has a supporting browser, there isn't much of a problem afterwards.
Delan Azabani
@delan what games are you referring to? thanks.
johnny
You can start with http://chromeexperiments.com/ which is a site with hundreds of mostly, canvas-based games and applications.
Delan Azabani
@Delan: hundreds? There are 118 experiments of which a handfull deserves to be called "application" or "game". Currently, there is no good HTML5 based game, that could compete with what is possible in flash or what has been done in HTML4 so far.
back2dos
Google has ported Quake 2 to WebGL, and that is one of the best examples of its power.
Delan Azabani
Something else to look out for: Mozilla Labs has launched a project promoting the creation of games with web technology: http://mozillalabs.com/gaming/
Yi Jiang
@Delan: Yes, if you use WebGL, WebSocket, LocalStorage and all the other features about 95% of all browser do not implement according the current drafts or at all or where they are deactivated by default (for good reasons), then HTML5 is indeed very capable. The port is a proof of concept, not a product. Speaking of actual products, there is nothing on the market, that leverages HTML5 features (not mentioning those the quake 2 port uses), and I don't think this'll change too soon, because the target audience is still very small and the technology is very young.
back2dos