Ring Escape: Beat the Computer's Clock
Pick a mode, pick a ball, choose your time guess, then press Start / Restart. The computer makes its own guess. You win if the last ring breaks after the computer's guess but before yours — and you get a +50 bonus if your colour breaks the last ring. Points are saved only in your own browser.
The physics behind it
Each ball starts near the centre, inside a stack of rings. Every tick of the simulation, gravity pulls the ball a little further down, so its path curves like a thrown ball instead of flying in a straight line. Left alone it would fall to the bottom of the innermost ring and bounce there forever — the rings are what make it interesting.
When a ball hits a ring, it bounces by reflection. At the point of contact, the wall of a circle faces straight towards the centre, so the simulation splits the ball's velocity into two parts: the part pointing 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 a mirror reflecting light: the angle in equals the angle out. Because the wall is curved, the "mirror" faces a different way at every point, which is why the bounces look so varied. The game also adds a tiny random wobble to each bounce so a ball never gets locked into a perfectly repeating loop.
Every ring has a gap — a missing slice of the circle. A ball only escapes if it reaches the ring at exactly the angle where the gap is at that moment. Hit the solid part and it bounces back inside. Since the rings keep turning, a ball can be heading for an open gap and arrive just as the solid part rotates into its way. That timing is where the suspense comes from. Once a ball passes through the gap, the ring breaks and disappears, and the race moves outward.
Neighbouring rings spin in alternating directions — one clockwise, the next anticlockwise. This keeps the gaps from lining up into one easy straight tunnel, and it makes the pattern more fun to watch. Which way the first ring turns is chosen at random each round.
Two things in the game are tuning, not real physics. First, a ball gets a small speed boost each time it breaks a ring, and outer rings set a higher minimum bounce speed, so balls move faster the further out they get. Real bouncing balls lose energy with every hit; here they gain it so the outer rings — which are much bigger — don't take forever. Second, a ring's gap slowly widens while a ball is bouncing around near it. That guarantees no ball stays stuck for too long and every round ends.
Finally, the result doesn't depend on your screen. The simulation runs at a fixed 60 steps per second: a fast 120 Hz phone draws more pictures, and a slow laptop draws fewer, but both move the balls forward in the same-sized steps. The clock counts those steps, so "14.2 seconds" means the same thing on every device. If you switch to another tab, the game pauses instead of jumping ahead.
What is simplified
- No air resistance — balls never slow down from moving through air.
- No spin — balls don't rotate, so there is no curve or grip on the walls.
- No real material bounciness — bounce speed is set by game rules, not by rubber or steel.
- Balls pass through each other instead of colliding.
This is a game inspired by physics, not a scientific tool. See the disclaimer for more.