Skip to content

Bubble Pop

Bubble Pop is a browser-based canvas game built entirely with vanilla JavaScript — no libraries, no frameworks, no build tools. Bubbles rise from the bottom of the screen in a gentle sine wave. Click or tap them before they escape. Miss too many and it’s game over.

The project introduces the HTML5 Canvas API, a game loop built on requestAnimationFrame, entity classes for bubbles and particles, and browser storage for a persistent high score.

Play the finished game | View the source


A fully playable game with:

  • A canvas rendered at 480 × 640 with gradient bubbles and particle pop effects
  • Sine-wave bubble movement that speeds up as levels increase
  • Click and touch input that scales correctly to any screen size
  • A start screen, game-over screen, and localStorage high score
  • Three source files: index.html, style.css, and pop.js

You should have finished the fundamentals track before starting this project:

  • HTML — you will write semantic structure and use id attributes to wire the JS
  • CSS — you will use flexbox, custom properties, and pseudo-classes
  • JavaScript — you will use classes, closures, and the Canvas 2D API

Git is helpful but not required for this project.


The build is split across five stages. Each stage adds one layer of the game and ends with a working checkpoint you can open in the browser.


FileWhat it does
index.htmlGame shell — canvas, HUD overlay, start screen, and game-over screen
style.cssDark background, gradient buttons, and absolutely-positioned overlay screens
pop.jsAll game logic — POP namespace object plus Bubble and Particle classes

The starter repository is on GitHub. Fork it to your own account so you have a place to commit your work at each stage.

github.com/Hoover-Digital-Media/bubble-pop