My brother asked me to teach him to make asteroids, without thinking I said yes, but later realised…Well I had never made asteroids before.
So I made asteroids in Java, which was fun. There’s no cool down on firing so you can just spin around shooting as fast as possible and the score goes into the 44k’s
Breaking a big asteroid gives you 100 points, breaking the smaller ones gives you 150 points, since they’re smaller and move quicker.
First thing I did was get the player to move on the screen, first of all I did it the complicated way that the player would move in the direction they were moving, but accidentally made it so they would always move in that way, even when they rotated while moving, so I made it move how it usually does in asteroids, then made it wrap around the screen like asteroids does usually.
Then I made the bullets, which spawn centre on the player and move forward in the direction that the player is facing and also wrap around the screen.
After that I made the asteroids themselves, which, when spawned in pick a random rotation and move in that direction.
Next I made bounding boxes, which are assigned to the player, bullets and asteroids, collisions are simple, bullet collides with asteroid, asteroid splits or disappears and gives points. Player collides with asteroid, game resets.
Now I’m adding some polish to it, title screen, about page, high scores etc.
I’m adding a high scores page that’ll be tracked in the jar’s asset package, hopefully it should be simple to do
Added Polish, Title screen, High scores screen, About screen.
Added some new weapons, a bomb that does an area of damage to asteroids. A cluster bomb that does a larger area of damage and then spawns 6 normal bombs around it that explode. Last but not least, a turret that will shoot at the closest asteroid and will de-spawn after 10 seconds.