Back to GAMES

Bubble Wrap Simulator

Three.js · Design · Engineering

Bubble Wrap Simulator

A first person Three.js playground built around the extremely reasonable desire to pop an entire room of bubble wrap. Nine tools. Three moving targets. A room with more than 43,000 bubbles. The first tool is a fingertip. The seventh is a rocket launcher. Keep a streak going long enough and the game labels it ABSOLUTELY UNNECESSARY, which is the most accurate documentation in the project.

43,000+
Bubbles in the room
9
Tools
76
Automated tests
16
Recorded pops
Gameplay footage.

The idea

Everyone has been handed a sheet of bubble wrap and felt the plan for the afternoon change. I wanted the room-sized version, with stairs, an arch, platforms and loose parcels, all of it wrapped. All nine tools are available immediately. Press R and the room reinflates.

The mallet, mid-swing.
The mallet, mid-swing.

How it is built

React for the interface, Three.js for the room, Rapier for a fixed 60 Hz physics simulation. The wrap is instanced: a rigid backing with individually animated cells, clear film over coloured sheets, and spent bubbles that turn milky and crumpled so you can see where you have been. Weight pops wrap. A bowling ball leaves a line of pops, a dragged parcel scuffs a track, and landing from a jump pops a crater sized to the fall.

The tools are nine GLB models, 13.99 MB for the set. Seven have geometry generated in Meshy, the bowling ball and bomb are Meshy retextures of my original Blender props, and every one was fitted and finished in Blender.

The nine tools after the model upgrade.
The nine tools after the model upgrade.

The sound

The pops are 16 distinct samples cut from five CC0 bubble-wrap recordings, packed into a 92 KB sound bank. That works until a bomb pops a thousand bubbles at once and runs out of voices. Past that budget an AudioWorklet mixes the overflow as grains from the same recordings, so the blast is heard as a crackling front rolling outward rather than a short run of pops. A lit bomb also fizzes quietly where it lies. I did not need to do that.

The pop vacuum pulling in a wrapped parcel.
The pop vacuum pulling in a wrapped parcel.

What it does not do

It does not simulate tearing sheets, cloth, or air pressure. The touch controls have automated coverage and have not yet been verified on a physical device, which is a sentence I am leaving in. The gameplay video predates the current models and audio.

Where to play

Bubble Wrap SimulatorOPEN IN NEW TAB ↗

Play it in the browser. It needs WebGL2 and WebAssembly and runs on desktop, phones and tablets. The source is on GitHub.

Built with

  • React
  • Three.js
  • Rapier
  • TypeScript
  • Web Audio
  • Blender
  • Meshy
  • Vercel
JF/OS · INDEX OF WORK14 ENTRIES

Everything in the machine, printed out. For people with eleven seconds and no interest in cartridges.

01 · INTERFACE

02 · SYSTEMS

03 · 3D WORLDS

04 · GAMES

*** END OF LISTING ***