🕹️ playable

I made gravity the enemy.

Asteroids meets Osmos, except the big rocks are too stubborn to explode and every planet bends the rules.

play note
Asteroid Hero title screen with launch and hard mode buttons against a dark space background
Asteroid Hero — deceptively calm before gravity starts making decisions.

This is the less practical one. I wanted to make a tiny browser game, started playing with orbital movement, and eventually landed on a planetary-defense problem where shooting is only half the answer.

The big rocks do not care

Small asteroids blow up. Large ones mostly shrug. Laser fire pushes them, so the real move is changing a trajectory early enough that gravity does not finish the job. Sometimes the best shot is the one that nudges two asteroids into each other.

It turns out “just add gravity” is a great way to make every easy game mechanic slightly unhinged.

Five different gravity wells

The Moon, Earth, Mars, Neptune, and Jupiter each pull differently. Asteroids curve, the ship drifts, collisions bounce or shatter, and anything that escapes the gravity well counts as a save. Normal mode lets me keep exploring; hard mode sends me all the way back when the planet loses its shield.

Keeping the build small

The whole thing is vanilla JavaScript, HTML5 canvas, and CSS. Zero dependencies. No build step. It works with touch controls or keyboard and mouse, which made the physics and input tuning much more interesting than the file count suggests.

It is exactly the kind of project this garden is for: a little over-engineered, completely playable, and much more fun than the original to-do item had any right to become.