Skip to content

slicbutsic/asteroids-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asteroids Game 🚀

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.

Table of Contents

Game Overview

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.

Key Features:

  • 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.

Features

  • 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.

How to Play

  1. Open the game in your browser.
  2. Use the arrow keys (or WASD) to control the movement of the rocket.
  3. Press the spacebar to shoot bullets.
  4. Avoid asteroids and shoot them to increase your score.
  5. The game ends when the user loses all 3 lives.

Installation

1. Clone the Repository:

Clone the repository to your local machine.

git clone https://github.com/slicbutsic/asteroids-js.git

Credits

Credits

This game was built based on the tutorial in the video: Asteroids Game Tutorial, with additional enhancements and customisations made by me.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published