Haxe – Opensource Cross-Platform Toolkit
haxe.org
haxe.org
I rather enjoyed the language. Certainly, it's a lot nicer than working in Flash directly.
- Papers, Please [0] by Lucas Pope.
- Dead Cells [1] by Motion Twin, a collective linked to the creator of Haxe.
- Evoland [2], Evoland 2 [3], Northgard [4] made by Shiro Games (studio of the creator of Haxe).
- rymdkapsel [5] and twofold inc. [6] by grapefrukt games.
- Topsoil [7] by Nico Prins.
- The Westport Independent [8] by Double Zero One Zero.
- Defender's Quest series [9] by Level Up Labs.
- Fidel Dungeon Rescue by [10] Daniel Benmergui.
Other popular games such as Threes [11] and QWOP [12] were ported to HTML5 with Luxe Engine [13]. Popular game development frameworks and engines include OpenFL [14], HaxeFlixel [15] and Heaps [16].
[2] http://evoland.shirogames.com
[7] https://www.topsoilgame.com
[8] http://www.doublezeroonezero.com/westport.html
[9] http://www.defendersquest.com/index.html
[10] http://store.steampowered.com/app/573170/Fidel_Dungeon_Rescu...
[11] http://play.threesgame.com
Edit: To make it more clear, I just looked at:
http://haxe.org/use-cases/who-uses-haxe.html
and that page does show that many well-known companies are using it. My question is more about the {perceived|anecdotal} usage level that anyone thinks it has in the industry, vis-a-vis other products in roughly the same space. Asking with a view to whether I should consider learning it for work.
Edit 2: Checking out http://haxe.io/ based on MoOmer's comment.
It more or less feels like a class-based, typed (often inferred type) JavaScript. If you have any experience in the class of JavaScript-like languages, learning haxe is basically no effort beyond just learning a new set of build tools and the haxe runtime APIs.
I used it a lot when I was working for Chumby because the language could target the ActionScript/AVM runtime that was used for Chumby widgets and was in many ways a far superior language to ActionScript 2. (ActionScript 3 was also very good, but the Flash player on Chumby devices didn't support AVM2 until just about the time the company went through a very near death experience [though it is still alive thanks to the efforts of Duane Maxwell]).
The common wisdom was that the introduction of the smartphone basically doomed it, but in retrospect you could look at it as something like a before-its-time Amazon Echo Show (which Google is supposedly making a competitor to right now as well)...
There appears to be modern market for this type of thing, though newer devices are certainly benefiting from everything that came along with the smartphone revolution like super cheap SoC packages, cheap high resolution displays, cheap capacitive panels, more mainline support for embedded devices in the form of modern Linux kernels, Android, etc.
I started coding Haxe as a transition from being a AS3 Flash dev. At first, I've found the name odd and the idea of cross-platform is bloated but I came back for following reasons:
- Language being almost same as Actionscript 3, which I already knew and which I made stable income in past with.
- Native compilation. While this sounds bloated, I never had a critical issue since I rarely deploy more than 2 platforms, and I see difference is very small when I don't use a platform specific library.
- Despite small community, as because libraries and tools are intuitive enough, ease of use overtaken my need of too much help. Project leaders are very responsive and energetic if you get confused anyway.
Only thing you will notice is that, the build tools and package management needs a bit revolution if community will grow further but I had no issues until today. Most of the time I prepared a Dockerfile to freeze everything and moved on.
I tried it a couple of years ago and while I loved the language (I have a strong AS3 background) I felt there were too many moving parts that rely on each other.
hopefully things have improved!
I developed one into a a mobile game. It pretty much just worked across iOS, Android, Native Linux, Native Windows and flash. It really does compile as the same project and Build for $platform. With the exception of iOs which needs to do shenanegans with xcode. Flash version as a free to play here http://fingswotidun.com/Potato/
Also, does it compile to anything else then the JVM?
Uses the JDK standard library currently.
There is a small standard library but it relies on the platform libraries for most things. For collections, Kotlin/JVM uses the Java collections with some extension functions, but on Kotlin/JS and Kotlin/Native the Kotlin standard library itself provides the same Java-like collections API.
For other things, Kotlin/JS provides a tool for converting TypeScript bindings to Kotlin as well as a special "dynamic" type (kind of like .NET) to call JS APIs without bindings. Kotlin/Native has a bindings tool to generate Kotlin wrappers for C libraries.
The size of the standard library for Kotlin/JS is roughly similar to AngularJS – 1.4 MB unminified or 100 kB minified and gzipped. But there is a tool (since 1.1) to eliminate the unused parts and reduce the size – e.g. for one simple tiny program I have here, library + program is 28 kB minified and gzipped.
I have a Kotlin program running on Windows, Linux with X11, Java with Swing, as well as in the browser, i.e. targeting native, JS and Java. That seems pretty portable to me. You just need to provide an implementation of whatever API you need on each platform you target.
And your Kotlin to JS, when you say target API? I mean, how similar is it to your JVM one? If you had to rewrite everything you were using Swing for, that's a lot of rewrite.
I think with Haxe, though not sure, but it's my impression with Haxe it would be almost 100% same code. Because whatever UI framework you'd used in Haxe is in the standard library, and would therefore be availaible on all its target platforms.
Hum, actually I take that back, it seems HaxeUI supports most platforms but not HTML5. Though HaxeUI2 seems to be in development adding support for it.
Ok, I see what you mean then. I don't know if I'd call that truly portable, but if they add native WxWidget and say QT to Kotlin native, it would slowly tend towards what Haxe has going.
I don't really think of that as portable personally. So many languages offer it today, Java with GWT, Clojure/ClojureScript, Kotlin, OCaml/BuckleScript, PureScript, Ruby/Opal, Python/PyJamas, Erlang/Shen, Scala, etc.
You save a bit of time not having to learn another language, and can reuse all pure code, mostly. But I'd really like to see a language develop which supports multiple platforms from the get go by having a unified standard library that was very complete, including UI.
No, there is a native binary executable for Windows and a corresponding one for Linux. There is no Java embedded in or required by those, although separately (!) I also target Java, in addition to Windows and Linux. (I knew I should have used more parentheses in that post.)
> If you had to rewrite everything you were using Swing for, that's a lot of rewrite.
Yeah, but there is no Swing on the web, so what can you do? We used to have Swing, in the form of applets, and it was horrible. If you want something to work well on the web, you have to write it for the web. (But you can write it in Kotlin!)
Again, there is no Java when you target JS. Instead you can use any JS API and any JS library. The Kotlin standard library provides some basic data structures, math functions, etc. No Java.
> if they add native WxWidget and say QT to Kotlin native, it would slowly tend towards what Haxe has going.
wxWidgets and Qt happen to be in C++, which is difficult to use from other languages, but you can use any C-based library from Kotlin/Native, such as GTK+ or the native Win32 API.