GithubHelp home page GithubHelp logo

tzvaita / js-phaser-shooter-game Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 15.51 MB

A JavaScript game built on Phaser game engine. This is an arcade game where you have a battleship firing at enemy ships and projectiles appearing from the top of the screen. Scores accumulate as you destroy more enemies. Final scores can be uploaded to an API leaderboard.

Home Page: https://tennyphasergame.herokuapp.com/

License: MIT License

HTML 0.54% JavaScript 98.74% CSS 0.72%
phaser3 javascript-es6 jest-tests game-development webpack heroku linting html css shooter-game

js-phaser-shooter-game's Introduction

JavaScript Capstone Project: Build a Shooter Game

Home page

This is Microverse's final project in Javascript's course.

In this project, I built a shooter game using JavaScript's framework Phaser 3, a "fast, free and fun open-source framework for Canvas and WebGL powered browser games".

Table of Contents

About

This project's objective was to build a shooter game similar to York Computer's tutorial. My game is inspired by this.

The assignment can be seen here.

Link to a live version here.

Repository: https://github.com/tzvaita/js-phaser-shooter-game

The game

This is a one player game. The game starts with the player's battleship aligned in the middle of the screen. Enemy ships start to appear from the top of the screen. The player ship can be manouvered up, down, left and right. The ship also has shooting capabilities with the produces lasers destroying the enemy ships on contact. The best players accumulate the greatest scores which can be submitted to a leaderboard.

How to play

The keyboard keys to play the game are the direction keys for movement and the space-key for shooting.

You can play the game online clicking here or locally following these steps:

  • Install Node Package Manager (npm) on your machine.
  • Scroll to the top of this page and click on the green button "Clone or Download".
  • Click on Download ZIP.
  • Extract the game to a folder of your preference.
  • Open your terminal and navigate to the folder you extracted the game to.
  • Run 'npm install'.
  • Run 'npm start'.
  • Open, in your browser, 'localhost:8080'.

Design

The game is on a canvas measuring 480 x 640 px. The background consists of two overlapping backgrounds which are constantly changing.

Player's ship

For this version, the player only has one life so first contact with enemy lasers or ships and the game is over. Lives will be implemented as a game update.

Enemies

There are three kinds of enemies. One of these fires lasers, the other one just glides through the screen in a straight line and the last one is a spinning sphere which when in near proximity of the player ship, changes course and starts to follow the player ship wherever it goes unless if it is destroyed.

Scenes

This game is composed of four scenes.

  • Main Menu:

SC-MM

  • Game:

SC-Game

  • Game Over:

SC-GO

The Leader Board will only show 20 names.

Technologies used

  • JavaScript
  • A bit of HTML and CSS
  • Phaser 3
  • Webpack
  • Eslint
  • Babel
  • Jest for the tests
  • Github
  • Heroku for the deployment
  • Leaderboard API service for the leaderboard

Future Work

  • Player lives
  • Stages

Contact

๐Ÿ‘ค Tennyson Zvaita

Acknowledgements

js-phaser-shooter-game's People

Contributors

tzvaita avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.