Gdscrpit vs C# - what do you prefer?

I wonder what do you guys prefer for scripting language?
Coming from Java programming world, I always missed proper encapsulation and interfaces with GDScript. Just switched my project to C# and I marked 90% of fields private.
It feels so good. Finally knowing exactly what should be called from outside and what not. I know people use _ prefix for marking private stuff, but it feels much better when compiler makes sure you don’t accidentally use them. Also, code completion gives me just public methods and field makes coding much more enjoyable.

3 Likes

That depends.

In Godot, I prefer GDScript and that’s what I use almost exclusively, as it’s better documented, has a bit more features than C#, and is easier to use. I like the fact that I can just open Godot and start writing, no more setup required as opposed to C# with a separate IDE etc.

In general however, I prefer strongly typed languages, with the features you mentioned. My background is Unity, so I’m used to C# and I like it a lot as a language. Even though I use GDScript, I usually try to make my code as type-safe and explicit as it allows me, so I’m somewhere in the middle.
I think if Godot had the possibility to properly parse C# in its native editor - I would most likely switch to C#.

I would love to see a hybrid in the future - GDScript syntax with fully type-safe capabilities, private properties and methods, traits, etc. Very slowly, but we’re getting there :slight_smile:

3 Likes

I am using C# as well, mainly because it’s easier to apply OOP pattern (for me) and because I am experienced with it.

3 Likes

Yeah, I totally agree it’s more convenient to have code integrated into the engine. But I find it less annoying to switch between Godot and VS Code then I expected. I feel like I have more space for the code view.
It would be awesome to see private modifier added to GDScript. I miss that the most.

Thanks for your reply, foldear,
Did you ever experience any issues because of using C#, like additional performance cost compared to GDScript? Or some missing features, like preload() function?

Give these proposals a solid thumbs-up then! Hopefully we’ll see them being added one day.

1 Like

GDScript, it’s just so easy and straight forward in my opinion. I used to use c# in unity, but gdscript is just so much simpler, i also have a background in python and gdscript is a bit more pythonic in nature, it just feels more natural for me. The documentation is also super helpful.

1 Like

Thanks for sharing the links. Just voted for both.

I agree it’s simple, and I mostly like it too. However, on bigger code base, it’s much harder to keep things organized without encapsulation and clean interface definitions.

1 Like

I’m new to Godot, I’ve just been tinkering with it for a couple of weeks now, so I haven’t used any GDScript at all, I am not the best person to ask ahah. For now, it’s just a matter of preference, but I’ll definitely try GDScript to see the differences.

1 Like

Thinking more about this, it would probably require GDScript to become compiled language in order to show invalid access errors in the code. I really don’t know how does GDScript executes currently, I guess it’s interpreted in runtime. Having the compiler which can check invalid access during building/exporting the project (or even before like some IDEs like VS Code do) would be awesome. However I guess it’s a huge change compared how it works today,

I prefer to use C#, personally, because of its familiar syntax. However, GDscript is more commonly used amongst the Godot community, but if you’re coming from Java, I would recommend C# for its similarity to Java.

1 Like

Outside of programming at Uni about 30 years ago (so Ada, Pascal , and x68000 ASM) c# was the first language I picked up and tried to learn properly (still learning).

For most small projects it wont matter, but I would recommend anyone who is doing a sizeable project to learn it. Also if performance is somewhat critical the its probably the only way to go.

It does have some annoyances with Godot, but over time they will get sorted out.

1 Like

Microsoft presenter integration of Aspire.net to Godot c# project solutions..at GodotCon 2025 at Boston

With c# 13 and interoperability with Java, c++ and python, Godot with c# will have many advantages from .net ecosystem than Gdscript

What we need is higher coverage of unit tests for Godot c# as GDScripts …this high coverage is more effective than c# Documentation

With LibGodot, through c#, greater flexibility with UI, backend service and secured business logic

5 Likes

After all said in this post, to be honest, I would be happiest to use Kotlin. There is Godot Kotlin plugin but it doesn’t seem to be so well integrated with Godot editor, and also I don’t like the fact it requires so many annotations in the code.

Almost a decade of writing Minecraft mods has basically hardwired my brain for the idioms of Java, so I mainly use C#. The encapsulation and interface systems are really nice of course, but the big killer feature for me has been performance - it’s very nice not having to worry as much about the price of method calls, since I don’t really use many reflection features anyway.

Basically the only big catch for me with using C# in Godot right now is how C# structs can’t be used for exported properties since they can’t extend GodotObject - it’s a frustrating but really understandable limitation all things considered, and just ends up with me writing things like I would in Java anyway lol

2 Likes

GDScript 100%.

I’ve programmed professionally for years in both Java and C#, as well as Python, Ruby, C++, PHP, and JavaScript. I am a huge fan of OOP, though I do believe that Functional Programming has its place.

