GDQuest / learn-gdscript

Learn Godot's GDScript programming language from zero, right in your browser, for free.
https://gdquest.github.io/learn-gdscript/
Other
2.11k stars 159 forks source link

Learn to Code From Zero with Godot. Chapter 22 Exercise #770

Open vbgunz opened 1 year ago

vbgunz commented 1 year ago

Regarding the exercise https://gdquest.github.io/learn-gdscript/#course/lesson-22-functions-return-values/practice-llf8B67U.tres

Up to this point, papa bless whomever was in charge of developing it. It's well written and clear and impressive. I've knocked out every exercise without an issue but the moment I got to the chapter 22 exercise, I felt like I was left out to dry. Maybe I'm ahead of myself. I think some hints could be helpful.

Math operations on Vector2 objects are pretty simple (when you know). Vector2(5, 5) * int(10) = Vector2(5 * 10, 5 *10)

You can also use math operators between Vector2 objects and calculate new Vector2 objects. Vector2(5, 5) * Vector(10, 10) = Vector2(5 * 10, 5 * 10)

Maybe I've should have known. I believe hints will help others? What cells are being passed in e.g., Vector2(2, 3), Vector2(5, 2) all have the associated cell_size Vector2(80, 80). I think maybe seeing it written out helps too.

NathanLovato commented 1 year ago

I'm sorry, but could you help me understand exactly what it is that you struggled with? When you reached this practice, you didn't know how vector multiplications worked and you were unable to complete it with the provided hints?

vbgunz commented 1 year ago

I'm sorry, but could you help me understand exactly what it is that you struggled with?

For some reason, I struggled with what exactly was being passed in and how I was getting the answer. I think just some hints on how Vector2 OP Vector2 work (in the hint) would have helped. Along with the fact that you could operate with a single value e.g., Vector2(5, 5) 2 is really Vector2(5 2, 5 * 2).

For some reason, I might have missed it, but it was the first exercise in which I got stumped and the hints didn't help. The whole lesson otherwise is fantastic and extremely helpful. I admire the effort <3

NathanLovato commented 1 year ago

Thanks for the feedback!