Project Boardgame

Project summary

This project consisted in creating a boardgame being governed by the following rules :

Players can move everywhere on the map, except on shading tiles. They can equip weapons randomly placed on the map.

When players end up on contiguous positions, a turn-based fight engages and each player can choose between 2 actions : attack or defend. Attacking will harm the enemy but will make himself vulnerable to attacks, whereas while defending, you won't hit the enemy but your enemy will only deal half the damage it should in case he attacks.

Update 28/1/2018: I have adapted this game in order to make it work with Node.js, il lets you use all the original game features in addition to :

  • Online gaming with a matchmaking system (working)
  • Sounds (working)
  • Player vs AI mode (currently being implemented)
  • Game retrieval (currently being implemented)
  • Leaderboard (currently being implemented)

Implemented technologies

  • jQuery
  • HTML
  • CSS
  • Javascript
  • Node.js

Variations

Specifications

Wording

So far, you've only developed small JavaScript applications. Now you have to go into the creation of a more comprehensive, solid... in short a tougher project. ;)

This project will consist in creating an online JavaScript game in which 2 players move turn by turn in order to compete against each other. Like in Highlander, there can only be one winner !

Aperçu du jeu navigateur au tour par tour
Preview of the turn-by-turn game

Step 1 : Map generation

Start by randomly generating the game map. A cell can either be :

  • Empty

  • Inaccessible (grayed)

On the map, a limited number of weapons (4 maximum) is randomly placed and can be gathered by the players stepping on it.

You have to create at least 4 types of weapons in the game, with differents amounts of damage. The default weapon equipped by the players has to inflict 10 damage points. Each weapon has a name and an associated visual.

The position of both players is also randomly defined on the map when the game is loaded. They must not be on adjacent cells.

Deliverables :

  • HTML/CSS/JS code of the project

Step 2 : the movements

At each turn, a player can move from 1 to 3 cells (horizontally or vertically) before he ends its turn. He obviously can't go through an obstacle.

If a player steps on a cell containing a weapon, he leaves his current weapon at this spot and replaces him with the new one.

Deliverables :

  • HTML/CSS/JS code of the project

Step 3 : the fight !

If the players are on adjacent cells (horizontally or vertically), a fight to the death starts.

During a fight, the games works as this :

  • Each player attacks at his turn

  • The damage dealt depends in the weapon owned by the player

  • The player can either try to attack or defend against the next hit

  • When the player defends, he deals 50% less damage than a normal hit

  • When a player's health points (initially at 100) drop to 0, he loses. A message is displayed ant the game is over.

Deliverables

  • HTML/CSS/JS code of the project

Validating skills

  • Use jQuery in a web application
  • Create a reusable JavaScript application architecture
  • Develop an object-oriented application