Skip to content

Develop a classic game where players steer a spacecraft, destroy asteroids, and earn points.

Notifications You must be signed in to change notification settings

ken1009us/asteroid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asteroids Game

Asteroids Game is a simple JavaFX-based game where you control a spaceship to destroy asteroids and earn points. Your goal is to survive as long as possible while accumulating points by shooting asteroids. Be careful not to collide with the asteroids!

Image

Getting Started

To play the Asteroids Game, follow these steps:

  1. Clone this repository to your local machine.

    $ git clone https://github.com/ken1009us/asteroid.git
  2. Open the project in your Java development environment (e.g., IntelliJ IDEA, Eclipse).

  3. Compile and Run:

    Navigate to the project directory and compile the application using the following command:

    $ javac com/asteroids/AsteroidsApplication.java

    Run the application with:

    $ java com.asteroids.AsteroidsApplication

Controls

  • Use the Arrow Keys to control the spaceship:
    • Left Arrow: Rotate the spaceship counterclockwise.
    • Right Arrow: Rotate the spaceship clockwise.
    • Up Arrow: Accelerate the spaceship.
  • Press the Spacebar to fire projectiles at the asteroids.

Gameplay

  • Your spaceship starts at the center of the game window.
  • Asteroids will appear randomly on the screen.
  • Rotate your spaceship to dodge asteroids and shoot them down with projectiles.
  • Each destroyed asteroid earns you points.
  • The game continues until your spaceship collides with an asteroid.

Game Rules

  • Avoid colliding with asteroids to stay alive.
  • You can shoot projectiles to destroy asteroids and earn points.
  • The game ends when your spaceship collides with an asteroid.
  • Try to achieve the highest score possible by destroying as many asteroids as you can.

About

Develop a classic game where players steer a spacecraft, destroy asteroids, and earn points.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published