DEV Community

Cover image for Phase 5 Final Game Shipped โ€” Doodle Jump Clone Live on 7x.games
7x Games
7x Games

Posted on

Phase 5 Final Game Shipped โ€” Doodle Jump Clone Live on 7x.games

Phase 5 is Complete! ๐ŸŽ‰

The final game of Phase 5 just went live on
7x.games โ€” a Doodle Jump clone
built from scratch with vanilla JavaScript and Next.js.

๐Ÿ‘ฝ Play Doodle Jump Free


How I Built It

The core mechanic of Doodle Jump is surprisingly
tricky to get right in a browser:

The main challenges:

  • Infinite upward scrolling without actually moving the character up โ€” instead the platforms move down
  • Procedural platform generation that feels fair but gets progressively harder
  • Mobile touch controls alongside keyboard support
  • Enemy spawning at higher scores without making it impossible

Tech used:

Rendering    โ†’ Canvas API
Game loop    โ†’ requestAnimationFrame
Controls     โ†’ Keyboard + Touch events
Storage      โ†’ localStorage for high scores
Framework    โ†’ Next.js 14
Language     โ†’ Vanilla JavaScript
Enter fullscreen mode Exit fullscreen mode

The Infinite Scroll Trick

Most beginners try to move the character upward.
The correct approach is the opposite:

// Wrong approach โŒ
character.y -= jumpForce

// Correct approach โœ…
// Keep character centered, move everything else down
if (character.y < canvas.height / 2) {
  const offset = canvas.height / 2 - character.y
  character.y = canvas.height / 2
  platforms.forEach(p => p.y += offset)
  enemies.forEach(e => e.y += offset)
  score += offset * 0.1
}
Enter fullscreen mode Exit fullscreen mode

This keeps the player visually centered while
the world scrolls โ€” much smoother and easier
to control.


Platform Generation

function generatePlatform(y) {
  return {
    x: Math.random() * (canvas.width - PLATFORM_WIDTH),
    y: y,
    width: PLATFORM_WIDTH,
    type: score > 500 ? getRandomType() : 'normal'
  }
}

// Types unlock progressively
// normal    โ†’ always there
// moving    โ†’ unlocks at score 200
// breaking  โ†’ unlocks at score 500
// spring    โ†’ unlocks at score 300
Enter fullscreen mode Exit fullscreen mode

Mobile Controls

Desktop uses arrow keys but mobile needs
touch/tilt support:

// Touch โ€” tap left/right side of screen
canvas.addEventListener('touchstart', (e) => {
  const touch = e.touches[0]
  const midpoint = canvas.width / 2
  if (touch.clientX < midpoint) {
    keys.left = true
  } else {
    keys.right = true
  }
})

// Device tilt as alternative
window.addEventListener('deviceorientation', (e) => {
  if (e.gamma < -10) keys.left = true
  if (e.gamma > 10) keys.right = true
})
Enter fullscreen mode Exit fullscreen mode

What's Next โ€” Phase 6

Phase 5 is fully complete with 47 games live.
Phase 6 starts now focusing on Kids Math Games:

  • โฑ๏ธ Times Table Practice
  • ๐ŸŽฐ Math Bingo
  • ๐Ÿ”ข Number Bonds
  • โž— Fraction Math Game
  • ๐Ÿ’ฐ Money Math
  • ๐Ÿ›๏ธ Roman Numerals Game
  • ๐Ÿช Cookie Clicker
  • ๐Ÿ‰ Watermelon Game (Suika Clone)

Target: 160 total games by end of roadmap.


Play All 47 Games Free

๐ŸŽฎ 7x.games โ€” No download.
No login. Works on mobile and desktop instantly.

๐Ÿ‘ฝ Latest โ†’ Doodle Jump Clone


*Building in public โ€” follow along as I go
from 47 โ†’ 160 games. Feedback welcome! ๐Ÿ‘‡

Top comments (0)