๐ Fundamental Math
Game development involves a lot of math, so you might want to dust off your high school books and brush up on math skills. You can start with the Fundamental Math for Game Developers article by Pikuma (HN thread). It will give you a general overview of the different fields of mathematics that are relevant to 3D graphics and games. The following video channels are great for diving in and learning the concepts visually.
Math for Game Devs by Freya Holmรฉr:
Pikuma channel:
Core Concepts
- Vectors โ the fundamental building block. A vector represents a direction and magnitude (e.g., velocity, force, position offset). Operations like addition, subtraction, dot product, and cross product are used constantly.
- Matrices โ used to represent transformations (translation, rotation, scale) and combine them efficiently. A 4x4 matrix can encode an objectโs entire transform.
- Quaternions โ the preferred way to represent rotations in 3D. Unlike Euler angles, they donโt suffer from gimbal lock and interpolate smoothly.
- Lerp (linear interpolation) โ smoothly blends between two values.
lerp(a, b, t)returns a value betweenaandbbased ont(0 to 1). Used everywhere: movement smoothing, color transitions, camera follow. - Smoothstep and damp โ non-linear interpolation for smoother, more natural transitions than raw lerp.
- Trigonometry โ
sin,cos, andatan2are essential for circular motion, rotations, angle calculations, and wave-based animations. - Projections โ converting between 3D world space and 2D screen space (and back).