Created: 08/06/2021
By: demonisblack
Email: demonisblack@gmail.com
Thank you for purchasing the game. If you have any questions that are beyond the scope of this help file, please feel free to email via profile page contact form here. Thanks so much!
Gems Match 3 is a HTML5 game where you have to match at least three of the same gems, score as many points as possible before time run out.
The ZIP package contains the game with 1280×768 and 768×1024 resolution that scales proportionally to fit current screen device.
To install the game just upload folder 'game' to your server. The game won't run locally with some browser like Chrome due to some security mode.
You need a website that runs PHP to make facebook share button work, and make sure to change Facebook Open Graph meta and Twitter meta in index.html, just replace [GAME_URL] to your game URL.
<!-- for Facebook -->
<meta property="og:image" content="[GAME_URL]/share.jpg" />
<meta property="og:url" content="[GAME_URL]" />
<!-- for Twitter -->
<meta name="twitter:image" content="[GAME_URL]/share.jpg" />
You can easily customize game text and settings in game.js file
//level settings
var levelSettings = {
score:100,
timer:121000,
columns:8,
rows:8,
tileWidth:60,
tileHeight:60,
assets:[
{src:'assets/item_tile_01.png', hex:'#FF0000'},
{src:'assets/item_tile_02.png', hex:'#FF8000'},
{src:'assets/item_tile_03.png', hex:'#FFCE34'},
{src:'assets/item_tile_04.png', hex:'#36D900'},
{src:'assets/item_tile_05.png', hex:'#006DD9'},
{src:'assets/item_tile_06.png', hex:'#BF00FF'},
{src:'assets/item_tile_power.png', hex:'#ef60a4', power:true}
],
animation:{
swap:.2,
shift:.6,
remove:.2
}
}
//game text display
var textDisplay = {
score:'SCORE',
time:'TIME',
gameover:'NO MORE MOVE!',
timeend:'TIME\'s UP!',
exitTitle:'EXIT GAME',
exitMessage:'ARE YOU SURE YOU WANT\nTO QUIT GAME?',
share:'SHARE YOUR SCORE',
resultTitle:'GAME OVER',
}
//Social share, [SCORE] will replace with game score
var shareEnable = true; //toggle share
var shareTitle = 'Highscore on Defuse the Bomb is level [SCORE]';//social share score title
var shareMessage = '[SCORE] is mine new highscore on Defuse the Bomb! Try it now!'; //social share score message
You can update gems assets in levelSettings, below is the explanation of each most important assets array item:
The sound can be easily disabled to avoid compatibility issues in sound.js file:
var enableMobileSound = true;
The page start with the loader wrapper that covering the whole screen in the body. It shows loader progress when calls the function initPreload()
<!-- PERCENT LOADER START-->
<div id="mainLoader"><img src="assets/loader.png" /><br><span>0</span></div>
<!-- PERCENT LOADER END-->
This section is for browser not support page when calls the function checkBrowser(). It shows error message when detect the browser does not support canvas.
<!-- BROWSER NOT SUPPORT START-->
<div id="notSupportHolder">
<div class="notSupport">YOUR BROWSER ISN'T SUPPORTED.<br/>PLEASE UPDATE YOUR BROWSER IN ORDER TO RUN THE GAME</div>
</div>
<!-- BROWSER NOT SUPPORT END-->
Follow by one canvas tag in the body. The game start initiatie by calls the main function of the game initMain().
<!-- CANVAS START-->
<div id="canvasHolder">
<canvas id="gameCanvas" width="1280" height="768"></canvas>
</div>
<!-- CANVAS END-->
I'm using two CSS files in this game. The first one is a generic reset file. Many browser interpret the default behavior of html elements differently. By using a general reset CSS file, we can work round this. This file also contains some general styling, such as anchor tag colors, font-sizes, etc. Keep in mind, that these values might be overridden somewhere else in the file.
The second file contains all of the specific stylings for the page.
This game using Javascript files below.
Complete game flow:
The most important functions used for page.
The most important functions used for game.
The game contain 'design' folder which include following:
The folder 'assets' in 'game' folder contains all the images of the game that can be replaced. Is better to have the same size of the old ones if you want to reskin the game graphic without coding.
This game is build for Desktop browsers that support HTML5 canvas. Any mobile/tablet should work in landscape view, but they are not officially supported.
I've used the following font and sound files as listed.
Check out support policy here.
Wordpress Site
By using Scoreboard for HTML5 Games plugin, you can embed HTML5 game into WordPress post or page.
> Plugin
Help simulate ads on HTML5 Games, you can integrate and display static and takeover ads through different Ads Serving Platform.
> Documentation
Guide you through integrating Facebook Instant Games API in our HTML5 Games.
> Documentation
Once again, thank you so much for purchasing this game, if you have a more general question relating to the games on CodeCanyon, you might consider visiting the item page in the "Support" section.
If you like the game, please take a moment to rate it. Thanks! 




demonisblack