GDscript or C#

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By VSP-DEV

Hi, I am using godot engine for few days and I liked the engine. But I wanted to ask that What should I choose as a scripting language for using godot. I have learned GDscript and c# both. But if I move to a bigger project will GDscript be usefull or not? or c# will provide a better experience

:bust_in_silhouette: Reply From: rahsut

Just use which one you’re more comfortable with and which one you’ve used the most.

But, if I had to pick personally, I’d do GDScript for 2D games and C# for 3D games. Other video game engines use C# and those are usually 3D engines because C# works perfectly for that.

To be completely honest, when you do bigger projects, you might not be able to search things up on the internet on how to do a certain thing. In that regard, if you’re comfortable with C#, stick with it (also if you’re great with programming and don’t use the internet for everything you need to do in programming) but if you are new to programming, or find GDScript more easier, stick with that because there are a lot of tutorials in the internet that are in GDScript but not as much in C#.

That’s my take, hope that helped :slight_smile:

Yes that helped a lot. Thanks for help I am thinking to use as you say.

VSP-DEV | 2020-08-21 06:26

:bust_in_silhouette: Reply From: hidemat

Personally, I would use gdscript, as it is the most native to Godot, and this is the language that most of the community uses.

Having said that, there might be some reasons where you might want to use c#:

  1. If there is a c#-only library that you wish to integrate into your project.
  2. If you need c#-only functionality that you might not have in gdscript.
  3. You need to write a performance critical section of code.

Having said THAT, if you need performant code, it might be worth while learning c++ as it is the language that Godot is written in, and is extremely fast. GDnative (GDextension in Godot 4) for c++ plugins, and C++ modules for actually modifying source code.

Yeah, but don’t forget the benefits of static typed languages:

Let’s say someone writes the following function:

func do_something(a, b):
    return a + b

Is this function for string concatenation or adding two integers?

juppi | 2022-03-18 18:38

Gdscript has optional static typing though.

func do_something(a : int, b : int)  -> int:
    return a + b

And this will actually have performance benifits in the latest gdscript builds (Godot 4 if I’m not mistaken)

hidemat | 2022-03-22 01:02