Need help with coding

Godot Version

Godot 4.4

Question

So umm well I have been trying to code and understand GDScript for maybe 2 Years now and you know how far I have come I only really understand If, While loops functions a little bit and I am comfortable with Godot but I just don’t understand coding logic and well it’s shooting me in the back, I just want to understand the Game Logic or Coding Logic :frowning:

1 Like

What have you done to try and learn so far? What has been more effective vs. less effective in your learning process? Do you know if you’re a visual, auditory, read/write or kinesthetic learner?

3 Likes

Well i don’t know what type of learner i am but i actually can make pretty good Menus (not functional options menus though)

Not that that matters

All I really know is like i know what stuff does and so i am like “oh this is the result i want, this code combined with this code would = what i want“

Menus are tough, I’ve seen lots of hair pulled out from UI work lol.

Hard to give specific advice without knowing a lot more about you. If you have a grasp on the basics, make games, small games with one main feature. Break features down into little parts, code the little parts, and put the pieces together.

I’d say programming could be split up into these parts, maybe more

  • syntax (keywords, how to make variables, etc)
  • control flow (using ifs, whiles, and functions)
  • containers (using arrays, dictionaries, classes)
  • programming patterns (signals, scene tree structure, globals)
  • algorithms (sorting, mathematics, memory management)

As you read down the list do any jump out to you as exceedingly difficult?

2 Likes

This is what i know: syntax (keywords, how to make variables, etc), control flow (using ifs, whiles, and functions), programming patterns (signals, scene tree structure, globals)

The 2 ones i don’t know kinda feel difficult: containers (using arrays, dictionaries, classes) and algorithms (sorting, mathematics, memory management) (I actually might know a little of this last one)

Also i might be either a Visual Learner or a Reading/Writing Learner

Making an inventory system might be good practice with containers (sounds obvious while I write it down), I usually recommend against inventory systems but if you are good with UI and are looking to challenge your understanding of container types it could do you well.

For learning more algorithms, maybe build a parkour 3D character controller; wall jumps and slides etc. Such features require a good understanding of mathematics, typically 2D and 3D math will overlap, rotation is the largest diversion.

Pseudo random generation will also test algorithms, generating terrain is fun to tweak parameters and see how updating small values can result in drastic changes depending on your equation.

1 Like

You recommend i make something that hard to make? (for me right know those kinda seem impossible)

Always :slightly_smiling_face:   best way to learn

There are many types of inventories, some may be more complicated than others. RPGs would hold a list of items with their count, more complicated games have slots, and some make you fill those slots with odd-shaped blocks; maybe you can start with a list of items and how many the player has? Instead of making a whole game around it use a debug menu with buttons to add or “sell” an item.

Come back to the forum with any questions!

1 Like

I recommend following a tutorial, either written or on YouTube. See which you prefer. Following tutorials also allows you to develop skills by practicing.

That usually didn’t work out for me

Interesting. How come?

I don’t know i usually just left it well the same as i did when i got to it but with something added to my project

Hmmm.

Have you tried this out?

It’s more interactive and shows the code and effects side-by-side. It also goes slowly. Perhaps it might help you learn concepts?

2 Likes

Yep I have but i don’t think I knew how to learn i guess and i still don’t know how to learn (for coding) also i kinda just really scrolled through i guess not really

What kind of help are you expecting to get?

Make It Stick is a good book on learning to learn (or teach). Many chapters may seem obvious, but putting techniques front and center helps more than a general understanding of varied practices. Some things are surprisingly not obvious, like taking time to forget is important; or (ironically as it’s been brought up in this thread) that what “type” of learner often discourages people from exploring all their options more than helps.

Though, it’s hard to apply many learning techniques to programming as it’s (hopefully) always unique problem solving, and you may be required to solve one hard problem in order to solve easier ones.

Practice problems are hard to come by in game development, it may be better to work on general programming and come back to Godot with what you’ve learned, “rustlings” has started a “language-lings” trend of little problems to help you learn a specific language, maybe try some of those out? GDScript from zero is similar to a “-lings” project for GDScript. Short programming problems may also be called “leetcode” challenges (not necessarily the .com)

2 Likes