/farQuest

In-browser Role-Playing game using HTML, CSS, and Javascript

Primary LanguageJavaScriptMIT LicenseMIT

License: MIT

FarQuest

Welcome to FarQuest
A role-playing game of medieval fantasy. Select from a hero class of Knights, Wizards, Huntresses, or be an Assassin. Explore a rich world of story-telling, battles, and surprises as you journey to see the King. He's asked for your help and you fear you're running out of time.

A letter arrived, it's from the King... he's asking for your help. You set off to the castle to speak with the King but you discover your journey there is frought with obstacles. Indeed, something is stirring in the kingdom and your haste quickens. When you arrive at the castle, you discover that there is nary a soul nor sound in the streets and you begin to investigate.

Click here to play FarQuest!

Table of Contents

  1. Technology
  2. Usage & Features
  3. Game Mechanics
  4. License
  5. Music
  6. Installation
  7. Contributing
  8. Questions



Technology

JavaScript   JavaScript   JavaScript   JavaScript   JavaScript   JavaScript   JavaScript   MySQL   JavaScript   Node.js   express   SQL   SQL  



Here is a shortlist of technologies and tools used to build this game.

Please visit the links above to learn more.


Usage & Features

HomePage
Create an account or sign-up to begin. You'll be taken to the character creation page if it is your first time. homepage

Character creation
You have a choice between 4 characters.

  • Knight
  • Wizard
  • Huntress
  • Assassin

Each character class has their own unique set of attributes that effect the stamina, strength, power, speed, luck, and their own set of attacks.

character-selection

Profile
On your profile page, you can see all the characters on your account. You can create new characters, delete old ones, or start a game by clicking on your character.

profile

Adventure Mode
When you start a game you'll be taken into adventure mode where the story begins. Your character is given choices and will effect the events in the storyline.

adventure-mode

Battle
You will encounter enemies in a turn-based fight. Your attacks and defense are calculated from your characters attributes. Keep an eye on your health bar and you trade attacks with the enemy.

battle

Chest & Items
You may find treasures in your journey, what surprises lie inside.

open-chest


Game Mechanics

Storyline paths
Diverging paths for the storyline created complexity in the client-side JavaScript. path-letsgo

Battle - instances
Generating a battle instance during the story line, we fetch the enemy.id and render them to the HTML page. generate-fight
(Please see /public/js/character.js to review the code in more detail: generateFight(); on line 162)

Battle - fight mechanics
Here you can see the some of the factors we're taking in during each turn and action. We calculated the turn-based fight taking in the characters attributes and mixing in RNG. This effects the damange output, defense, chance to miss, etc.

fight-rng fight-mechanics
(Please see /public/js/character.js to review the code in more detail: fight(); on line 190)


License

MIT License

Copyright (c) 2021 Cheng Tang, Liam Stewart, and Dylan Couzon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Music

All Musics are free of charge, but all copyrights vest with YouFulca.


Installation

Download the project then run the command:

npm install

.env

You will also need to setup your .env file with the following variables:

DB_SECRET = { your own variables here}
DB_NAME = {MySql db name}
DB_USER = {MySql username}
DB_PASSWORD = {MySql password}

Database

To seed the database with the game data, run the following command:

npm run seeds

Start the game

Run the follwing command:

npm start

Contributing

Future development opportunites:

  • Additional classes
  • Starter points to distribute
  • Leveling type system
  • Addition story modes
  • Model for Storylines
  • Character armor set
  • Environmental effects
  • Sound effects for attacks
  • Dynamic backgrounds in adventure mode
  • Player-vs-Player battle

We are gamers at heart and this is our first game built together and it was such a great learning experience of all the inner workings of a game of this scope. Then we started to think of the magnitude of our favorite games of the past and the effort and planning it takes to build those. Wow!

If you'd like to contribute, please fork this repository and submit pull request for the features above or other features you'd like to see in the game. We will review it for acceptance.


Contact Us

Please feel free to reach out to us to talk about the game or check out our other individual works.

Liam Stewart




Dylan Couzon




Cheng Tang