News for hackers. Stuff that matters.
Re:LDtk: A modern and open-source 2D level editor by hawski on Sunday June 20, 2021 @03:36PM (#27573213)
Haxe is one of the very few languages in which a perfect cross-platform widget toolkit could be made. A toolkit that would produce platform-native binaries (no pesky FFI like JNI) using platform specific libraries: targeting Java (maybe even JVM?) for Android, targeting C# for Windows/the-current-Windows-toolkit, targeting Hashlink for Gnome/Gtk, targeting C++ for KDE/Qt, targeting C++ with Objective-C++ for MacOS/Cocoa and iOS/Cocoa Touch. Probably even a web target is viable.

Other language, that it is possible to do with is Scheme, but it is quite a different beast all together.

That's my little dream. I intend to do gobject-introspection bindings one day for it as my first step.

Re:LDtk: A modern and open-source 2D level editor by japhib on Sunday June 20, 2021 @04:27PM (#27573608)
The funny thing about a lot of these cross platform Haxe GUI applications is that they are actually made with Electron.

I guess using Haxe means that you could also share libraries with your “real” game code that likely compiles to C++, which could be a big benefit. I just thought it was funny that LDtk could be written in JavaScript and be just as cross-platform as it is.

Other examples of Haxe-Electron apps include the Ogmo level editor and the CastleDB editor.

Re:LDtk: A modern and open-source 2D level editor by tkp on Sunday June 20, 2021 @05:36PM (#27574150)
Indeed, Electron is very useful for any compile-to-js language, and benefit from js popularity, toolkits and frameworks for rich UI.

Writing in Haxe brings nice syntax, and some flexibility regarding target language/platform, and possible UI frameworks.

- ArmoryPaint[1] and most Haxe games don't rely on Electron for UI.

- HaxeUI[2] provide a nice list of components, rendered as composite or native on various backends[3] (html5, wxWidgets, experimental pdcurse..^^)

- MVCoconut[4] also allow to bind to various front-ends : Dom, React, React-native

There is always a degree of lock-in depending on the path you choose, but having a cross platform base for logic and glue is a nice feature.

[1] https://armorpaint.org/

[2] http://www.haxeui.org/

[3] https://github.com/haxeui/haxeui-core#backends

[4] https://github.com/MVCoconut/

Re:LDtk: A modern and open-source 2D level editor by k_ on Sunday June 20, 2021 @05:33PM (#27574126)
I agree. Such a project exists [0] but will need more work, and workforce is quite limited.

[0]: http://www.haxeui.org/