/asteroids

A javascript asteroids game

Primary LanguageJavaScriptMIT LicenseMIT

Asteroids Pure Javascript Game

Welcome to the Asteroids Game! This is a simple remake of the classic arcade game "Asteroids" using pure JavaScript.

How to Play

You can play the game here: Play Asteroids

  • Move the Ship: Use the arrow keys to navigate your ship.
    • Up Arrow: Thrust forward
    • Left Arrow: Rotate left
    • Right Arrow: Rotate right
  • Shoot: Press the Space bar to shoot bullets at the asteroids.
  • Objective: Destroy all the asteroids while avoiding collisions.

Scoring

  • You gain points for each asteroid you destroy. Larger asteroids split into smaller ones when hit.
  • The game continues until you lose all your lives.

Lives

  • You start with 3 lives.
  • You lose a life each time your ship collides with an asteroid.
  • The game ends when all lives are lost.

Features

  • Randomly generated asteroids
  • Ship rotation and movement
  • Bullet shooting
  • Collision detection
  • Score and lives display
  • Game reset functionality

Controls

  • Up Arrow: Move forward
  • Left Arrow: Rotate left
  • Right Arrow: Rotate right
  • Space Bar: Shoot bullets

Developer

This game was developed by Shane Larson. You can connect with me on:

Installation

  1. Clone the repository:
    git clone https://github.com/grizzlypeaksoftware/asteroids.git
  2. Open index.html in your web browser to play the game.

License

This project is licensed under the MIT License.

Enjoy the game!