Asteroids


This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.


Controls: arrows to turn and thrust (there's even a - very weak - reverse thrust (didn't want to make it too easy!)). Ctrl/Space to fire.


This was built in a rather fluid manner, so I'm not going to post any code just yet: there are quite a few things I want to get my head around first and there's a fair amount of tidying up to do. For instance I used a fairly crude method of timing based on a counter where counting down from 60 = 1 second at 60fps. It works and I also know about millis(); but I'd much rather have something like setInterval() in AS where you can pass a function to be called after a set time. I'm also tending to agree that it would be nice not to have to calculate things that don't update so often in every frame of draw()... Wondering whether it's worth simply creating separate PImage objects, drawing them every frame, but only updating them as and when necessary...

TODO: Lots; including:

  • increase difficulty as you progress
  • neaten code and make it more easily re-usable
  • add alien attackers every few levels
  • perhaps add the option to buy upgrades
  • draw some decent asteroids - the current one is pig-ugly!
  • do lots of play-testing

Built with Processing