Catch the Bubble (3D)

A Blender-built sunny garden with a bubble machine: catch iridescent 3D soap bubbles while real physics decides how they float, shine and burst.

Switch to 2D

Presets

Playback

Game

Speed, how many bubbles, their sizes and the fan on the bubble machine.

Air and weather

These act on every bubble right away.

What is inside the bubble

Applies to bubbles blown from now on.

The soap film

Starting thickness applies to new bubbles; surface tension, viscosity, drainage and index act at once.

Camera

Layers

Quality

Model checks

The science

Why a bubble is round: surface tension and Laplace pressure

A soap film has two surfaces, each pulling with surface tension gamma (about 25-30 mN/m for soapy water, 72 mN/m for pure water). Shrinking the bubble by dR saves surface energy dE = gamma * 2 * 8 pi R dR, which the gas pressure must pay for: dP * 4 pi R^2 dR = dE, so the pressure inside exceeds the pressure outside by dP = 4 gamma / R. Small bubbles are squeezed harder than big ones (a 2 cm bubble: about 5.4 Pa; a 4 cm bubble: about 2.7 Pa). The graph shows the curve and every bubble in view.

Why a bubble floats, hovers or sinks

Three weights compete: the gas inside rho_gas V g, the soap film 4 pi R^2 h rho_water g, and the buoyancy of the displaced air rho_air V g. Warm breath is a little lighter than room air, helium much lighter. As the breath cools by conduction (time constant rho_gas c_p R^2 / (3 k), roughly 10 s for a 3 cm bubble) it gets heavier and shrinks (R follows T^(1/3) at constant pressure), so many bubbles rise first and sink later. Air drag is quadratic, 1/2 rho_air C_d A v^2 with C_d = 0.47, which gives a terminal speed v = sqrt(2 F / (rho_air C_d A)).

Why a bubble has colours, and why it bursts

Light reflects from the front and back surface of the film. The two waves differ by 2 n h cos(theta_t) and interfere, with the Fresnel reflectances of both interfaces; the screen colour is the sum over the visible wavelengths. Bands are one half wavelength of thickness apart (about 200 nm in water). Water evaporates from both surfaces so the film thins by e = 2 J / rho (here J = 6e-5 kg m^-2 s^-1 times the dryness of the air) and gravity drains the top thinner than the bottom, dh/dt = -B rho g h^3 / (12 eta R). When the top film is only a few tens of nanometres thick it reflects almost nothing (the black film) and the bubble bursts; the model bursts it at 20 nm.

Honest simplifications

The evaporation constant is an effective value chosen so that a 0.7 um film lives about 12 s in this window; real bubbles live from seconds to minutes. Pure lubrication drainage between rigid surfaces is far too slow, so a boost factor stands in for marginal regeneration and Marangoni flows (real values are 100-10000). The film profile is a simple top-to-bottom gradient, not a full free-surface flow; the wobble is cosmetic; bubbles do not collide or merge; the optics uses unpolarised light from a flat white source, so colours are indicative, not photometric.

What to try

  • Press Start game and tap bubbles before the colours fade; a bubble caught while its top is thinner than 100 nm (silver or black) earns a thin-film bonus.
  • Choose Helium party: the lighter gas lifts bubbles to the ceiling quickly. Then choose Cool heavy bubbles and watch them sink.
  • Pick Dry desert air: evaporation is nearly 2x faster, so the same bubbles burst sooner.
  • Pick Giant glycerine bubbles: the thick, viscous films live much longer and show many more colour bands.
  • Raise the surface tension to 72 mN/m (pure water) and watch the Laplace pressure readout rise; look at where the bubbles sit on the 4 gamma / R curve.
Loading model...
Loading Blender model...
Laplace pressure against bubble radius (all bubbles in view)
Film thickness against age of the selected bubble
Reflectance spectrum of the selected bubble
Vertical speed and gas temperature of the selected bubble

About Catch the Bubble Game

Catch the Bubble is a browser reaction game rendered on an HTML canvas. Colourful bubbles rise from the bottom of the screen, drifting upward at a steady speed while swaying sideways. Each bubble follows a simple physics model: a vertical velocity plus a horizontal wobble driven by a sine wave, x += sin(wobble) * 0.5. Your task is to click or tap each bubble before it floats off the top or its lifetime expires.

The on-screen panel shows your Score, your Missed count, a 60-second countdown timer, and a Start Game button. New bubbles spawn every 800 milliseconds, each with a random radius, hue, rising speed and maximum lifetime. Beyond simple fun, the game trains hand-eye coordination, visual tracking and reaction time, the same perceptual-motor skills used in sports, driving and many everyday tasks.

Frequently Asked Questions

What is the Catch the Bubble game?

It is a fast, kid-friendly reaction game where bubbles rise up the screen and you pop them by clicking or tapping. You earn a point for each bubble caught and a miss for each one that escapes or bursts on its own. A 60-second timer limits each round.

How do I play and score points?

Press Start Game, then click or tap directly on a bubble before it floats off the top. Each successful pop adds one to your Score. Bubbles you let slip past the top, or that exceed their lifetime, add one to your Missed count instead.

What do the controls and panel show?

The panel displays your current Score, your Missed total, a countdown timer starting at 60 seconds, and a Start Game button. When the timer reaches zero a Game Over screen appears with your final score, a feedback message and a Play Again button that reloads the round.

How do the bubbles move?

Each bubble has a constant upward speed between 1 and 3 pixels per frame and a gentle horizontal wobble. The wobble is generated with a sine function, x += sin(wobble) * 0.5, where the wobble angle advances by a small amount every frame, giving the lifelike sideways sway of a real soap bubble.

Why do some bubbles pop before I click them?

Every bubble is assigned a maximum lifetime of roughly 200 to 300 frames when it spawns. Once the lifetime is exceeded, or the bubble drifts above the top of the screen, it disappears and counts as a miss. A red warning ring thickens around a bubble in the final 30 percent of its life to warn you.

How does the game know I clicked a bubble?

When you click or tap, the game measures the distance from the pointer to each bubble centre using the Pythagorean formula, sqrt(dx squared + dy squared). If that distance is smaller than the bubble radius, the click counts as a hit, the bubble pops and your score increases by one.

How often do new bubbles appear?

While a round is active, a timer spawns one new bubble every 800 milliseconds. Each appears at a random horizontal position near the bottom edge with a random radius between 20 and 50 pixels and a random colour hue, so no two rounds look quite the same.

Does the game work on touchscreens?

Yes. As well as mouse clicks, the canvas listens for touchstart events, so you can pop bubbles by tapping on a phone or tablet. The default touch scrolling is prevented during play so your taps register as hits rather than scrolling the page.

Is this a realistic physics simulation?

It is a simplified, playful model rather than an exact fluid simulation. Real rising bubbles are governed by buoyancy, drag and surface tension. Here, those forces are approximated by a fixed upward speed and a sine-wave wobble, which captures the look of drifting bubbles while keeping the game smooth and easy to control.

What skills does this game develop?

Catching moving targets exercises reaction time, visual tracking and hand-eye coordination. Because bubbles vary in size, speed and remaining life, players also practise prioritising and quick decision-making, choosing which bubble to pop first before it escapes.

What counts as a good final score?

The end screen rates your performance: 50 or more pops earns bubble-master praise, 30 or more is a great result, and 15 or more is a solid effort. Below that, the game encourages you to try again. Faster, more accurate clicking across the 60 seconds is the key to a higher total.

Made with 🟠 Blender · Three.js