0 votes

Hi,

I'm new here and can I say how pleased I am do have found an engine that is under active development. For years I have been trying to learn Python and I thought that the only option was Pygame or Unity. Sadly to use unity i'd have to learn javascript and I really have no interest in that as I love Python. Why learn something that just adds complexity.

So I was delighted to find GDScript is mainly based on Python.

The problem I'm having is I have grasped many of the core concepts of Python but its all functional style. For years I have been trying to get by head found OOP and no matter what I look at I still can't get it. I feel this is holding my back from moving forward.

So my question is does anyone know of any good OOP tutorials. I know about Simon Allardice's courses but have not got to buying them yet. As never been a big fan of IDLE so I use a little app called Thonny instead.

Thanks in advance.

in Engine by (29 points)

As always, things depend on what you're trying to achieve. If you are into game engines, I would rather focus on understanding how to achieve what you want within the framework of the engine itself. If you over-focus on strict programmatic principles and architecture you will eventually hit walls which I think is unnecessary. You are anyway attaching smaller scripts to various nodes and maybe routing some signals between them.

Personally, I discovered that the language itself is not that important - I was a bit put off by GDScript in the beginning, but in the end it turned out quite OK - it is efficient, it gets thing solved without to much fuss.

For game programming I would rather focus on patterns like the one in this great online free book: Game Programming Patterns

Sorry for not answering the question directly, but I just get the feeling that you're putting up an unnecessary barrier for yourself if you want to make games :-)

2 Answers

0 votes
Best answer

Try here https://python.swaroopch.com/oop.html
There some code samples to run and try, to get a hand on OOP.

Or here : http://www.python-course.eu/object_oriented_programming.php with some graphics, that help understanding.

You will quick understand that all documented features of Godot are classes/function and objects.

by (334 points)
selected by
0 votes

You can try this book Think Python. Not free but really helped me.

by (48 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.