{"revision": {"id": "f3371f84-2f95-11f1-ab89-e86a64d24d78", "node_id": "f336800e-2f95-11f1-910b-e86a64d24d78", "user_id": "edc3f576-2f95-11f1-900f-e86a64d24d78", "author": "foxhop", "data": "Vector Math for Video Games\r\n=============================\r\n\r\nThis document outlines the common vector math formulas and terminology that is used for building 2d games.\r\n\r\nWhen introducing a new concepts such as vectors, real life examples assist in the learning process. A real life example of a vector is an analog clock.  Analog clocks have hands to represent time.  These hands could also represent vectors.  The hands much like vectors have different lengths or magnitudes.  The hands also have different directions just like the vector.\r\n\r\nTerminology\r\n--------------\r\n\r\n**Vector**\r\n  A quantity possessing both magnitude and direction, represented by an arrow the direction of which indicates the direction of the quantity and the length of which is proportional to the magnitude.  We can represent vectors in our games to determine how to move entities in relation to each other.  \r\n\r\n|\r\n\r\n**Magnitude**\r\n  The size, extent, or length of a Vector.  \r\n\r\n|\r\n\r\n**Direction**\r\n  The position or orientation of a vector.  Vectors point into different directions in space.\r\n\r\n\r\n\r\nHow do we use vectors in games?\r\n--------------------------------\r\n\r\nVectors help keep track of space in games.  Vectors are used to move players and projectiles.  Once you learn how to do vector math, teaching the computer how is lots of fun.  Yes, programming is sort of like teaching a computer how to perform an action.\r\n\r\nWhat is a vector\r\n---------------------\r\n\r\nA vector consists of two points in space.  This document assumes knowledge about points (x,y) coordinates.  If you do not, please research graphing points on a graph.  \r\n\r\nMath has developed many techniques to find out many things about space using vector techniques.  I'm going to document the techniques need to create 2d games.\r\n\r\nVector Techniques for 2d games\r\n----------------------------------\r\n\r\n    ", "source_format": "rst", "revision_number": 2, "created": 1295639207000}}