• General Chat
  • Mono / C# vs C++ - support, stability, and exporting/compatibility

I'm starting a new project, and I was wondering if people have recommendations wrto C# vs. C++. I write C++ professionally (not for games), and I've written some C# before, so I have a pretty good idea what I'm getting into language-wise. C# in the framework seems a little bit cleaner (do you agree?), and I certainly prefer C#-style crashes to C++'s. Still, I'm mostly wondering about are people's thoughts about which will be better supported and more cross-compatible. I'd like to be able to export to mobile -- not currently supported for Mono -- although Android is supposedly coming soon (anyone have an ETA for iPhones?). On the other hand, compiling native C++ for various platforms (here's looking at iOS) is always a pain. I also prefer not to have to excessively rewrite my code for each new version of the framework. It looks like they're trying to keep both versions somewhat stable. What are people's thoughts? What decisions have you made?

I would suggest starting out with GDScript, as it's well-integrated and runs on all platforms. You can keep using it for non-performance-critical code and use C++ modules for performance-critical sections.

As for C# support on iOS, there's no ETA I know of. Progress is being tracked in this GitHub issue.

a month later

I would second Calinou's suggestion. GDScript is a little more python-esque, but it is basically guaranteed to work across platforms, and be compatible with whatever platform Godot can currently run on. I've found it to be fairly reasonable to work with, and doesn't present any major problems for most basic interaction and coding.

If you are looking for more low-level performance for custom plug-ins, C++ will likely do you just fine. Properly tuned C++ will usually compile without issue across pretty much any platform, and can even be bundled up into separate libraries that you can link against. It's just a matter of making sure your code is clean, memory-safe, and uses as few platform-specific bindings as possible. (none, ideally) Godot has an entire system for writing custom plug-ins in C++, I'd recommend looking into that.