Skip to content

vtchris/unit-4-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

X-Men Role Playing Game

Play online at: https://vtchris.github.io/unit-4-game/

Technology

  • JavaScript
  • jQuery
  • Bootstrap
  • HTML/CSS

This project was intended to reinforce jQuery and JavaScript skills. I also took the opportunity to work on Bootstrap skills. The relevant project instructions and requirements follow. Instead of having the player you select fight against the players you didn't select, I grouped the characters into Hero and Villain arrays, the characters are randomly selected and placed on the board. Thanks for playing, and have fun!

Mission (Homework)

# unit-4-game jQuery game

jQuery Assignment

Overview

In this assignment, you'll create another fun and interactive game for web browsers. This time, your app must dynamically update your HTML pages with the jQuery library.

Before You Begin

Choose whichever game you want to make from the choices below. The CrystalsCollector game is the recommended option, but if you are looking for an extra hard challenge then take a stab at the Star Wars exercise. (Note: Only choose the Star Wars Exercise if you are feeling very comfortable with the material covered in class. The Crystal Collector activity is plenty challenging enough!).

Option Two: Star Wars RPG Game (Challenge)

Star Wars

  1. Watch the demo.

  2. Here's how the app works:

    • When the game starts, the player will choose a character by clicking on the fighter's picture. The player will fight as that character for the rest of the game.

    • The player must then defeat all of the remaining fighters. Enemies should be moved to a different area of the screen.

    • The player chooses an opponent by clicking on an enemy's picture.

    • Once the player selects an opponent, that enemy is moved to a defender area.

    • The player will now be able to click the attack button.

      • Whenever the player clicks attack, their character damages the defender. The opponent will lose HP (health points). These points are displayed at the bottom of the defender's picture.
      • The opponent character will instantly counter the attack. When that happens, the player's character will lose some of their HP. These points are shown at the bottom of the player character's picture.
  3. The player will keep hitting the attack button in an effort to defeat their opponent.

    • When the defender's HP is reduced to zero or below, remove the enemy from the defender area. The player character can now choose a new opponent.
  4. The player wins the game by defeating all enemy characters. The player loses the game the game if their character's HP falls to zero or below.

Option 2 Game design notes
  • Each character in the game has 3 attributes: Health Points, Attack Power and Counter Attack Power.

  • Each time the player attacks, their character's Attack Power increases by its base Attack Power.

    • For example, if the base Attack Power is 6, each attack will increase the Attack Power by 6 (12, 18, 24, 30 and so on).
  • The enemy character only has Counter Attack Power.

    • Unlike the player's Attack Points, Counter Attack Power never changes.
  • The Health Points, Attack Power and Counter Attack Power of each character must differ.

  • No characters in the game can heal or recover Health Points.

    • A winning player must pick their characters wisely by first fighting an enemy with low Counter Attack Power. This will allow them to grind Attack Power and to take on enemies before they lose all of their Health Points. Healing options would mess with this dynamic.
  • Your players should be able to win and lose the game no matter what character they choose. The challenge should come from picking the right enemies, not choosing the strongest player.