🐸 FROGGER

Nine lanes of traffic. One frog. Good luck

← Back to Fun Time
Score
0
Lives
3
Crossings
0
Best
0

⌨️ Controls

  • or W A S D hop one square
  • Tapping the board hops towards where you tapped
  • P or SPACE pause
  • R start a new game
  • 🎮 Xbox controller? Just plug it in or pair it — the stick and D-pad are the arrow keys, A is SPACE, Menu pauses and View starts again

🎯 How to play

  • Hop from the bottom bank to the top without being run over.
  • The striped rows are safe — the one in the middle is a place to stop and think.
  • You get three frogs. Every crossing makes the traffic faster.
  • Odd rows drive right, even rows drive left. Watch both ways!

🏆 Scoring

  • 10 points for every row you reach for the first time.
  • 100 points for a whole crossing.
  • Hopping back and forth pays nothing — a row only counts once.
  • Tip: wait on the safe island until a gap opens all the way up.

🧑‍💻 For young coders: build this game yourself

This game is split into small library files inside funtime/lib/, and every function has a comment saying exactly what goes in, what comes out, and the algorithm in plain English. Empty any function out, read its comment, and write it yourself.

File What it does Good functions to try re-writing
lib/frogger-rules.js The rules: the lanes, the traffic, the hops laneSpeed, wrapCar, moveFrog, isSquashed
lib/frogger-draw.js Painting the road, the cars and the frog drawCar, drawFrog, renderGame
lib/frogger-main.js The glue: the keyboard, the taps, the loop doAction, connectBoard, gameLoop

💡 The big idea: two different worlds can live in one game. The frog moves on a grid, one square at a time; the cars move in pixels, smoothly. Turning both into rectangles is what lets them meet.

🛠️ Want to be walked through it? Build Frogger Yourself takes you through the key functions one step at a time and tests each one you write. There is a Python version too.