The math your game engine hides
Open any game engine and you'll find a Vector3, a Physics.Raycast, a rotation matrix — tools you can lean on for years without ever knowing what they do. This book is where you find out. Starting from an empty window, you write the vectors, the dot and cross products, the collision tests, the physics, the pathfinding, and — by the final chapters — every pixel of a small software 3D renderer, all from scratch, in modern C++. SDL3 opens a window and draws a triangle; everything of substance is your own code, shown and explained line by line.
Small demos, big understanding
It is, on purpose, not a "build one big game" book — and that's the point. Instead of a sprawling project you can lose the thread in, every idea gets its own tiny interactive demo you run and poke at with the mouse, so the concept you're learning stays front and centre. You watch a dot correctly chase your cursor, a fast bullet finally stop punching through a thin wall, a textured cube spin without warping. The demos stay small; the understanding doesn't.
What you'll build
- 36 runnable, interactive demos — one per idea, every one from scratch
- Vectors, trigonometry, matrices, and quaternions — derived, not assumed
- Collision detection, raycasting, a small physics engine, and pathfinding (BFS, Dijkstra, A*)
- A complete software 3D pipeline: projection, cameras, the z-buffer, and perspective-correct texturing
- Exercises — and an optional "study it with an AI" prompt — at the end of every chapter
- The full, ready-to-run source for all 36 demos on GitHub
Who it's for
Intermediate C++ programmers who are comfortable with classes, references, and std::vector. You need no prior game-math background — the one feature beginners often haven't met, operator overloading, is taught the moment it's first needed. Walk away able to stop treating your engine's math as magic, and to build every piece of it yourself.