Skip to content

rsnazario/capstone-js-phaser-rpg

Repository files navigation

capstone-js-phaser-rpg

A RPG Turn Based Game Build Using the Phaser Framework

Content

Screenshots



Online Version

Live Demo

Features

    Any User Can:

  • Check 'How To Play'
  • Check 'LeaderBoard'
  • Start a New Game, in which
    • Walk Around the World Map
    • Battle Against Dragons
    • Defeat Dragons
    • Post Score (Automatically Posted)

Built With

  • HTML5
  • Javascript
  • Webpack
  • Phaser 3
  • Jest
  • ESLint (Linter) with Stickler (CI Tool)
  • Git, Github and VScode

Getting Start

Get a local copy

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

git@github.com:rsnazario/weather-app-js.git

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

Run App

Since this project already provides the required files for setting up the Webpack, just type on your terminal:

npm install

Now, you can just open your Visual Studio Code and click on Go Live if you have the Live Server extension installed properly. If it requires to select a folder to set as origin, make sure you choose Dist folder.

If you choose to run in your terminal, since the Live Server NPM is already installed when the command npm install is done, just run on your terminal:

npm run server

Testing

After doing the npm install, all the the webpack depencies will be installed and with it will come the Jest Library.
The test for this project is only applicable to functions that are not related to Phaser Framework, which leaves us with the task of testing the API connection only.
Running the tests requires a simple use of the npm script, which triggers the Jest tool:

npm test

Game Overview

Intro

The goal of the game is to kill as much dragons as possible while playing this Turn Based Role Playing Game. It starts with two heroes against 4 types of dragons.
The heroes are the Warrior (HP: 130 ATK: 12) and the Mage(HP: 80 ATK: 22). The dragons follows the same 'rule': the more the hp status, the less the damage inflicted.
Once you encounter the enemies, the two enemy dragons will be randomly generated. Each Dragon defeated counts as 10 on your score!
If any of the heroes goes bellow 40HP, it starts dealing double damage. After each fight, both heroes are healed in 12HP.

Wold Map

The world map is a regular RPG Map, in which the player can walk around by using the Arrow Keys.
Around the map, there are about 40 invisible encounter-zones that will take you to battling! After the Battle Finishes, the player can start moving around again from the position that occurred the enemy encounter.
In the World Map it is not possible to see the enemy encounter zones, which are randomly generated (Also, it's possible to start a game already in a battle if the encounter zone was generated at the Player's initial positioning).

Battling

The Game Follows the same old structure as the first released Final Fantasy Games. The Attack order will always be Heroes first than Enemies.
On the Battle, The actions are chosen on Menus. The hero that will perform the attack is selected automatically when it is its turn and the actions are selected by choosing an option with UP and DOWN Arrow Keys and confirming it with SPACE or LEFT Arrow key.
Actions Menu counts only with 'Attack' option so far, as it is first release of the Dragon Quest Game. Then, on enemies menu, choose which enemy you are going to attack!
In the Battle, choose the actions and the enemy wisely in order to get the max score, since each dragon has different status.

Future Features

As to improve the players best experience, there are some features to be added in the future. The most important ones are listed down here:

  • Magics and Mana Status:
    • Mage Deals Damage with Magic Only
    • Add Damage Dealer Magics based on elements (Fire, Water, Thunder, Wind) and Healing Magics
    • Mana Status and Mana Cost for Each Magic
  • Adding Items to be used during Battle:
    • Healing Items
    • Mana Restoring Items
    • Effect Items
  • Leveling Up Characters

Contributing

Contributions, issues and feature requests are welcome!

You can do it on issues page.

Acknowledgments

First of all, a special thanks for all Microverse Team and Code Reviewers that guides me through my learning.

For this project, I would like to say that I appreciate all help I had from:

Author

👤 Rafael Nazario

Show your support

Give a ⭐️ if you like this project!

Releases

No releases published

Packages

No packages published