Skip to content

An exercise to recreate the classic Asteroids game using JavaFX.

Notifications You must be signed in to change notification settings

PcGamer25/asteroids-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asteroids Game

asteroids-game is an exercise using JavaFX to create a simplified version of the classic Asteroids game.

Implementation

  • 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
asteroidsstart asteroidsend

About

An exercise to recreate the classic Asteroids game using JavaFX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages