Idea · Aug 25, 2026
Physics Puzzle Engine Lab
Students build a 2D physics engine from scratch using the Canvas API, then use it to author five puzzle levels that each demonstrate a specific physics behavior.
What it would do
Over six weeks students implement a small but complete 2D physics engine: AABB collision detection, discrete impulse resolution, axis-aligned friction, simple joint constraints, and a basic broadphase. They write every algorithm themselves (no physics libraries) in plain JavaScript with the Canvas API. In the final two weeks they use their engine to design five puzzle levels, each targeting one mechanic (stacking, sliding, swinging, bouncing, domino chains). A required design document explains the physics decisions made for each level. The dual deliverable teaches game architecture and applied geometry/math simultaneously, and the puzzle design phase requires students to reason about emergent behavior rather than just pass unit tests.
Key features
- Engine milestone: AABB detection + impulse resolution by week 2
- Engine milestone: friction, restitution, joints by week 4
- Level design milestone: five playable puzzle levels by week 5
- Written design document explaining physics parameter choices for each level
- Optional stretch: integrate a Claude API 'playtest critic' that describes what a player would experience