08-07-2021, 06:26 PM
Hi!
Building a native version of Tilengine for the Switch should be easy, as Nintendo offers C/C++ in their SDK. Current tilengine license (MPL 2.0) allows linking statically or even using source modules directly inside other projects. However I understand that in your case, you're not targeting Switch alone, but using cross-platform framework that allows building for the Switch as well as for other platforms.
Kinc seems promising, the "NativeLibrary" Kha GitHub sample you pointed shows how to mix source C/C++ and build a library that can be called from Haxe. It requires work to write the binding -as with any other language-, but it definitely seems to allow it. I've not attempted to do it yet, as I don't know this ecosystem and its tooling, but it's worth trying.
Thanks for sharing this useful info!
Building a native version of Tilengine for the Switch should be easy, as Nintendo offers C/C++ in their SDK. Current tilengine license (MPL 2.0) allows linking statically or even using source modules directly inside other projects. However I understand that in your case, you're not targeting Switch alone, but using cross-platform framework that allows building for the Switch as well as for other platforms.
Kinc seems promising, the "NativeLibrary" Kha GitHub sample you pointed shows how to mix source C/C++ and build a library that can be called from Haxe. It requires work to write the binding -as with any other language-, but it definitely seems to allow it. I've not attempted to do it yet, as I don't know this ecosystem and its tooling, but it's worth trying.
Thanks for sharing this useful info!