Interactive tutorials · built from the videos

Game Math
you can grab.

Thirteen hands-on chapters that follow the same path the videos take: start from math you already know, add one slider at a time, and watch it become curves, flocks, walking feet, fireworks and pixels. Every chapter opens with a press-play lesson — a 90-second movie that explains itself and pauses when it's your turn.

it's weighted averages all the way down
0 / 11 lessons done ▶ continue
The spine — math → pixels
CHAPTER 01

Vectors & the Dot Product

Arrows are numbers. Drag two of them and watch the dot product answer "same direction or not?" — the trick behind enemy vision cones and lighting.

a · b = |a||b| cos(θ) open →
CHAPTER 02

Lerp → Bézier Curves

The midpoint formula from school, one weight slider, and suddenly you've invented the pen tool. Named points, construction lines, the whole magic.

P = (1−t)·A + t·B open →
CHAPTER 03

Matrices Move Worlds

Translate, rotate, scale — a matrix is a machine that eats every point of a shape. See the numbers change live, and why order matters.

p′ = M · p open →
CHAPTER 04

Why a GPU at all?

Race a CPU doing pixels one-by-one against a GPU doing them all at once. Then read the real shader line every 3D game runs.

gl_Position = P·V·M·pos open →
Motion & life
CHAPTER 07

Sin, Cos & Motion

One spinning point explains all of trig. Unroll it into a wave, then make fish swim, bees bob, and moons orbit — with two lines of math.

x = r·cos(θ), y = r·sin(θ) open →
CHAPTER 09

Springs & Smoothing

Why game cameras feel buttery: lerp a little bit, every frame. Then add springiness and overshoot — the secret sauce of "game juice".

x += (target − x) · k open →
CHAPTER 05

Boids — Flocks from 3 Rules

Separation, alignment, cohesion. Three tiny forces, weighted and summed, and a hundred triangles start behaving like birds over a lake.

F = w₁Fs + w₂Fa + w₃Fc open →
CHAPTER 06

Inverse Kinematics

"The foot must land here — figure out the knee." Drag a target and watch a jointed arm solve itself, exactly like feet on uneven stairs.

angles ⇄ end effector open →
CHAPTER 08

Particles & Forces

Every explosion, spark and smoke puff is the same three lines: force → velocity → position. Build fireworks and bend them with wind.

v += F·dt; p += v·dt open →
The GPU deep cut — where it all meets
CHAPTER 11

The 3D World — press W, watch a matrix

Drive a neon wireframe ship. Moving edits the Model matrix, mouse-look edits the View, sniper-zoom edits the Projection — all three live on screen.

screen = P · V · M · point open →
CHAPTER 10

Shaders — the GPU's tiny programs

color = f(x, y, time). Write pixel functions, light a sphere with the chapter-01 dot product, and snap it into toon shading.

brightness = max(0, N·L) open →
CHAPTER 12 · CAPSTONE

A tiny RTS — every chapter, deployed

Command a squad, dodge the watchtower's vision cone, watch shells arc and health bars lerp. Six formulas composing into behavior. X-ray included.

seek + separate + arrive + spot + shoot + smooth open →
CHAPTER 13 · THE ARCADE

Three tiny games, three kinds of math

A racer that IS a Bézier curve, a platformer that IS a parabola, and a lead-the-target turret that IS a vector equation. Playable, with live formulas.

🏎 P(t) · 🐸 vy += g·dt · 🎯 pos + vel·t open →

Suggested order: 01 → 02 → 03 → 04 is the math→pixels spine, then go deeper with 11 (the 3D world) and 10 (shaders); the rest are where it comes alive. Every page stands alone.