Musical Bounce: Guess How Many Bounces
Pick a melody and a growth speed, type your guess for how many bounces it takes the ball to fill the circle, then press Start / Restart. Every bounce plays the next note of the tune. Guess exactly right for 100 points, within 3 for 50, or within 6 for 20. After each round, the guess box shows the last result. Points are saved only in your own browser.
The physics behind it
The ball starts small, near the centre of a circle, and is launched in a random direction. Every tick of the simulation, gravity pulls it a little further down, so instead of flying in straight lines its path bends into curves, like a ball thrown across a room.
When the ball touches the wall, it bounces by reflection. At the point of contact, a circle's wall faces straight towards the centre. The simulation splits the ball's velocity into two parts: the part going into the wall and the part sliding along it. The part into the wall is flipped; the sliding part is kept. It is the same rule as light off a mirror — the angle in equals the angle out. Because the wall is curved, the "mirror" faces a different way at every point, so no two bounces look quite alike. A tiny random wobble is added to each bounce so the ball never settles into a perfectly repeating loop.
Every bounce makes the ball grow, and harder hits make it grow more. The growth is tied to the impact speed into the wall — only the part of the velocity pointing into it, not the sliding part. A ball that smacks the wall head-on grows a lot; one that just grazes it grows a little. Since the launch direction and speed are random, and every hit lands at a different angle, each round adds up differently and ends on a different count. That is what makes guessing tricky. A bigger ball also has less room to move, so the bounces come faster near the end.
The ball's speed is kept within limits, with a minimum and a maximum for each growth setting. That is game tuning, not real physics. A real ball loses some energy every time it hits something, so it would slowly stop bouncing. Here the speed stays lively so every round reaches the end. If the ball ever goes three seconds without touching the wall, it gets a small nudge so the game can't stall.
A fast ball can move a long way in one tick. If the game only checked for the wall once per tick, the ball could jump from just inside to just outside and skip the bounce. So each tick is split into six smaller sub-steps, and the wall is checked after every one. After a bounce, the ball is placed back cleanly inside the circle.
Finally, the result doesn't depend on your screen. The simulation runs at a fixed 60 steps per second: a 120 Hz phone draws more pictures and a slow laptop draws fewer, but both move the ball forward in the same-sized steps. If you switch to another tab, the game pauses instead of jumping ahead.
What is simplified
- No energy loss — real bounces get weaker; here speed stays inside set limits.
- Growing on impact is made up for the game — real balls don't get bigger when they hit things.
- No air resistance and no spin.
- The wall is perfectly round and rigid, and doesn't move or flex.
This is a game inspired by physics, not a scientific tool. See the disclaimer for more.
About the music
The melodies — Canon in D, Für Elise, Rondo Alla Turca and Carol of the Bells — are classical pieces. They are played here as simple tones generated in your browser, one note per bounce.