There are likely some bugs because it is a new feature
C# - the language - is well supported. Also, a lot of effort have gone into supporting ahead of time compiling, which allows greater platform support than it would have otherwise. However:
- Some .NET libraries may cause trouble (mainly related to threading and reflection).
- It is not well integrated into the editor. At least not at the time of writing. So I'd advice to use an external editor such as Visual Studio Code with C# Tools for Godot.
If you don't already know C#, you need to learn
The same can be said of GDScript. In fact, given that other engines also use C# - but not GDScript - you probably have an easier time transfering knowledge using C# (and even entire classes, if they don't have engine specific code). But don't let that discorage you form learning GDScript.
For someone who is comfortable working with both gdscript and c#, what are the reasons for choosing one version of godot over the other?
Some C# cons:
- Using C# your build will be somewhat heavier.
- We can be sure that everybody using Godot can use GDScript. Thus GDScript is the language of choice for addons. Going to C++ if we want to squish more performance, or if we need to talk to native code.
- Metaprogramming is easier with GDScript: you crate a GDScript object with some code, then load it, instance it and run it. With C# you would need reflection for something like that, but it may not work, in particular with platforms that need ahead of time compiling.
Some C# pros:
- You will have access to a larger set of libraries (with some caveats, as I said earlier, some cause trouble).
- GDScript - prior to Godot 4 - is an interpreted language. And also C# is fully typed. As a result, C# often performs better than GDScript.
- C# has some language features that make it easier to use compared to GDScript (e.g. iterators, lambda functions).
For everyday use, either is OK - so you can go with personal preference. However, when you get into very specific uses (e.g. metaprogramming, addons) or when you need some extra performance, that may tip the balance one way or the other. You may - of coruse - not know if you will run into those situations ahead of time.
On that note, I want to mention that you can combine both in the same game. So don't decide between them too early. In fact, using GDScript to deal with signals and have it call into C# code for game logic, might be a good idea. Since GDScript is a great glue language, and C# can archive better performance.
However, sometimes the interaction between these languages is not that smooth. For instance, async
methods in C# - often - returns a Task
and GDScript can't handle that with yield
. For those situation, you want to refactor the code to use signals instead of async
methods.
And - by the way - you can combine any other language you have in Godot, including visual scripting, and third party languages that you can install into Godot such as Lua and Python and so on. And yes, C++.