Skip to content

Gem Battle is a tile-matching puzzle video game based on Super Puzzle Fighter II Turbo, built using JavaScript, HTML5 Canvas, and Webpack.

Notifications You must be signed in to change notification settings

jeffdam/gem_battle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gem Battle

Play Gem Battle

Background and Overview

Gem Battle is a two-player game in which players battle each other with the goal of overpowering their opponent.

Pairs of gems are sent down from the drop alley at the top of the screen. Similar to tetris, players can rotate the gems counter-clockwise or clockwise and can move them left and right to position the landing spot of the gems. The gems can be any mixture of four colors. Randomly during the round, gems are replaced with crash gems. When crash gems land and come into contact with the gems of the same color, it clears the imediate same-colored gems and any other same-colored gems that are linked from the playing field. The number of gems that are cleared are then sent to the oponent. A player loses when their drop alley is blocked from gems stacking too high and blocking the openning.

This game is inspired by the classic arcade game Super Puzzle Fighter II Turbo.

Architecture and Technologies

  • Vanilla JavaScript for game logic
  • HTML5 Canvas for rendering
  • Webpack to bundle various scripts into a single source

Functionality

HTML5 Canvas Animation

Using features of Canvas such as requestAnimationFrame (for optimized browser animation), the game and objects within are constantly being redrawn and re-rendered according to player input and positions of the gems.

Controls

Players can press z/x keys to rotate their gem pair clockwise/counter-clockwise. Players can press left/right keys to move their gem pair left or right. Players can press down keys to immediately drop their gem pairs.

Display

Gems are generated with a random combination of four colors of crash gems and gems. Players can see the upcoming gems in the gem staging area.

Gameplay

The game is over when one player blocks their drop alley.

About

Gem Battle is a tile-matching puzzle video game based on Super Puzzle Fighter II Turbo, built using JavaScript, HTML5 Canvas, and Webpack.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published