Giter Club home page Giter Club logo

ninja-game's Introduction

Javascript Capstone Project : Ninja Game

About

This project is part of the Microverse Curriculum projects. The game is meant to be a platform game for the final project of the Javascript curriculum, and was developed using Phaser 3.

Project specifications

The Game

  • The main character is a ninja that run trough a world dominated by an evil AI in the year 2320. The first stage and main scene of this game is where our hero has to collect ninja-stars and kunais(knifes) to get points. The goal is to collect as many weapons as you can to be able to fight enemies in next stages(to be design).

  • Make sure to jump at the right moment because platforms appears at different height and move at different speed.

  • The main characters and items where taken from Open Game Art.

Live Version

How to play

  • You can use the up arrow key to jump over the infinite platforms.
  • Use the left and right arrow keys to move and redirect your jump.
  • The only way to survive is to mantain yourself above the platforms.

Install

You can use the live version or you can install it in your local machine

Clone this repository

$ git clone https://github.com/nriqu322/ninja-game.git

Go to the folder

$ cd ninja-game

Install all dependencies

$ npm install

Run the server

$ node server.js

Open your browser and type

localhost:8080

Hero & Items

Ninja

Ninja

  • Role: Main character

Ninja-Star

star

  • Item : collectible
  • Role : weapon

Kunai

kunai

  • Item : collectible
  • Role : weapon

Scenes

Main Menu : Where you can see three links: Play the Game, Instructions and Leader Board.

Menu

Play : Run for you life and to get the highest score.

Play

GameOver : See your obtained score and type your name.

GameOver

LeaderBoard : Check if you manage to appear in the Leader Board.

Leaderboard

Build with

  • JavaScript
  • Webpack
  • Phaser 3
  • Express
  • Babel
  • Jest
  • Heroku
  • Leaderboard API service
  • ESlint and Stylelint as linters

Available scripts

You can use $ npm run {script here} with the following commands :

  • "test": "jest"
  • "build": "webpack --mode production".
  • "watch": "webpack --mode development --watch"

Testing

Unit tests with Jest. You can run the tests with the following code:

$ npm test

Future Features

  • Ability to throw collected ninja-tars and kunais
  • More stages
  • Add enemies to fight.

Project Design

Project purpuse

Development of a platform game as part of the Microverse curriculum to show technical and soft skills learned through the curriculum. Use of Phaser 3 to develop the game.

Objectives

  1. Design the game, selecting a main theme for the game and characters.
  2. Research for assets and media content: sprite sheets and images.
  3. Write code for the game: Scenes, Characters.
  4. Add a score system
  5. Include a backend API to store a leader board.
  6. Add enemies and game sound.
  7. Add unit test using Jest.

Achievements

  1. Choose a ninja as main character and city as environment. Select a infinite platform game.
  2. Use Open Game Art for platform image and ninja sprite sheet, then use Figma website to create the sprite sheets for ninja actions.
  3. Write code for different scenes: Load Scene, Instructions, Main Menu, Main Scene and GameOver Scene.
  4. Add ninja-star and kunai as collectible items for the score system.
  5. Send request to get the API key and code LeaderBoard Scene
  6. Couldn't be able to add sound and enemies. This is going to be in added future features.
  7. Use axios and jest mocks to add tests.

Author

๐Ÿ‘ค Luis Saavedra


๐Ÿค 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

Microverse


ninja-game's People

Contributors

dependabot[bot] avatar nriqu322 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

uxhamzah

ninja-game's Issues

Peer-to-Peer Code Review

  1. Good structure but use a variable in instruction.js file to keep it DRY.
  2. Write instructions to enable game work on local machine.
  3. Create and import module for your assets to aid testing.
  4. Very readable code.

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.