#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Vectors!

Member

Please I need someone to tell me where I can apply vectors in game programming🙏

• Member

Are you asking in a "When am I ever going to need this?" way, or are you looking for game mechanics based on vector math?

Vector math is an absolutely necessity when working on games, or any 2D/ 3D application. They represent points in space, directions, rotations, sizes, you could just uses them as data containers for 3 floats. Speed, velocity, collisions, normals, all of them use vector math.

Where can't you apply vectors in game programming?

Remember that EVERYTHING on your computer is represented mathematically, and at its core that is all your computer does. Solve math problems, and plot pixels.

@Mouledoux is spot on, all of the data in games is stored with vectors, matrices and other concepts relative to linear algebra. You absolutely cannot get anywhere without it.

When a game tells you how far your character is from an objective marker, it uses the euclidean distance function, which takes 2 vectors as arguments, and gives you a scalar representing the distance. That is just one example.

If you do anything in Unity you will come across/work with vectors, so I encourage you to open Unity and try stuff out.

Happy to help :D