Skip to content
This repository has been archived by the owner on Mar 18, 2020. It is now read-only.
/ JSteroids Public archive

Classical Asteroids game implemented in JavaScript with the Phaser 3 game engine.

License

Notifications You must be signed in to change notification settings

Pejo-306/JSteroids

Repository files navigation

JSteroids

forthebadge

GitHub license GitHub release Phaser 3 Heroku

JSteroids is a recreation of the classical retro game Asteroids. The project itself is an HTML5 game created with the help of the open-source game engine Phaser 3 which is based on JavaScript.

Table of contents

Game Description

The game is a 2D top-down view shooter. The player controls a spaceship which may navigate around in space and fire projectiles. The game's main objective is to destroy asteroids which spawn endlessly in waves. With each wave, the number of asteroids increases by multiplying the previous wave's asteroid count with a level multiplier which depends on the player's score. Asteroids come in several levels with each next level of asteroids being faster and smaller than the previous.

Saucers are the player's main enemy. They spawn randomly every so often and shoot in random directions. Like asteroids, saucers also come in a few levels with each next level of saucers being faster and smaller than the previous level. Saucers can be destroyed by colliding with either the player or their projectiles. However, these enemies bounce off asteroids on collision.

Each player-destroyable object (asteroids and saucers) give the player some amount of score. The objective of the game is to achieve a higher score before the player loses all of their lives. After the game ends, the player has the option of returning to the main menu or to directly restart the game.

Play the Game

This project is currently deployed on Heroku. You may visit the following app to play JSteroids without performing any setup:

https://tranquil-bayou-90414.herokuapp.com/

Getting Started

The following instructions will get you a running copy of the game on your local machine.

Prerequisites

You must have installed nodejs and npm in order to run this project. The latest versions used in this project are:

  • nodejs v10.15.3
  • npm 6.4.1

Installation

To get a copy of the game, all you need to do is clone this Github repository.

$ git clone https://github.com/Pejo-306/JSteroids.git
$ cd JSteroids/

Then install all npm packages.

$ npm install

Running on a Local Server

Run webpack's development server.

$ npm run dev

Afterward, open your browser and visit localhost:8000.

And you're good to go. Enjoy playing the game :).

Running in a Production Environment

In order to deploy the game in a production environment, you must start the provided simple Express.js server. To run the server use the following npm script:

$ npm start

Built with

License

This project is distributed under the MIT license.