this post was submitted on 16 Aug 2024
155 points (98.7% liked)

PC Gaming

8576 readers
219 users here now

For PC gaming news and discussion. PCGamingWiki

Rules:

  1. Be Respectful.
  2. No Spam or Porn.
  3. No Advertising.
  4. No Memes.
  5. No Tech Support.
  6. No questions about buying/building computers.
  7. No game suggestions, friend requests, surveys, or begging.
  8. No Let's Plays, streams, highlight reels/montages, random videos or shorts.
  9. No off-topic posts/comments, within reason.
  10. Use the original source, no clickbait titles, no duplicates. (Submissions should be from the original source if possible, unless from paywalled or non-english sources. If the title is clickbait or lacks context you may lightly edit the title.)

founded 1 year ago
MODERATORS
top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 15 points 3 months ago* (last edited 3 months ago) (5 children)

I love Godot, I've followed some of the tutorials but I think I'm too stupid to ever understand vectors.

[–] [email protected] 37 points 3 months ago (1 children)

Keep at it! I'm sure you're heading in the right direction

[–] [email protected] 18 points 3 months ago

Subtle and well done. Your approach had both direction and magnitude!

[–] [email protected] 7 points 3 months ago* (last edited 3 months ago) (1 children)

Godot has one of the better explanations of vectors and their uses in games in their documentation, if you haven't checked that out yet. It focuses on their practical use rather than going deep into the mathematics (though there is quite a bit of that too).

And if you don't understand the math, the documentation also explains when and how to use specific methods, so you can still use it as a cheat sheet when working on your project even if you don't fully understand vectors.

(And you'll probably have an "ah-ha!" moment when working with them yourself. Like a lot of math, vectors are much easier to understand with practical, non-abstract examples.)

[–] [email protected] 4 points 3 months ago* (last edited 3 months ago)

Everything about this project is amazing, but the documentation is something else. It is written so perfectly concise and yet easy to understand, gives example code just when you'd need it (and 90% of pages have C# variants and includes notes on how it may differ!) and so you just walk away knowing exactly what to do, or with a link to another useful, beautifully written page with what you actually were looking for instead.

I used to think Unity had good documentation, but now that I've seen this it's just on a whole new level. It also genuinely makes me weep when I go back to work in a proprietary engine with such scarce notes that it's easier to look for other places it's used and spend a day writing your own for the poor souls who come after...

TL;DR Whoever writes the docs, I love you

[–] [email protected] 5 points 3 months ago

If you ever played Pen&Paper Battleship as child, you already know what a Vector2 is (Vector2i more precisely), it just didn't click yet.

[–] [email protected] 3 points 3 months ago

That's not really a godot thing.

[–] [email protected] 1 points 3 months ago (1 children)

A vector is just a group of numbers. That's literally all it is.

But the most common use is to describe something in three dimensions, usually a point in 3D space (x,y,z), or motion (still x,y,z but those numbers are in meters per second or something). But you could also use it for a color (r,g,b).

But what most people mean when they say "vector" is a set of three numbers, where two are direction and one is magnitude. You know how they're usually represented by an arrow? The direction components determine which direction that arrow points, and magnitude is the length of the arrow. (In two dimensions, this would probably be degrees of rotation and distance, like in a polar coordinate system.)

There are mathematical conversions you can do to translate one of those vectors into other forms. One popular one is a conversion to get the coordinates of the point at the top of the arrow.

[–] [email protected] 7 points 3 months ago (1 children)

I can't resist. I've been indoctrinated by my math classes: "A vector is an element of a vector field."

A bunch of numbers is not immediately a vector. To be a vector you need the defining functions of a vector field also. Like addition and scalar multiplication.

[–] [email protected] 5 points 3 months ago

In pure mathematics, that's. In game engines, a vector is a data type, and you can stuff whatever the fuck you want in its components. Not saying you should, but you can.

Generally they're just used where they make sense, like the direction+magnitude example. RGB is a little weird until you realize that a color is really just a point in a 3D space along the red, green, and blue axes.

[–] [email protected] 14 points 3 months ago

Their release page actually looks amazing

https://godotengine.org/releases/4.3/

[–] [email protected] 2 points 3 months ago

People report performance drops compared to 4.2