I also agree strongly with all the reasons @wchc gave, so I won’t re-iterate those.

If this is the most important thing for you, cool.

Personally since I can enforce type and know how to read what’s private/protected/public in my code, this isn’t an issue for me. Neither has autocompletion. I also haven’t ever had that problem in professional Godot projects using GDScript with other developers.

You can do OOP in any modern language from the last 20 years except for a few that are intended to be Functional Programming languages and then…you just shouldn’t.

While C# does has things like templating that would be nice in GDScript, the absence hasn’t been an issue for me so far.

I pop out the GDScript editor on one of my portrait mode monitors. The same one I use for VSCode when I’m editing C# Godot code. So I get the same amount of screen real-estate for either.

I’d like to see private and protected, but mostly for use with other people in collaboration. Since in a codebase I own I can change modifiers anytime I want, the distinction is more for readability than anything else for me. Of course I am religious about adding that _ or removing it when I change the scope even though it doesn’t matter to the interpreter/compiler. It’s very clear in my code that if I’m calling a function prepended with an underscore, I will find it in that file.

C# is more performative, and that’s a great reason to use it - if that is an issue for you. But I have yet to have that be a limiting factor in any game I’ve made yet.

As far as missing GDScript features, keep in mind the Godot Mono (the .NET version) allows you to use GDScript as well. So you can preload() anything you want.

I disagree. But I also use other tools to enforce that kind of stuff on larger projects. Such as forcing human code reviews, and using unit tests on all PRs in the pipeline. If someone changes an interface, either a person or the tests will catch it.

I also disagree because I use encapsulation and clear interface definitions along with code comments in all my GDScript code. Plus Godot’s use of signals easily allows you to enforce encapsulation by using signals to communicate between objects instead of making direct function calls where appropriate.

GDScript is a compiled language on export. It’s only interpreted when running in the editor. When your project gets large enough, you’ll notice the difference in loading times between C# and GDScript. After making a game in C# I decided that the benefits of the language did not outweigh the load time and compile time of C# for my game.

Using C# with Godot made me feel like I was back in the 90s programming in C++ and waiting forever for a compile before I could test. (It’s not even close to that bad because those builds were hours long.) However I’ve grown fond of an Agile workflow. Godot with C# is an impediment to me in that. Every time you want to press the Run button in C# you have to compile all the code. This is especially annoying when I just want to test a single scene and not the whole game.

Regardless, the cycle time for making a change, running a test, and then getting results is significantly faster with GDScript. For me, that quality of life is more important than the few language features I wish GDScript had.

I’m curious how come. I’ve dealt with Kotlin before professionally and I always wondered why people just didn’t use Java instead. I don’t know as much about Kotlin though, hence my curiosity.


I just want to re-iterate that I’m just giving my opinion. You do you.

I will add that I’ve been using Godot since 3.0, and the changes to GDScript have been HUGE. What finally sold me on GDScript was when they made it so you could make your functions type safe if you wanted. When I started, everything was duck typed. You just passed variants around. They’ve come a long way, and this is one of the most active open source projects I’ve ever seen.

One final note for anyone who is trying to decide. You can always move from GDScript to C# by using the Mono (.NET) versino of Godot and using everything you’ve already made, and then redo anything that you needs better speed for in C#. It’s harder to go the other way. (If C# is your jam, this approach probably isn’t worth it.)

3 Likes

I’m much more of a designer than a programmer. So I use whatever language is easiest as a means to get to the gameplay, which is my speciality.

That means to an end, for me at least, is GDscript. It’s easier than C# and is nicely integrated into the Godot Engine; which is also my prefered game engine.

I don’t think too hard about stuff like this, because I understand what I value most: Gameplay and Community.

3 Likes

Honestly, I still can’t understand the point of C# with Godot… As someone already pointed out, a programmer must choose the most appropriate language, in order to work as comfortably as possible. I made a tutorial (on my YouTube channel @sante76, in Italian, with English subtitles) dedicated to GDExtension, or C++. I essentially demonstrated that GDScript is as fast as C++, as long as you use the classes provided by Godot, because, in essence, it simply gives commands to the engine. It starts to have speed issues with calculations, especially with large loops, such as those for creating terrain meshes. At that point, however, I prefer to unleash the power of C++ with GDExtension, only for the parts of the code where it’s necessary. GDScript is so simple that it allows you to focus on the “artistic” side of creation, without getting lost in the frills due to the rigidity of other programming languages, like C++ itself.

This is not universally true, calls from C# code to engine methods is slower than GDScript, some times by a large margin, as all data is serialized when calling, code strictly in C# not interacting with the engine are usually faster, like looping over a container in C# (not necessarily engine containers like Array), but if you have a loop calling things on a node it might be slower, or at least not much faster

This is not the case, it’s always interpreted, though work on AOT compilation is being investigated