/space-burna

A space shooter game, where the user controls a spaceship, defending themselves from asteroids and enemies, to get the highest score. Built with JavaScrip and Phaser3.

Primary LanguageJavaScript


Space Burna

Play to save the galaxy!

Table of Contents

About

This is my Capstone project for Microverse's JavaScript course. In this project, the goal was to build a shooter game using JavaScript and the game engine Phaser.

All project requirements can be seen here.

About the Game

Space Burna is a classic shooting game that happens in the space. The goal is to survive for the longest possible time, while you destroy the enemies and avoid being shot to death. Each enemy destroyed gives you 10 points. Earn enough points to see your name on the scoreboard.

How to play

The player controls a spaceship. Use the arrow keys on your keyboard to move around. To shoot, press enter.

Characters

  • Player Spaceship

Player spaceship

This is your spaceship. You can move it up, down, left, and right using the arrow keys. You can also shoot by pressing enter. It starts the game with 100% of health. If you got shot, the health decreases by 25%, so watch out!

  • GunShip

Gunship

This enemy has guns, and there are lots of them around the space. Luckily, they are very predictable and easy to destroy.

  • ChaserShip

Chasership

This little ship looks nice, but it will chase you down until they hit you.

  • Meteors

Chasership

Watch out for the meteors. They are big and hard to destroy.

  • Bonus items

Bonus Bonus

Finally something good! There are two kinds of bonus items:

  1. Extra shooting power: it adds multiple shots. You can have up to three at the same time. Very handy when there are a lot of enemies to destroy. However, if you got shot, your shooting power decreases.

  2. Shield: this bonus will give your spaceship a temporary shield. During this time, enemies' lasers won't hit you. Also, if you collide with an enemy, it will explode.

Scenes

This game has five scenes:

  • Main menu

This is the initial scene. It allows the player to start the game, go to the instructions or the scoreboard.

  • Instructions

This scene presents the main rules of the game.

  • Main game

This is the main scene of the game, where all the action happens.

  • Game Over

This scene appears when the player collides with an enemy or if the health got to 0. It displays the score for that game and allows the player to enter their name and submit the score. It also allows them to replay.

  • Score board

This scene displays the name and score of the 15 players who had the highest score on the game. Of course, you will want to be the first one on that list! It also allows the player to play again.

Prerequisites

  • Desktop computer and browser.

Installation

To play online

  • Just access this link for the live version.

To install the game locally

  • Download or clone the game repository.
  • Navigate to the game root directory from your terminal.
  • Install the required packages with the following command:
npm i
  • Run the following command to start the game in your browser.
npm run start

Testing

This project has unit tests for the logic components. To run the test, use the following command:

npm run test

Built with

  • Phaser3.
  • HTML5.
  • JavaScript.
  • SASS.
  • Webpack.
  • Babel.

Future features

  • Set up energy level for the player's ship to limit consecutive shots.
  • Add levels.
  • Have 'boss' enemy to defeat before advance levels.

Author

👩 Bruna Genz

Acknowledgments

  • Jared, for this simple and complete tutorial.
  • Kenney, for the beautiful assets.

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!