|
|
|
|
|
by rufugee
5114 days ago
|
|
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. Thanks. |
|
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
You can remove even more boilerplate with macro libraries for shorthand class declarations: https://github.com/back2dos/tinkerbell/wiki/tink_lang
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.