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.