Knight of the Living Dead

Creator · 2016

Knight of the Living Dead Sketch file and Sublime code

Designing, Coding, Creating a Game

This game was designed in Sketch and made into an entirely web based game.

Knight of the Living Dead is a roquelike RPG inspired by games like Final Fantasy and Darkest Dungeon. In the game you are the Undead Knight on your way to defeat the king and take back your kingdom.

There were a few features that make a roquelike RPG.

  1. Gaining skills, items, and power
  2. Turn based gameplay
  3. New unique monsters to fight
  4. Sense of randomness, so each game feels unique
  5. Increased difficulty as you progress

From the feedback I gathered the most important feature people wanted was cool skills to use. So that's where the below JavaScript Object was created.


  var keeneye = {
    name: "Keen eye",
    statAdj: 15,
    skillpointCost: 3,
    turns: 10,
    turnsCount: 0,
    uid: "keeneye",
    heroOwns: false,
    effectDescription: "+15% accuracy for 10 turns",
    adjHero: function (){
      hero.accuracy += keeneye.statAdj; },
    negHero: function (){
      hero.accuracy -= keeneye.statAdj; },
  };
        

The Goal

Create a system where your character gains new skills, uses them in battle, and are easy to understand. The user would randomly get to decide to add them.

Example of the perks and skills you can have

The Solution

Create Javascript Objects where all the properties, methods, and values exist for each skill. Defined within the object was everything I needed to create many different types of skills and also it allowed me to balance and change them quickly.

The biggest challenge was how to track the skills and reset the character when the skills ran out. Thats where the adjHero functions came into play.

The Outcome

There are 11 different skills the hero can use. The code to manage skills is only 35 lines long thanks to the JavaScript Objects. Below is the code that runs every turn to check when your skill bonus has ended, and turns your stats back to default.

The code to check and run through the skills.