Haxe sounds too good to be true. Why would anyone use any of the other game engines out there which are targeted towards the mobile world if they could use Haxe? I see many half-donejavascript frameworks and fully-baked lua frameworks...what do they provide that Haxe doesn't? Can anyone who has done significant Haxe work comment to some of the benefits and drawbacks? I ask as someone in search of a gaming engine which can target iOS and Android, so this is very interesting to me.
First, a distinction between frameworks and languages... Framework benefits include rapid development, and familiarity (since they use preexisting languages). The cost is that performance will never be as good as native code, and you won't be able to easily change certain behaviors.
The Haxe language gives you far more flexibility and performance optimizations, since it is generating optimized native source or byte code. The cost is that you have to learn the Haxe language.
Many people on this discussion are criticizing the java-style syntax of Haxe. I think most of these negative feelings are due to the excessive boilerplate required for many Java classes. Haxe does away with a lot of boilerplate code using type inference and other modern compiler techniques.
http://haxe.org/ref/type_infer
There are many other tricks you can use to define behavior without resorting to complex inheritance or class definitions. One of my favorites is the "using" declaration:
http://haxe.org/manual/using
So, in my opinion, the cost of learning Haxe is very low if you already know Java or Actionscript. The cost of coding/writing Haxe is also very low, since you're not required to write boilerplate code.
Finally, it's worth mentioning that the Haxe developers are not just trying to gloss over the technicalities of each underlying platform in order to get things working. They really understand the behavior of each platform, and make many conscientious decisions based on considerations for performance and cross-platform consistency. I've learned more from the Haxe language google group about each target (js quirks, java limitations, etc.) than I have from the Java, JS, Actionscript groups themselves:
https://groups.google.com/forum/#!forum/haxelang
Many people have remarked that simply following the Haxe development list has made them a better programmer.
Revenue is mid 5 figure so far from desktop and flash versions, the ios & android version were just released but I'm hoping to break into 6 figures altogether across the game's total lifespan.
Haven't done an official port yet, but one of the NME devs did look into using it to test the SampleDataEvent API on other targets. I did get it compiling but not running, so the ports probably won't be a huge project.
I like a lot of things about Haxe. The syntax is more streamlined than traditional curly-bracers. The type system can massively help with refactoring. It's "honest" about the limitations of targets - you get the APIs pretty much exactly as they are on the target itself. The compiler is well-implemented and updated all the time. It's just a very productive environment, and although it used to have lots of maturity/ecosystem issues, increasingly those aren't a major hurdle, at least for the game space.
I tried a bunch of different game engines, toolkits, frameworks, languages, etc. for the game I'm working on and the thing that sold me on Haxe was NME. I was able to build for Mac and Flash without changing my code. I simply specified a different target platform at the command line. I haven't built for mobile yet, but I suspect there won't be very many changes to my code when I do.
Also, the Haxe community is full of great hackers and incredibly helpful.
While compiling to JavaScript obviously results in JavaScript code (which is what the browser can understand), but compiling to Flash does not compile to ActionScript 3 and then the flash assembly (the .swf file). It goes straight from HaXe to the flash assembly.
Likewise, the Java target (which is still in development) won't merely translate HaXe into Java and then compile that Java. I've seen solutions like that and it's not fast or elegant.
But it has a physics engine, a canvas, etc. I'm not a game developer (yet ;-) ), so I'm curious...what defines a game engine in your mind? What is haxe lacking? Thanks.
There is more than one physics lib for Haxe and they are separate to the language, the canvas referenced may well be the canvas in the HTML5 compile target or are you mentioning the display list. You don't even have to use that if you target c++, neko or haxe because of another lib; waxe.
Haxe is a language and you can browse the libs available for its compile targets at http://lib.haxe.org/.
If you want to find out more about a framework that uses Haxe and is oriented towards mobile gaming (but not only towards that) checkout HaxeNME.
If you want a nice mature game engine lib built for Haxe try awe6 in the search at http://lib.haxe.org.
Haxe isn't lacking in the game engine department, thing is you can use Haxe with externals for node.js, a lib like noxe that extends haxe to node or simply use whatever javascript lib you feel like and output js. Or use the pure data lib to interact with mobile. Haxe isn't restricted to gaming. It's just one of the things the language allows for.
A problem I have had with these frameworks is that they all sound great on the surface but when you start using them you run into issues or missing features that are important to you and sometimes there's nothing you can do about it.
Haxe does look great and for this particular case I wonder how Haxe NME's performance compares to the lua frameworks like Corona and Gideros for mobile development specifically.
Thanks.