Math 255- Math Fundamentals for Game
What is Math Fundamentals for Game?
Game mathematics turns positions, directions, forces, and shapes into calculations a computer can use. Vectors describe where objects are and where they move; trigonometry connects angles with directions; physics equations update movement over time; and collision tests help determine when objects touch or overlap.
This introduction walks through core ideas step by step, using simple numbers you can later translate into code.
A useful approach: Draw the situation → name the vectors → choose the formula → substitute numbers → check units and sign → test against the game (does it look right?).
1. Vectors
A vector stores a magnitude and a direction as components. In a game it can be a position, a velocity, or a direction.
Core Vector Operations
| Operation | Formula | Game Use |
|---|---|---|
| Addition | Combine movement and wind | |
| Scaling | Change speed | |
| Magnitude | Speed or distance | |
| Normalize | Direction only, length 1 | |
| Move | Update position each frame |
Step 1: Find the magnitude.
Step 2: Divide each component by 5.
Step 3: Check: . Conclusion: The unit direction is .
Step 1: Find the magnitude.
Step 2: Divide each component by 5.
Step 3: Check: . Conclusion: The unit direction is .