Welcome to the Asteroids Game! This is a simple game built with HTML, CSS, and JavaScript, inspired by the classic arcade game, Asteroids. Your goal is to avoid and destroy asteroids while controlling a rocket spaceship that can move and shoot projectiles.
In this game, you control a rocket 🚀 that can move across the screen. Your objective is to avoid asteroids and shoot them before they hit you. The game continues until you run out of lives or the game ends.
- Rocket Movement: The rocket can move in any direction using arrow keys or WASD.
- Asteroids: Asteroids spawn randomly and move across the screen.
- Shooting: You can shoot bullets to destroy asteroids.
- Lives: The game will end if you lose all your 3 lives.
- Score: Keep track of your score as you destroy asteroids.
- Asteroid Generation: Asteroids spawn randomly on the screen and travel across the space.
- Collision Detection: Detect collisions between the rocket and asteroids to decrease lives.
- High Score: Track and save your highest score in local storage.
- Open the game in your browser.
- Use the arrow keys (or WASD) to control the movement of the rocket.
- Press the spacebar to shoot bullets.
- Avoid asteroids and shoot them to increase your score.
- The game ends when the user loses all 3 lives.
Clone the repository to your local machine.
git clone https://github.com/slicbutsic/asteroids-js.git
This game was built based on the tutorial in the video: Asteroids Game Tutorial, with additional enhancements and customisations made by me.