Howdy, Stranger!

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

Vectors!

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

Best Answers

  • MouledouxMouledoux Member
    Accepted Answer

    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.

  • WarpWarp Administrator
    edited June 2020 Accepted Answer

    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.

  • WarpWarp Administrator
    Accepted Answer

    Happy to help :D

Answers

  • @Mouledoux

    Thank you so much for your help!! Really appreciate that a lot. Really hope I will be able to answer one of your questions one day

  • @Warp you seem to know a lot about game programming. Thank you for answering my question, I didn't know Vectors were so useful. I think I will follow your advice and try something out. Thank you again👌

Sign In or Register to comment.