Just thinking out loud here (and not quite sure where to put this), but what is the process like if we want to build for a different platform other than what’s supported? Like for Dreamcast or a “liberated” PSP? I don’t plan on figuring out how since that’s beyond my comprehension, but I am curious as to how it’s done. I did read a article somewhere about the guy who made MODE who managed to make a build of their game for the WiiU, quite an interesting article. I wish I had a better understanding of software architecture and tool development though.
There are a couple layers:
- HXCPP toolchain support for a new compiler
- Lime backend support for a new platform
- Lime tools support for a new platform
Adding a new platform, if not used in HXCPP, requires a correct toolchain XML so we can use GCC, Clang or other tools necessary for building. This is usually an ongoing process of discovering the correct flags to use
The Lime native backend uses either SDL2, or a console backend for the console platforms. If there is SDL2 support, we get this part “for free”, but otherwise, it may require writing a new Lime backend
Then there’s the tools part
I’ve done this all a lot, so I’m happy to help if someone’s motivated to see new support
Thanks for the reply singmajesty. As expected, this stuff is way beyond my undesrstanding.
edit: actually I am still unsure what lime is meant to do. If I understand this correctly, lime essentially creates all the windows, handles audios and input. The HXCPP toolchain is basically an XML that somehow tells lime how to build on different platforms?
Lime provides the windowing, audio backend, bindings to graphics APIs (such as OpenGL), unifies input events – sort of what you expected. Lime also has command-line tools to handle the build.
HXCPP provides the Haxe C++ standard library, and provides tooling that helps support compiling for different platforms. The Lime tools will call HXCPP when it is time to compile – targeting Windows involves copying template and asset files, then performing a C++ build (through HXCPP) then running the result
HXCPP toolchain XML is how it knows which commands to call, and with what flags, when it does the C++ build, but you need more than just a compile to run on a platform – you need to have hooks into getting a window, and rendering. That’s where Lime comes in to provide that functionality for us
OpenFL just runs on top of the Lime APIs, so OpenFL does not need to code specifically for iOS vs. Android, for example