Choosing Your Godot Programming Language: C#, C++, GDScript,...

preview_player
Показать описание


------------------------------------------
🖋 *SYNOPSIS*

Learn about the 3 programming languages of Godot and decide which to use when and for what or choose the one that's right for you.

#godot #csharp #cplusplus

-------------------------------------------
*CC-BY 4.0 LICENSE*
Рекомендации по теме
Комментарии
Автор

On the state of c# right now: at the time we release this video (January 2024), you can't export c# games to the browser with Godot 4. This was possible in Godot 3 and is probably just a matter of time.

Godot depends on .NET releases for some c# platform support.

Right now you can make desktop and mobile games with c# in Godot.

Gdquest
Автор

You ask 5 gamedevs what language you should use, you'll get 6 different answers.

filiformis
Автор

When it comes to programming languages, as long as any developer knows their fundamentals by heart, the only thing you have to "learn" for a new programming language is the syntax. In the case of C/C++, it would be memory management, caching, and a few other things. But overall, the fundamentals of programming is all you need to "master" any programming language and write good programs with it.

AstonJay
Автор

The Zero compile time for gdscript is an absolute killer feature

ajmgdaj
Автор

I wish there was a beginner-friendly interface for C++ developers out of box. I get the idea of using GDNative, but I really don't like the fact that you have to manually download it and do settings you probably won't understand.
Solution example: when you wanted to create a script for a node in C++, the Engine would had automatically added both header and code files with presettings of the parent node. It also would have helped a lot in object-oriented programming, providing you more access to nodes and libraries. The libraries themselves could have been added in a specific folder, guaranteing users that the libraries will be available in both debugging and exporting projects

Shadow-csoy
Автор

For performance, the bottleneck is actually whether it's CPU (script) or GPU (shader) that does the calculations. This means that the shader language is the 4th language and is the most efficient, especially with compute shaders.

It's currently a drag to integrate into your code, but learning it is fairly smooth, results are fast and optimisation is through the roof, especially with complicated marching-cube terrain-generation, for example.

anastasiaklyuch
Автор

I think you left out a major consideration aspect - long-term sustainability. For projects that last years and involve multiple people at the same time (~3 and more?), I think C# might be the way to go because of the tooling. You mentioned Rider and I cannot stress enough how big of a deal it is to have a full-fledged IDE at your disposal. Namely refactoring is something that's not easy for a GDScript codebase. If you have a long-running project, refactoring is inevitably something you will need to do. When the time comes, you might pay a price for the fast iteration speed of GDScript.

Not an issue for me, I have a 1000 unfinished GDScript games so far :) But I think it's important to think about

vojtastruhar
Автор

I'm really enjoying using Godot to build my game. It's a RTS with Survival elements. That said, I needed some specific codes to be really performant. I'm currently building everything in C# (because of the available libraries) and Rust (because it's my "main" language) for the performance-critical code.
I really liked using GDScript in the past. That's to say my choices were probably more personal than pratical.

feripuru
Автор

Your GDScripting app was what convinced me to Godot over Unity as I started learning Python during the pandemic and the similarities meant I wouldn't have to start learning a brand new language as I'm not a professional programmer. Then a couple of months later the whole Unity debacle happened and I'm glad I decided to go with Godot even though I'll likely never make the amount of money required to have to pay for it, the fact that Unity did that the way they did is a very shady thing to do and I feel they will just slowly make changes to their pay structure anyways.

Snyper-ifkt
Автор

I did NOT know you could debug in real time! I always just closed the game window, make a change in editor, and run the game again!. MY MIND IS BLOWN!!!

grilleFire
Автор

One thing people should know is that Godot 4 still doesn't support C# for web exports, so if you're targetting the web that's currently not an option.

majorgnu
Автор

Some upsides that were missed with C# (IMO, the largest ones):

1. It's statically typed and compiled, so fewer runtime errors and basic features like typed dictionaries.
2. Intellisense is orders of magnitude better, noticed that GDScript gets pretty wonky.

I still use GDScript, but project is getting large enough that I need more sanity checks, and am willing to add C# boilerplate to avoid the major drawbacks of GDScript.

nullismstudio
Автор

A tutorial video on just the big differences between C#/C/C++ and GDScript would be great for someone like me only familiar with the former.

pointyheadYT
Автор

I was going to use unity but you turned me right around to Godot. Thanks!

SamdaChao
Автор

Overall a pretty good video and did a good job explaining the tradeoffs.

Minor nits: Strange that you didn't mention that the #1 reason to use C# and the why developers want it is because that's the language Unity uses, and developers simply want to be able to re-use their code; so if you're coming over from Unity, it's probably easiest & best to use C#. Similarly, another reason to use C/C++ is that the code you write can be re-used, often without modification, on pretty much *any* other computer / engine / OS; unless it's a Godot-specific interface; which you should minimize. Have code from an old game that runs on Windows or native Android or possibly even iOS (if you were smart & didn't use Obj-C / Swift); it can just be reused as is.

lamelama
Автор

I came to Godot as a very fresh programmer with some Basic knowledge. GDScript has been amazing to learn, in no small part due to your channel and courses. One of the best things about it is that it is growing as a language and grows with the engine. Though this causes some dramatic changes, like in Godot 4, I am very excited to see what comes out in the future.

NateyC
Автор

The next video should highlight the following:
1- The Godot engine is an open and community-driven project.
2- In addition to GDScript, C#, and C++/C, programming languages such as Rust, Swift, and others are available, thanks to contributions from the community.
3- There are also game engines like RPG in the Box, The Mirror, and Cozy Blanket developed using the Godot Engine. 😁

QatariGameDev
Автор

I dislike that they said that the language being weakly typed was an important advantage as well as it being an interpreted language. Both of those make your final product more prone to errors / bugs. I do C# development as a career but i started in PHP and those two things are exactly what made me hate PHP and the reason i moved to looking for a C# job

deathofthemagi
Автор

I believe that GDScript for gameplay in general, and C++ in a C style for algorithms might be a good combo for me. Thanks for the video.

brunoarnoni
Автор

As someone who just wants to makes little games as a hobby. And doesn't know much about programming. I love gdscript.

troy