views:

1459

answers:

7

Hi Guys,

If you were to design a graphics-heavy interactive web application (say a game like Mario Bros.) today, which of the three available technologies would you prefer - Flash, (Ex)Canvas or SVG/VML?

What parameters would you consider and how would you rate these technologies on each parameter? I can think of the following:

a) Speed of rendering b) Versatility (Separate DOM support etc.) c) Browser support (current and expected) d) Developer Community Support

+6  A: 

Use Flash, because it is supported equally by all browsers.

SVG is a standard, but only three user-agent vendors support it above 40% of the specification. Opera supports it above 90%, Adobe was supporting it above 80% but may be supported it better now than last year, and Safari is supporting it above 40% but not supporting in a comparable manner compared to the prior two mentioned groups. The specification is too long and so it is costly to implement correctly, which is the same reason HTML5 is expected to take 10 years to implement. Canvas is a part of HTML5, which is not yet a standard and is subject to change without warning.

Aside from support I expect Flash to be the most efficient of these technologies for a rich programmatic experience. If SVG were supported more widely I would recommend it for all vector based interactive media that is not heavily dependent on rich programming, because it is least costly to maintain and expand.

+3  A: 

Flash : because this is exactly the kind of stuff Flash is meant for.

  • Flash websites like these work smoothly in a system with normal configuration.
  • I don't know much about the versatility of other two, but there are a lot of APIs available for flash
  • Browser support: Flash has a very good penetration (> 90% as per Adobe). I don't think many browsers (apart from FF 3.5) support SVG or the Canvas tag.
  • Flash is a well established platform and has a strong developer support.
Amarghosh
SVG and Canvas tags are supported by Webkit based browsers like Safari and Chrome.
blesh
Amarghosh
The <canvas> tag runs in IE as well. Like Flash, it requires a plugin. http://code.google.com/p/explorercanvas/
MattMcKnight
There is no compelling reason to install the "canvas plugin for IE" for a normal user (other than a web developer) - but anyone on the interwebz watches youtube and hence have flash.
Amarghosh
The excanvas 'plugin' is installed by the developer, not by the user. (It's just a javascript file) However, as of this writing performance is pitiful and you may have to patch your pet features yourself.
Justin Love
@justin I thought it's something like the chrome frame - Matt's comment was suggesting a plugin like flash (at browser side).
Amarghosh
A: 

Flash ...

we already know it works well for that, has much wider browser support & there are lots of people with experience using it.

eglasius
+2  A: 

Don't overlook Silverlight. It's features are coming up to comparable levels with flash and in some areas even exceeds Flash in functionality and performance. It's not as well distributed as the Flash player but market share is increasing all the time.

For a game I'd still probably say go with flash but for rich applications I'd much rather build in Silverlight. Hey... you could always hybrid between the two. Check out the new Sherlock Holmes site that integrates HTML, Flash and Silverlight (for the PhotoSynth elements).

James Hay
+1  A: 

At this time, for your purpose, I recommend that you use Flash. As everybody has already said, plenty of people have it installed and active, it works well on the vast majority of individual's computers, and it has good media-handling and graphics support.

However, using the canvas tag or SVG has distinct advantages that are growing daily. First of all, both technologies are more widely compatible than Flash from a hardware standpoint. Although Flash works well on PC and Mac, it works poorly on Linux, and it won't run at all on most smartphones. Canvas- and SVG-based apps will run on most modern smartphones and every modern x86-based computer, provided you are using the right browser. You can use them in IE if you make your users install the Google Chrome frame.

Second, Flash is a proprietary platform; therefore, it has a finite lifespan. Writing an app in Flash is making a commitment to Adobe and its platform. You're essentially saying "I trust Adobe to continue maintaining the Flash platform while retaining compatibility with my app." SVG and Javascript are standards; an app built on SVG is likely to remain accessible for a loooooong time.

In conclusion, Flash is still better for graphics-intensive tasks AFAIK, but using SVG and/or canvas should be considered, nonetheless.

Evan Kroske
Do you know of any data on rendering speed differences between the technologies?
Crimson
No, unfortunately, I haven't been able to use Canvas or SVG in any of my projects yet. I haven't seen a speed comparison between the web-standard drawing APIs and Flash, either. I assumed that the standards were slower, but I can't remember ever reading that.
Evan Kroske
+5  A: 

Flash today, canvas tomorrow. Canvas is looking really promising, and there are some impressive demos around. In chrome, the performance of Canvas is on par with flash, so you'd be able to make games that compete quite well. (disclaimer, I'm professionally involved in the creation of javascript/dom based games and programs)

But the main reason that you should still go with flash? Sound. The native browser apis for sound are so pathetic. You can use soundmanager2, (which wraps the flash api, and a hidden flash movie, in a javascript api), but the capabilities of that are limited by the latency of the flash/javascript bridge.

The audio tag support in new browsers should make some headway, but what is proposed is not very competitive with flash's audio capabilities.

Nevertheless, give it about 2 or 3 years and I'm willing to bet that the choice will look a lot less obvious.

However, if you don't mind making a mute game, or slick sound isn't very important, and you don't mind it being dog slow in IE, then go with canvas.

Silverlight isn't even in the running, don't make me laugh.

Breton
I'd like to add that you should probably look at haxe. It's game programming language that compiles to either flash, or javascript.
Breton
+1  A: 

What about code protection. With Canvas and SVG, the best you can do is obfuscate your code, which isnt really robust protection.

Dave
Thanks for pointing that out :)
Crimson