Code Monkey home page Code Monkey logo

shooter-game's Introduction

JS Shooter Game

It is a simple shooting videogame, created as a capstone project using JavaScript, for Microverse. Only for learning purposes.

screenshot

Details of the Game

How to play with?

You are the pilot of a battlecruiser (maybe one among dozens), and your task is destroy all the asteroids that you can for saving the Earth. In order to comply with this important duty, you can drive the battlecruiser using arrow keys (๐Ÿกฑ๐Ÿกณ๐Ÿกฐ๐Ÿกฒ) and shoot a Yamato Beam using spacebar.

To start, you should click Backspace(๐Ÿกฐ) key on keyboard to type in your name (at most 11 characters). If you left a blank input, you will be registered as UNNAMED.

When you click on Play, the battlecruiser will start in the bottom of the screen, and the asteroids will fall from the top with differents velocities.

The most important goal is getting the highest score. Your name will be put in the Top 10 if get a good score. Now, try to consider:

  • There 5 kinds of asteroids.
  • If you destroy the fastest kind of asteroid, you will get +25 points for your score.
  • If you destroy the slowest kind of asteroid, you will get +5 points for your score.
  • You will see at most 5 asteroids on your screen. When you destroy one, it returns from the top immediately.
  • You will lose if your battlecruiser receives three hits.

Scenes

  • Preloader: Preloads all assets and configurations for the game.
  • Title: Loads the logo and options for the game (for playing, show credits and show top 10).
  • Top10: Shows the top 10 scores gotten for the players.
  • Credits: Shows the credits for the author of this videogame and the author of the assets.
  • Game Start: Displays the main scene and start the game. Here you can drive the battlecruiser and shoot beams.
  • Game Over: When you lose, this scene shows your score.

Built With

  • Node JS
  • Webpack
  • Javascript ES6
  • Babel
  • Phaser
  • Jest

Live Demo

Check out the live demo here

Getting started

Pre Requisites

Game Design Document

Install

  • Clone this repository in your terminal using git clone command.
  • Enter the repo directory.
  • Open the src/keys/api.js file and edit the value for LEADERBOARD. Use your own API Keys gotten from Leaderboard API.
  • Run npm install && npm run build in your terminal.

Tests

  • Run npm run test in your terminal.

Usage

Authors

๐Ÿ‘ค Taiwo Adetona

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgments

๐Ÿ“ License

MIT License

shooter-game's People

Contributors

taiwo2 avatar

Stargazers

 avatar  avatar

Watchers

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