Skip to content
A recreation of the "Test Your Might" mini-game from the original Mortal Kombat.
CSS JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Test Your Might

Test Your Might Original

What is Test Your Might?

  • Test your might is a recreation of the mini-game from the original Mortal Kombat, released in 1992 by Midway. For kids growing up with a Sega Genesis in their home, this mini-game was a button-masher's paradise.

  • To see the original mini-game in action, see This Clip on YouTube.

Technical Discussion

The game makes use of HTML with image pre-loading, audio elements, and "fade to black" divs.
The game relies on a large amount of CSS which processes nearly all animatinos, scene transitions, and game field set up.
The game uses a large amount of JavaScript to provide game logic, and Player Constructor functions. In addition, the Player object's prototype has two added methods.
All DOM manipulation is done exclusively with jQuery. In addition, the core bar-filling mechanic makes extensive use of jQuery animation

Notes on Game Structure

The core of the game's engine relies on two Objects - the Player and the GameState. These are created using Oject Constructor functions, and provide most of the game's scorekeeping and scene transition mechanics. Player tracks each player's score, and has methods assigned to the Prototype allowing for the storing and incrementing of the player's score. The GameState provides methods allowing scene transition, and retrieval of material names and levels.

Below is a sample of the Player constructor function, and one of the methods on the Prototype.

  this.number = number;
  this.score = score;

Player.prototype.storeScore = function() {
  let holderName = `${this.number}-score`;
  localStorage.setItem(holderName, this.score);

The Making of Test Your Might

Wireframe 1 Wireframe 2

Alex Kibler
Mortal Kombat was created by
Midway Games
Sounds and background are from Amy Rose's Mortal Kombat Longplay video on YouTube.
Classic sprites and additional sounds are from Mortal Kombat Warehouse, a fantastic resource dedicated to all of the classic Mortal Kombat games.
This W3Schools article helped me in learning about jQuery animations, and how they could be controlled with event handlers.

Opportunities for Further Growth

While the game functions properly, there are still additional work that could be done.

Cleaning Up

  • The game makes excessive use of the setTimeout() JavaScript method, often with multiple listed one after another. Maybe I could find a way to compartmentalize these?
  • Also, I would like to refactor additional functionality into the Player and GameState Object methods, helping the code be a little more DRY.

Future Development

Stage 1

  • Add a Character Select screen, complete with more playable characters to choose from.
  • Add a High Scores table at the end of the game, displaying the best scores ever.

Stage 2

  • Add secret characters, maybe with a combination of key presses?
  • Add additional backdrops, with a randomization algorithm.
You can’t perform that action at this time.