Getting Rid of Flash
ncannasse.fr
ncannasse.fr
2013 is shaping up to be a strong year for Haxe's gaming abilities.
This is exactly what flash was for, power things not possible in the browser until the standards catch up (animation, video), then moving to the next missing thing (i.e.: gaming, 3d worlds)
I contest your use of the past tense here. I think it'd be fairer to say "this is exactly what Flash is for". Historically (mid 2000s) Flash was doing for simple content animation what it's doing now for 3D libraries like the one linked to by OP. In other words in the days before jQuery and <canvas> etc. simple high fidelity animation of basic 2D content just wasn't technically practical in the native browser, so Flash filled the gap. Browsers moved on, and now its 3D (and arguably secure/hardware accelerated video) where a plugin like Flash can be useful.
Flash had its time driving content, and at that time (as thousands of agencies, businesses and developers can attest) it was the best tool for the job.
He is just saying that because Haxe can target WebGL, he could now dump Flash when performance of WebGL is good enough.
I think it would have been much much better, had Adobe open-sourced Flash and turned into a standard (like ECMA or something).
This could saved everyone in the industry a huge amount of effort porting, rewriting, etc. stuff to work on a platform where every browser does things in its own (horribly) inconsistent way.
The main thing to realize is that Adobe based AS3 on many leading proposals for Ecmascript 4. Ecmascript 4 would lay the groundwork for future versions of javascript, etc. Flash would still be closed source, but the language would be useful elsewhere in the browser. Several people have described the political issues surrounding this ES4 situation in far more detail, and how we arguably ended up the worse for it:
Resig: http://ejohn.org/blog/ecmascript-harmony/ Canasse: http://ncannasse.free.fr/?p=82 Mike Chambers: http://www.mikechambers.com/blog/2008/08/14/actionscript-3-a...
So, why didn't Adobe just open source the flash plugin? One main reason not to was Microsoft: http://en.wikipedia.org/wiki/Microsoft_Java_Virtual_Machine#... Another reason was, naturally, control. Both for Adobe and for user development. The Flash player was quirky, but incredibly consistent with decent performance. There really was no other option... js, java applets, activeX, they all had significant weaknesses due to differing availability and performance.
If you wait around long enough in web development, you will have seen this type of situation many times. Haxe is a "free agent" that can break this cycle imho. It is not tied to a company like Typescript or Dart, nor is it tied to corporate controlled committees like ES4. It has an incredibly gifted language author, and a great team of developers. It's also very mature at this point (> 5 years old).
I've used Haxe professionally for just under 5 years now.
One of them that I know personally is a professional Flash developer who used haXe exclusively for some times, because it had a better standard library than Flash (AS2 at this time) and generated lighter and faster SWF files. I remember him telling me that he made a somewhat huge (several hundred euros) donation to the project and that it still cost him less than buying the Macromedia Flash software. Since AS3 he's back to Flash thought.
Some others I know through their work: Motion Twin [1] for instance, who are the creators of a lot of very successful Flash games.
http://www.haxenme.org/showcase/ http://www.haxenme.org/showcase/page-2
Of those in the community developing flash only games, I have encountered a strong tendency to move away from AS3 towards haxe simply because you get the same API with a better language, faster compiler and faster code.
The weak point of Haxe is in library bindings. As a relatively young language, It doesn't have bindings to the breadth of things that C++ or Python has.
The guys behind NME have made the workflow almost completely painless with a simple command-line tool that will download and install everything required to do development on a variety of platforms. See details for setup here. http://www.haxenme.org/developers/get-started
The disadvantage of NME is that it closely mirrors the Flash API. That's great if you are aiming for cross platform flash/other, but if you want to drop flash from your supported targets there are probably better API styles (which I believe is where Nicolas is heading with h2d)
I have written Games using NME, The Flash API directly and the HTML5 canvas directly. I'd like to have something that provided a Cross-platform glES interface across iOS, Android and WebGL/Javascript but currently no such system exists for haxe.
I used haxe for over a year creating dozens of end-user apps when I was working at chumby industries because our base runtime on those devices was FlashLite 3 with ActionScript 2.0 and haxe is a significantly better language than AS2 while still targeting the same Flash runtime.
IMO it is definitely a language worth checking out, particularly since it should be trivial to learn if you already know the language for whatever runtime it is you're targeting. It looks and feels very much like ActionScript/JavaScript, but with far less warts than either.
The macro system it has is awesome and allows for lots of compile-time code generation scenarios that can result in massive runtime optimizations if used well.