/robotGame

An indie game where you can smash ninjas using your awesome robot.

Primary LanguageJavaScript

Robot vs Ninja

A game where you can eliminate the ninjas, using a robot with massive destruction weapons.

screenshot


This project was made to consolidate my knowledge with JS, and take a step ahead in the game development world.

Content

How to play

  • Left and right keyboard arrows to move the robot.
  • Up arrow to jump.
  • Space bar to shoot the ninjas.
  • Press any button to start the game on the start screen.
  • Click on the OK button to submit a score on the game over screen.

Live Demo

You can access an online version of this game at:
https://robot-vs-ninja.netlify.app/

Requirements

  • A game build with Phaser
  • Leaderboard system using an API
  • Deployed and documented

Possible new features

  • Controls for mobile
  • Pagination for scores
  • Highlight player best score
  • More content (Stages, actions, and animations)

Requisites

Built With

  • Javascript
  • Phaser 3 (Game Engine)
  • HTML/CSS
  • Webpack and babel
  • JEST for tests
  • ESlint and Stylelint (Linters)
  • GitHub Actions (CI Tool)
  • Git, Github and VScode

Game Design

The objective of the game

  • Play until you reach the top 10

Game Mechanics

  • Shoot ninjas to earn points.
  • Keep moving to avoid ninjas or is game over.

Scope

  • Kind: Shooter
  • Platform: Desktop web browser
  • Target: Build and deploy in 5 days, using free assets only.

Schedule

Day 1 - Plan and setup

  • Design game
  • Execution plan
  • Follow tutorial
  • Look for examples

Prepare assets

  • Find source
  • Resize sprites
  • Create spreadsheets

Setup

  • Setup environment
  • Configurations
  • Files structure

Day 2 - Start development

Implementation
  • The draft starts, game, and ending scenes
  • Setup to load assets and animations

Day 3 - Core game engine

  • Player movement
  • Player shoot
  • Enemy generator
  • Score system

Day 4 - Documentation and API

  • Read API docs
  • fetch data from API
  • Integrates with API to submit scores
  • Write unit tests

Day 5 - Polish and Deploy

  • Deploy
  • Basic documentation

Getting Start

Get a local copy

Now you need a copy of this application if you are using Git:

git clone git@github.com:SevlaMare/robotGame.git

Otherwise just hit (Download Zip) on the green button (Code) at top of this page.

Open terminal

Open your terminal inside the game folder, and paste the following commands:

Download all dependencies

npm install

Compile

yarn build

Start the server

yarn go

Go to a web browser (Like Google Chrome) and visit:

localhost:7000

Run the tests

yarn test

Contributing

Contributions, issues and feature requests are welcome!

You can do it on issues page.

Acknowledgments

A special thanks to the code reviewers.

Author

👤 Thiago Miranda

License

Sprites from gameart2d.com and cloud sprite from bevouliin.com

Creative Commons • 2020