I recently started developing games on Godot after 3 months of Python experience. Is it good to learn Python before jumping into GDscript? If not, how different are the two? Is it okay to first learn Python in preparation?
Thank you! :)
I decided I should watch the official GDscript tutorials that the Godot channel put out, I have not finished it entirely as it is very long, so I was wondering if someone on the forum could answer :)
CodePudding user response:
Godot documentation is very clear, well organized and straigthforward.
You definately should take a look at it. If you just casualy read the General and Getting Started section from the navbar you probably gonna learn lots of things. Godot Docs
If somehow you still are doubtfull about GDScript, the docs also have a section under the Scripting link dedicated to it's introduction and other stuff. GDScript Docs
Have fun! :)
CodePudding user response:
Is it good to learn Python before jumping into GDscript?
It is not necessary. It is arguably good, but not because of it being Python specifically. Any prior programming experience will transfer well.
If not, how different are the two?
They have similar syntax. Keywords are different.
In general it is easy to translate algorithms from Python to GDScript. However, it might result in a suboptimal GDScript/Godot solution.
A common experience among beginners has been implementing things in GDScript to later discover that Godot already have a built-in way to do it that is both more convenient and more efficient (I'm not saying this is always the case, but that it is very common). Please notice that is not so much learning GDScript, but learning Godot.
Don't expect any advanced Python to work on GDScript. The reason being that GDScript semantics are closer to Java or C#.
I want to mention that in GDScript you are free to specify types or omit them from your code (in which case it behaves as a dynamically typed language). In general I encourage to use types, it allows for static analysis (and starting from Godot 4 it should give you better performance too).
Is it okay to first learn Python in preparation?
You can learn whatever. Learning Python first is OK. It will not hinder your experience with GDScript.
With that said, I want to point out that GDScript is a good entry level programming language. You can jump into GDScript without prior programming knowledge.
Is there any good sources such as books or writing that I should refer to?
While it is off-topic to ask for learning material on this site, it is OK to recommend…
There is a canonical answer: Tutorials and resources.
I decided I should watch the official GDscript tutorials that the Godot channel put out, I have not finished it entirely as it is very long
Do as you wish. People have different preferences for learning.
Some of us rather have a project to motivate us, and learn the things we need to get it done. Other prefer to explore and experiment the options. Others prefer to have tutor that guide them.
It is all valid.
If I were you, I would go with GDScript basics and jump in. But I'm not you.
so I was wondering if someone on the forum could answer :)
This is not a forum. This a Q&A site. Open ended conversations do not work well here.
With that said, I would like to point you to: the official Godot forum. See the Godot's community page.
I would also want to point out that despite GDScript being the intended and preferred way to use Godot, you don't have to. Yes, you might even use Python. And yes people coming from Unity might use C#. See using different programming language in godot game engine?. If you plan to do something like that, I would still encourage to give GDScript a try.