Code a mini game

Be an engineer for a day

Change the frog's code, then play. Every change shows up in the game right away, so try anything and see what happens.

Your code
frog-game.js
frog.speed = 4 // how fast the frog hops left and right
frog.jump = 4 // how high the frog jumps
fly.points = 1 // score for each fly caught
frog.color = // what the frog looks like

Catch the flies

Score 0

On a keyboard: click the game, then use the arrow keys and space bar.

Challenges

Can you code your way through?

  • Catch a fly near the top. Hint: raise frog.jump.
  • Make every fly worth 5 points or more.
  • Give your frog a new color.
  • Reach a score of 50.

You just engineered a game!

Changing a few numbers changed how the whole game works. That's coding. LA Makerspace teaches kids these skills through hands-on workshops at library branches across LA County.