AsteroidsJS

AsteroidsJS was my introduction to JavaScript's prototype system, as well as to HTML5's new canvas element.

To take advantage of the prototype system, I made a generic `Mass` prototype that can have force or torque applied to it. That resulted in ships and asteroids respecting preservation of mass and momentum.

I'd never made an asteroids game before either, so it was nice to design asteroid shape generation and the like.

Future

I'd like to add a pause button and display, as well as some power-ups.

Try it Source Code