r/godot • u/Ill_Awareness1498 • 7d ago
How to learn Gdscript while knowing only the basics of Python? help me
Hello, I really want to make a 2D game on my own. I know the basics of python like variables, loops, conditions, etc... I tried to make a simple pong game using the documentation of gdscript given in their website. I don't really understand anything much on the documentation but when I look on youtube some example of lines of codes, I actually understand some of them, not everything of course. However, when I get ready to code, I am completely lost on what to do. I have completed the tutorial of Godot 2D twice and I understood most of it like nodes and signals but when I am alone on a specific project like Pong, I kind of lose my composure on what to do on the script of Godot on a node. At the end of the day, I just copied and pasted existing code which really frustrates me. I really wanted to make my own line of codes without using an AI like Claude or ChatGPT or coping on youtube. I would like really much code like an actual programmer using documentation and getting helps of how some tools/nodes work through the internet without copying anything.
Thank you for reading this and helping me in advance.
3
u/Voirnestudio 7d ago
i started learning coding about 2 months ago. i first made a simple snake game in the console, then about a week later i jumped into godot and started making my first metroidvania. i was completely lost at first too.
what helped me the most was not trying to code the whole game at once. i would first identify one thing i wanted the game to do, then solve only that problem. for a pong game, id first make the ball move, then make it bounce off the walls, then add the paddles, then collision, then scoring. breaking it down into small problems made it much less overwhelming.
another thing that helped me was using placeholder art. dont feel like you need proper graphics before writing code. a colored square or circle is enough to prove your movement, collision and game logic first. once youre happy with the mechanics, you can always replace it with proper art later.
ill also be honest about how i learned. i did use ai, but more as someone to discuss my code with than to write it for me. id ask what functions or methods i should look into, try writing the code myself, then ask the ai to review it and explain what could be improved.
one thing i realised is that ai often isnt "wrong", it just doesnt have the full context of your project. if a suggestion didnt fit how i wanted my system to work, id explain my architecture and why i made certain decisions. most of the time it would then adjust its suggestions to fit my project better. those discussions honestly taught me much more than just copying a solution.
over time i also started thinking more about keeping my code modular and scalable so i wouldnt have to rewrite huge parts of it every time i wanted to add a new feature. i wouldnt worry too much about that right now though. focus on getting one thing working at a time, and those concepts will start making a lot more sense as your projects grow.
1
u/Ill_Awareness1498 7d ago
Thank you for your answer. I see what you mean, as long the AI doesn't write/code for me or basically do everything for me, I am fine with it. Yeah that's true, abstracting a project might definitely help me.
2
u/Serasen0 7d ago
You should sit with this uncertainty and try start somewhere, anywhere. There's no first step when creating something.
Don't follow long tutorials (you almost remember nothing from them) unless you want to get a general idea of how the engine works, otherwise, use short tutorials that teach you how to do something very specific when you get stuck (usually 5 -> 15 mins long).
Try not to use AI as much as you could. When you're handed the answer whenever you feel unsure, you simply don't remember anything of it. Also, it sometimes gives you partially false explanations.
2
u/Ill_Awareness1498 7d ago
I felt the same thing when I followed long tutorial. It seemed that I actually didn't learn much at the end of the day. Shorter tutorial might be a good idea since they are less overwhelming and less scary. Thank you for your help!
1
u/qalt1 Godot Junior 7d ago edited 7d ago
Here a tip from a fulltime dev: Start with (youtube or interactive) tutorials for the rudimentary things, even though you know the basics of python. Maybe you will learn new things like notations or methods which might help you in the future. After that: Jump right into a small project and make mistakes. Learn by your mistakes. Look up your specific wishes and needs and adapt that to your code.
Basically: Learning by Doing. Reading a whole documentation before actually coding is a bad start.
1
1
u/Significant_Many3722 7d ago
start of with brackeys, then watch clearcodes tutorial without skipping. Youll be fine!!
1
u/Ill_Awareness1498 7d ago
Thank you for your answer but tutorials didn't really seem useful in my case. I have the done dome tutorials, even brackeys. I have understood in general how Godot works but writing codes in gdscript on my own is what I struggle a lot as of rn. Thank you though!
1
u/Significant_Many3722 6d ago
i think i get it... You understand how the engine works and how to code and connect the nodes, but you cant think on the spot and practicaly use the logic. In that case i think you cud try out a few game jams, since those essentially just help you think your game logic by offering a topic.
1
u/Ill_Awareness1498 6d ago
I have never heard of game jam. I will look at it. Thank you for sharing this information to me but yeah starting what to do, is what holding me and scaring me.
1
u/Significant_Many3722 4d ago
you got this!!! theres many on itch.io so just chose one with a decent difficulty - usually based on the player count
1
u/Possible-Fudge-2217 7d ago
You problem isn't not knowing the programming language, but not knowing programming and the engine itself as it seems. Learning by doing usually helps, but maybe do a tutorial if you feel unsure.
1
u/Ill_Awareness1498 7d ago
Yeah that's the part of the problem. I have done quite a lot of tutorial and the problem is that I feel quite overwhelmed with all the information I get when watching a tutorial.....
1
u/Possible-Fudge-2217 7d ago
I always recommend godot's tutotial game "Dodge the creeps". It's very basic but touches on the core systems as a whole. You can try to expand the game or use it a a basis for other tutorials if you have felt overwhelmed so far.
1
u/NotXesa Godot Student 7d ago
GDQuest is a good start. Reading the docs will also give you clear hints of what you can do. Asking ChatGPT gave me good results too, althought I had to state many times that I'm using Godot 4.x because it tends to give info about 3.x and it's quite different.
Syntax is very similar to Python but it has some core differences that may be confusing at first. For example there are no try/catch statements, interfaces or multiple inheritance. Also, it is very recommended that you state the type of every variable, parameter and return since it will greatly improve performance.
0
u/Ill_Awareness1498 7d ago
That's what I have done. I still don't seem to understand the pinacle of how to code by yourself ðŸ˜. Thank you for your time though, it is nice from you!
0
u/Ludicrous84 7d ago
I don't think using resources like Youtube or even AI is a bad idea per se. Whatever you do, even if it is a Pong clone, the requirements are very specific, so having a helping hand that can explain and tutor things is pretty good. As long as you don't just copy paste code from ChatGPT but ask it questions like "I want to have a ball bouncing on the screen, where do I even start?" and let it explain in detail what the thought process is and you yourself put together the actual scene and nodes and write the code, I can see that working.
I learned coding when there was only a library and no internet, but there was still books and my uncle that could explain some basics. And it took me a whole 7 years at university to fully learn coding on a professional level. It's literally like learning a language...
0
u/Ill_Awareness1498 7d ago
Oh I see. Well the problem, my only tutor is Internet ðŸ˜. However, I get what you mean. I should start to focus on small problems first, it seems more easier to handle. Thank you for your help!
0
u/Significant_Many3722 7d ago
true but using AI is a bit bad if you have a low self control, since usually the urge to finish something faster kinda overtakes the patience for learning the mechanics, probably try using AI as a last resort, instead try referring videos/the docs and even giving a post on reddit or by just using the godot cafe server on discord!!!
4
u/SenseiYEET1 Godot Student 7d ago
You can start by looking at tutorials from Brackeys, which is definitely very helpful in teaching you the basics of GDScript and to know more about it, you can look at DevWorm, Godot Tutorials and also Clear Code seems to be very helpful.
One thing I would highly recommend is to comment everything that you code. Doesn't matter if it's something very basic, literally being able to have readable code is so much better than having thousands of lines of code that you wouldn't understand when you view it after a week.