Every rule in this game lives in one file with fifteen functions in it, and each of those functions is a piece of math. Students in the Build a Game Engine Out of Math course write all fifteen, one or two a week, and build this game on top of them as they go.
Press M while playing. The pink boxes are the collision bodies and the blue arrows are velocity. A jump leaves a trail of dots, which is the arc the quadratic makes. The orange triangles run to the coins, with the nearest one labelled: that is the Pythagorean theorem, drawn live. The circles are the touching test. The dashed lines under the enemies are their patrol ranges with the sign of their speed, the purple arrow on the ghost is its heading with a length of exactly one, the strip in the corner is the camera's slice of the world, and the panel is the six numbers the engine holds for the player. None of it is decoration: it is the engine showing its own arithmetic.
This page is play-only on purpose. The point of the course is that the person playing it could have written it, and by week eight, they have.
For teachers Game design and development, upper elementary through high school
The platform game from the Build a Game Engine Out of Math course, with every system in place. Play it, then press M to watch the engine: hitboxes, velocity arrows, and the live triangle to the nearest coin.
In class: The finished platformer, play-only. Press M to see the hitboxes, velocity arrows and the triangle to the nearest coin: the labs above, all running at once.
Students need no account and nothing to install, so it works on Chromebooks and as a sub plan.
Share to Google ClassroomMore game design and development activities →