Both Javascript and AS3 are implementations of ECMAScript.
Is there a fundamental technical reason for Flash being so much more prevalent as a game-publishing platform, when compared to Javascript?
|
Both Javascript and AS3 are implementations of ECMAScript. Is there a fundamental technical reason for Flash being so much more prevalent as a game-publishing platform, when compared to Javascript? |
|||||||||
|
|
As with everyone else, I'm going to assume you mean Flash vs what's collectively being called the HTML5 technologies. I believe Flash is still more popular because:
|
|||
|
|
|
Flash is a lot more than ECMAScript. Although there were attempts to introduce some features of ActionScript into ECMAScript version 4, those were abandoned. JavaScript only got usable for most type of games very recently. JavaScript in HTML5 nowadays offers:
But those things are provided by flash for a decade. |
|||||||||
|
"Javascript" really means HTML 5, when compared to Flash:
(Emphasis added.) |
|||||||||
|
|
Flash is a more established platform, and people are more used to using it to code games. In my experience, compiled AS3 running in the Flash Player runs much faster than Javascript running in-browser, and it offers easier access to things like sound and embedded files. Flash apps can also be encapsulated in a single .SWF file, while HTML5 apps written using Javascript tend to have a more complicated distribution method, since assets, scripts, and pages usually need to be separate files. It's not entirely a fair comparison; Flash is compiled (to an extent), while Javascript is at best just-in-time-compiled for most web applications. |
|||
|
|
|
The semantic quibble Gregory made in his comment gets at the root of the issue here. Flash is a very established gaming platform because of the combination of ActionScript 3 and a host of powerful multimedia capabilities. While JavaScript was always just as good of a language, only recently has it been coupled with the powerful multimedia capabilities of HTML5. As others are pointing out, you can compare ActionScript to JavaScript, and you can compare Flash to HTML 5, but comparing Flash to JavaScript is like saying "Which is better, Linux or C#?" |
|||
|
I think this is a lot to do with tooling and marketing.Most people back in the early AS2 and even AS1 days of Flash, were introduced via the Flash IDE. This was a great tool, were you could draw or import graphics, and add scripts very easily to get things happening very quickly. Macromedia (now Adobe) owes a lot of it popularity to this easy, graphics based entry point. There was not really much else out there that was even close (well, besides Director. Which I still love btw). So Flash became a popular game creation tool before ActionScript was popular. ActionScript just provided a way to add the interactivity. The IDE is what really made it popular. Things are different these days, at the platform has matured into many different part. It is now quite common to make Flash games without even touching the Flash IDE. |
||||
|
|
|
The biggest reason is because ActionScript contends only with the version of Flash you're using. You can reach a wide audience fairly quick with ActionScript in Flash because of the market penetration of some of the most recent versions of Flash (the adoption rate is quick). Now think about JavaScript; it is not a single implementation of ECMAScript, but several interpretations of the ECMAScript standard, which all depend not only on the browser, but browser version. Adoption rate for the updated browsers for a general audience (think IE) is very slow. It just makes more sense to choose Flash (or even Java) because it is more portable. |
|||
|
|