Doodle Jump is the classic "go up forever" game — and it teaches one idea every platformer needs: instead of moving the player up, you move the world down. Here's a playable build in vanilla JS + canvas.
🦘 Play it (←/→ to steer): https://dev48v.infy.uk/game/day15-doodle-jump.html
The bounce is automatic
There's no jump button. Every time the character lands on a platform (detected only while falling, vy > 0), you set its velocity to a fixed upward value. Gravity pulls it back down, it lands, it springs again. Your only job is steering left/right — with screen-edge wrap.
The camera trick
The player never actually rises past the middle of the screen. When it climbs above a threshold, you scroll everything else down by that amount and add the distance to the score. It feels like flying up; really the world is sliding down.
Endless platforms
As platforms scroll off the bottom you remove them, and you spawn fresh ones above with slightly random spacing (wider as the score grows = harder). Miss them all, fall off the bottom → game over.
🔨 Full build (loop → gravity/bounce → collision-on-descent → camera scroll → spawn/cull → score) on the page: https://dev48v.infy.uk/game/day15-doodle-jump.html
Part of GameFromZero. 🌐 https://dev48v.infy.uk




















