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.
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.