Section
Math and physics
Vectors
Vectors: arrows you can addLesson · beginnerWhat a vector really is: a step of “how far to go, and which way.” Adding, subtracting, multiplying by a number, length and normalizing, all in pictures, with no formulas to memorize.Dot product: how much two arrows point the same wayLesson · beginnerOne number that tells you whether a surface faces the sun, whether an enemy is in front of you, and where moss grows. Where the formula comes from and why it works.Cross product: an arrow perpendicular to two othersLesson · coreHow to get a perpendicular to two arrows, where the normal of a triangle comes from, why the vertex order matters, and how to tell whether a target is on the left or the right.
Angles and rotations
Angles, sine and cosine: a point on a circleLesson · beginnerDegrees and radians, sine and cosine as the coordinates of a point on a circle, the angle of an arrow, and waves: swaying grass, a rocking boat, a flickering light.Matrices: new axes, not a table of numbersLesson · coreA matrix is the axes and the origin, written as a table of numbers. Rotation, scale and translation, the order they apply in, the inverse matrix, and why everything gets multiplied by matrices.Rotations in 3D: Euler angles and quaternionsLesson · in depthWhy three angles sometimes “lock” and a camera tumbles, what a quaternion is without any higher math, and how to rotate smoothly from one direction to another.
Transitions, randomness, numbers
Interpolation: lerp, smoothstep and remapLesson · beginnerHow to move smoothly from one value to another: blending, clamping, converting from one range to another, and easing curves for motion and masks.Randomness: seeds, distributions and fairnessLesson · coreWhere a computer gets its random numbers, why one seed gives the same world every time, how uniform randomness differs from a bell curve, and why fair random feels unfair to the player.Numbers in a computer: integers, floats and precisionLesson · coreWhy 0.1 + 0.2 is not 0.3, why models jitter far from the center of the world, what overflow is, and why money does not belong in a float.
Physics of motion
Motion: velocity, acceleration and the time stepLesson · beginnerPosition, velocity and acceleration as three linked vectors, why everything is multiplied by the frame time, and how a game moves objects in steps.Forces: gravity, friction and dragLesson · coreA force changes velocity and mass resists the change: how objects fall, why they slow down in water and air, and where terminal velocity comes from.Springs and damping: a smooth camera and soft motionLesson · coreA spring pulls toward a target and damping stops the swinging. That is how games make a camera that catches up with the player, sway, recoil and soft interfaces.Collisions: how the engine knows that objects touchLesson · coreSimplified shapes for physics, overlap tests, rays and bounces: what happens when objects collide, and why the physics model is simpler than the one you see.Why fast bodies fall through wallsLesson · corePhysics sees the world in snapshots, and a fast body can leap over a thin wall between two of them. The contact window and the chance of tunneling, push-out in the wrong direction, thick colliders, substepping, continuous detection by sweeping, rays for bullets, speculative contacts, rotation and falling through at spawn.Buoyancy: objects on wavesLesson · coreArchimedes’ principle and average density: why a steel ship floats and a nail sinks, and how an object bobs around its draft with a period of 2π√(draft / g). In games: 3–8 sample points with a spring force and damping, roll from the difference between the forces, wave height as a sum of sine waves, one wave for the physics and the material, Gerstner waves, stability and the metacenter, drag along and across the hull, and small things without physics.