The nearly open-source free Defold game engine just released Defold 1.9.7 and the highlight feature of this release is C# support! This isn’t replacing Lua as the primary scripting language, in fact it’s not a scripting language at all, instead enabling you to easily make game extensions using the C# programming language with Defold. This language support joins other programming languages including Zig and C++. There was hesitation to add C# support to Defold, explained below:
Q: I am concerned that adding C# support will have a negative impact on Defold. Should I be worried?
Defold is NOT moving away from Lua as a the primary scripting language. C# support will be added as a new language for extensions. It will not impact the engine unless you choose to use C# extensions in your project.
C# support will come at a price (executable size, runtime performance etc), but that’s for the individual developer/studio to decide upon.
As for C# itself, it’s a relatively minor change, since the extension system already support many languages (C/C++/Java/Objective-C/Zig). The SDKs will be kept in sync by generating the C# bindings. This will keep the bindings up-to-date with minimal effort.
The Defold Foundation has previously been against adding C# support in Defold, but has changed opinion for a number of reasons:
- Studios and developer continue to request C# support.
- C# support has been scoped down to extensions only (i.e. low effort).
- The core engine will not be impacted.
- The C# APIs can be kept in in sync with minimal effort if they are generated.
- C# support will be based on DotNet 9 with NativeAOT, thus generating static libraries that the existing build pipeline can link against (just like any other Defold extension).
Key Links
Defold C# Support Announcement
You can learn more about the Defold game engine, the 1.9.7 release and the new addition of C# support in the video below.