Build a 2D Physics Engine
Build a Box2D-style 2D physics engine: vector math, semi-implicit Euler integration, AABB + circle collision, broad-phase via spatial hash + sweep-and-prune, SAT narrow-phase, impulse-based response with friction + restitution, distance + spring constraints, sleeping for stability.
advanced14 lessons4 chapters14 graded exercisesPython
No sign-up needed for lesson 1 · certificate on completion · sign up to save progress
What you’ll have built
Chapter by chapter. Every step is a graded exercise.
- Math & Integration
- Collision Detection
- Collision Response
- Production
Starts in Python — solve in the language you choose in the editor, same tests either way.
Curriculum
4 chapters, 14 lessons. Each lesson is a short read, one graded exercise, and a quiz.
- 1What Physics Engines SolveRead · exercise · quiz
- 22D VectorsRead · exercise · quiz
- 3Numerical IntegrationRead · exercise · quiz
- 4Symplectic vs Explicit EulerRead · exercise · quiz
Loading reference solution…