
About
colorful_asteroids is a browser-based Asteroids clone built in vanilla JavaScript with the MainLoop.js library and the Web Audio API, using vector-only rendering (no sprites or fonts) on a fixed 1400x800 HTML5 canvas.
How it differs from the original
Instead of a hyperspace escape, the player has an energy pulse (1.5s cooldown) that repels nearby asteroids, with the force weakening over distance and against larger asteroids. Small alien ships don't begin appearing until the player passes 10,000 points; before that, only large aliens spawn. The clone also adds four selectable difficulty levels, including a practice mode with infinite lives.
Getting started
Play directly in the browser via the game's GitHub Pages link — tested in Chrome and Firefox. Steer with the left/right arrows, boost with up, fire the energy pulse with down, and shoot with space; menus are navigated with the arrow keys and Enter.
Additional notes
- Scoring
- High scores are only kept for the current browser session — there's no server, so scores reset when the tab closes.