3 ms·
Do they generate js/web app from Haxe and run it inside the bundled Electron? Why?
by zerr 6y ago
Do they generate js/web app from Haxe and run it inside the bundled Electron? Why?
- deepnight 6y agoYes, the code base is Haxe and it "transpiles" to JS + node + electron. The idea is I'm more comfortable with Haxe but I really wanted to have a ~somewhat~ future-proof technology for the app (ie. JS/HTML5/CSS)
- zerr 6y agoIf it is easy (at least that's the premise of Haxe), would be great if you generate a different target as well - for those end users who despise Electron.
- Karliss 6y agoGenerating the core logic for different target is one thing but the UI code if it is written for specific target is a different thing. Haxe has many game libraries that would allow doing that with little or no changes, but in this case LEd is using direct html generation for UI. Making such porting more difficult.
- gavinray 6y agoIf people complain about the binary size and/or memory usage, one tip would be to see if it'll run with either NW.js or Tauri, should be close to a drop-in replacement. Tauri is even smaller than NW.js (I think ~600kb hello-world binary size) but uses Rust in it's toolchain way under the hood to build, so take that as either a positive or a negative. https://github.com/tauri-apps/tauri https://github.com/tauri-apps/tauri NW.js is essentially lighter-weight Electron. https://github.com/nwjs/nw.js https://github.com/nwjs/nw.js Would be neat if it was a straighforward implementation and produced tiny self-containing cross-platform binaries. Disclaimer: I also have no idea how gamedev works though, so this might not be applicable
- deepnight 6y agoActually, the app was both NwJs AND Electron based, but at some point, but I dropped NwJs support to clean up the code and only kept Electron. But all Electron related calls are easy to locate and you could use compiler conditions (just like I did before) to use something else (ie. to open a system dialog or display a page template).