asteroids-game is an exercise using JavaFX to create a simplified version of the classic Asteroids game.
- The movement of the ship and firing of projectiles is controlled using the keyboard listener methods of the JavaFX Scene class
- The AnimationTimer class is used to animate the ship and asteroids in the window at about 60 frames per second
- The Math class’s trigonometric functions are used to calculate the direction of acceleration and deacceleration of the ship, asteroids, and projectiles
- The JavaFX Shape class is used to check for collisions between the ship and asteroids
- A class is created to generate asteroids of random sizes, velocities, and rotation speeds
- An increasing number of asteroids is added after all asteroids are eliminated
- A points counter keeps track of the current score