#C# Starting point

1 messages · Page 1 of 1 (latest)

acoustic pebble
#

Hi im learning about C# and im really new to godot. I want to use both of them and i think i have a little bit of an understanding of C#. Where do i begin to learn? i've set everything up with visual studio being my external editor, how do i learn what things do (what methods godot uses)? If you could give me a roadmap that would be good too

#

please do feel free to ping me whenever you answer

opal fjord
#

I'm a complete beginner myself with Godot and game engines in general. My programming background helped me learn C# quite quickly, and I intended to use C# with Godot. However, after spending a few hours per day learning the very basics of Godot for the past few weeks, it makes far more sense for me to use GDScript. Godot has a steep learning curve, and adding C# into the mix could be too much at this early learning stage. GDScript is relatively easy to learn, and it has been created for Godot. There is a section in the Godot manual for GDScript. If you continue with C#, I'd read the section in the manual relating to scripting with C# dot NET. I'm certainly not the best person to answer your questions, and it all depends on what works best for you.

idle pollen
#

I came to godot with a lot of C# experience. Realized very quickly that even if you're already comfortable with C# it's still easier to learn Gdscript to learn godot faster.
Have used Gdscript almost exclusively in godot since then, although I still like C# more..

last arrow
#

@acoustic pebble All the docs are useful for coding in C# as most things have a C# counterpart minus the exceptions mentioned here: https://docs.godotengine.org/en/stable/tutorials/scripting/c_sharp/c_sharp_differences.html

methods and properties simply use CamelCase instead of snake_case
So move_and_slide() becomes MoveAndSlide(), for example.

First you should learn the C# syntax tho. As it is more complicated than GDScript and has a lot more features that you probably want to master first.
I don't really have resources for it, i mostly just checked the official microsoft guides for features.
https://learn.microsoft.com/en-us/dotnet/csharp/

dry agate
#

C# is very similar to java, if that means anything to you

acoustic pebble
acoustic pebble
acoustic pebble
#

also from the examples, that would be PascalCase then? not camelCase?

acoustic pebble
opal fjord
# acoustic pebble yeah i understand, i just find it to be more beneficial for me if i were to cont...

There are a few "gotcha's" using C# with Godot (from what I've learned so far, so just be mindful of those). I do have a decade of experience with PHP, JavaScript, a little Java, plus other bits used for web dev, which has helped me to understand C# and GDScript quicker than I expected. I will eventually use C# with Godot as it is a great way to put it into practice. You can mix and match C# and GDScript with Godot, so if something isn't working as expected, you can switch that part of your code to GDScript until you figure out why. From what I have noticed, there's much more information using GDScript as opposed to C#, which was a factor I considered too.