A bouncing ball with Rebecca

A little programming lesson with Rebecca turned into a bouncing ball experiment. Move the mouse to choose where the ball goes, then click to drop it. There is even a shadow underneath. I like having a simple project we can play with while I teach her something new.

I wanted to show her how animation is really lots of small changes. The ball has a position and a speed. Gravity changes the speed, and the speed changes the position. When it hits the ground, we reverse the speed and make the next bounce a little smaller. Changing one number and watching what happens is a fun way to get a feel for it.

Rebecca's bouncing ball and its grassy background in Game Lab.

Try bounce ball on Code.org.