Created: 10/11/2016
By: Code This Lab S.r.l.
Email: info@codethislab.com
Thank you for purchasing our game. If you have any questions that are beyond the scope of this help file, please feel free to email via user page contact form here. Thanks so much!
Gear Madness is a HTML5 Racing Game. 10 tracks to test your driving skills! Win as many competitions as you can to buy power-ups! Are you ready to race again the fastest cars?
The ZIP package contains the game with 1280x768 resolution that scales to fit the whole screen device
Just warning that for very wide screens, the game may not be perfectly full screen.
The game is fully compatible with all most common mobile devices.
Sounds are enabled for mobile but we can't grant full audio compatibility on all mobile devices due to some well-know issue between some mobile-browser and HTML5.
So if you want to avoid sound loading, please read Disable Sound section).
WARNING: Sounds can't be enabled for Windows Phone as this kind of device have unsolved issues with 'audio' and 'video' tag.
The item package contains the following folders:
To install the game just upload on your server the game folder live_demo.
TEXT_GAMEOVER = "CONGRATULATIONS, YOU WON ALL THE RACES!"; TEXT_LOSE = "RACE LOST"; TEXT_WIN = "RACE WIN"; TEXT_ARE_SURE = "ARE YOU SURE?"; TEXT_KMH = "mph"; TEXT_M = "m"; TEXT_GEAR_N = "N" TEXT_CURRENCY = "$"; TEXT_VS = "Vs"; TEXT_PERFECT = "PERFECT"; TEXT_SHOP = "SHOP"; TEXT_SELECT_STAGE = "SELECT STAGE"; TEXT_TOTAL_SCORE = "TOTAL SCORE"; TEXT_FIRST_WIN = "FIRST WIN"; TEXT_PRIZE = "PRIZE"; TEXT_BONUS = "BONUS"; TEXT_BONUS_TRACK_LENGTH = "TRACK LENGTH"; TEXT_BONUS_OVERTAKING = "OVERTAKING DISTANCE"; TEXT_BONUS_DIFFICULTY = "LEVEL DIFFICULTY"; TEXT_HELP1 = "PRESS AND HOLD ACCELERATOR TO KEEP THE REV NEEDLE IN THE GREEN AREA AND MAKE A PERFECT START"; TEXT_HELP2 = "PRESS THE GEAR AT THE RIGHT TIME FOR AN EXCELLENT GEAR SHIFT"; TEXT_SAVE_REMOVE = "THIS WILL REMOVE ALL YOUR ACHIEVEMENTS! DO YOU WANT TO PROCEED?" TEXT_IOS_PRIVATE = 'Your web browser does not support storing settings locally. In Safari, the most common cause of this is using "Private Browsing Mode". Some info may not save or some features may not work properly'; TEXT_SHARE_IMAGE = "200x200.jpg"; TEXT_SHARE_TITLE = "Congratulations!"; TEXT_SHARE_MSG1 = "You completed the race in "; TEXT_SHARE_MSG2 = " seconds!
Share your score with your friends!"; TEXT_SHARE_SHARE1 = "My time is "; TEXT_SHARE_SHARE2 = " seconds! Can you do better";
This game have the canvas tag in the body. The ready event into the body calls the main function of the game: CMain().
The head section declares all the javascript functions of the game. The whole project uses a typical object-oriented approach.
In the init function there are 8 mapped events that can be useful eventually for stats
var oMain = new CMain({ //////////////////////////////////////////////////PLAYER UPGRADE PARAMS///////////////////////////////////////////////////// //////////GEAR (HERE BELOW, YOU WILL FIND ALL PARAMS OF GEAR UPGRADE)/////////// ///WIDTH IN DEGREE OF GREEN AREA IN STARTING BATTLE BLASTOFF start_green_width: [ 20, //NO UPGRADE 30, //LEVEL 1 40, //LEVEL 2 55 //LEVEL 3 ], ///WIDTH IN DEGREE OF GREEN AREA DURING RACE in_race_green_width: [ 4, //NO UPGRADE 6, //LEVEL 1 8, //LEVEL 2 12 //LEVEL 3 ], ///DURATION (in milliseconds) OF STOP ACCELERATION IF PLAYER MISSES THE GEAR SHIFT wrong_change_gear_duration: [ 1500, //NO UPGRADE 1350, //LEVEL 1 1200, //LEVEL 2 1000 //LEVEL 3 ], //////////ENGINE SPEED (HERE BELOW, YOU WILL FIND ALL PARAMS OF ENGINE SPEED UPGRADE). THE "speed" PARAM STATES THE MAX SPEED (IN KM/H) ACHIEVABLE WITH A GEAR, AND THE "time" PARAM STATES HOW LONG DOES IT TAKE (IN MILLISECONDS) TO REACH THAT SPEED/////////// player_engine: [ ///GEAR N ///GEAR 1 //GEAR 2 //GEAR 3 //GEAR 4 //GEAR 5 //GEAR 6 [ {speed: 0, time:0}, {speed: 30, time:6000}, {speed: 60, time:7000}, {speed: 90, time:8000}, {speed: 120, time:9000}, {speed: 150, time:10000}, {speed: 180, time:11000}], //NO UPGRADE [ {speed: 0, time:0}, {speed: 30, time:5000}, {speed: 60, time:6000}, {speed: 90, time:7000}, {speed: 120, time:8000}, {speed: 150, time:9000}, {speed: 180, time:10000}], //LEVEL 1 [ {speed: 0, time:0}, {speed: 30, time:4000}, {speed: 60, time:5000}, {speed: 90, time:6000}, {speed: 120, time:7000}, {speed: 150, time:8000}, {speed: 180, time:9000}], //LEVEL 2 [ {speed: 0, time:0}, {speed: 40, time:3800}, {speed: 70, time:4800}, {speed: 100, time:5800},{speed: 130, time:6800}, {speed: 160, time:7800}, {speed: 200, time:8800}] //LEVEL 3 ], //////////NITRO (HERE BELOW, YOU WILL FIND ALL PARAMS OF NITRO UPGRADE)/////////// ///DURATION (in milliseconds) OF NITRO POWER nitro_duration: [ 0, //NO UPGRADE 1500, //LEVEL 1 3000, //LEVEL 2 4500 //LEVEL 3 ], ////////////////////////////////////////////////////////OPPONENT UPGRADE PARAMS///////////////////////////////////////////////// /////////////OPPONENTS ENGINE SPEED PARAMS . THE "speed" PARAM STATES THE MAX SPEED (IN KM/H) ACHIEVABLE WITH A GEAR, AND THE "time" PARAM STATES HOW LONG DOES IT TAKE (IN MILLISECONDS) TO REACH THAT SPEED/////////// opponent_engine: [ //GEAR N //GEAR 1 //GEAR 2 //GEAR 3 //GEAR 4 //GEAR 5 //GEAR 6 [ {speed: 0, time:0}, {speed: 30, time:4500}, {speed: 50, time:6200}, {speed: 75, time:7800}, {speed: 110, time:8000}, {speed: 120, time:9000}, {speed: 150, time:10000}], //OPPONENT 1 [ {speed: 0, time:0}, {speed: 30, time:4000}, {speed: 50, time:6000}, {speed: 75, time:7500}, {speed: 110, time:8000}, {speed: 130, time:8500}, {speed: 160, time:9000}], //OPPONENT 2 [ {speed: 0, time:0}, {speed: 30, time:4800}, {speed: 60, time:6900}, {speed: 90, time:7700}, {speed: 130, time:9300}, {speed: 150, time:10500}, {speed: 180, time:12000}], //OPPONENT 3 [ {speed: 0, time:0}, {speed: 30, time:4000}, {speed: 50, time:5500}, {speed: 75, time:6900}, {speed: 110, time:8000}, {speed: 130, time:8500}, {speed: 160, time:9000}], //OPPONENT 4 [ {speed: 0, time:0}, {speed: 30, time:3900}, {speed: 55, time:5300}, {speed: 80, time:6500}, {speed: 100, time:7000}, {speed: 120, time:8000}, {speed: 150, time:9000}], //OPPONENT 5 [ {speed: 0, time:0}, {speed: 25, time:5500}, {speed: 65, time:6500}, {speed: 105, time:6200},{speed: 145, time:6500}, {speed: 180, time:7000}, {speed: 230, time:8000}], //OPPONENT 6 [ {speed: 0, time:0}, {speed: 30, time:4000}, {speed: 65, time:4800}, {speed: 100, time:5300},{speed: 130, time:6000}, {speed: 150, time:6700}, {speed: 180, time:8000}], //OPPONENT 7 [ {speed: 0, time:0}, {speed: 35, time:3800}, {speed: 70, time:4700}, {speed: 105, time:5400},{speed: 130, time:5900}, {speed: 155, time:6500}, {speed: 185, time:7200}], //OPPONENT 8 [ {speed: 0, time:0}, {speed: 35, time:3700}, {speed: 70, time:4600}, {speed: 105, time:5200},{speed: 130, time:5700}, {speed: 155, time:6300}, {speed: 185, time:7000}], //OPPONENT 9 [ {speed: 0, time:0}, {speed: 35, time:3700}, {speed: 70, time:4600}, {speed: 105, time:5200},{speed: 130, time:5700}, {speed: 155, time:6300}, {speed: 185, time:7000}] //OPPONENT 10 ], /////////////OPPONENTS SKILLS. SETS VARIOUS OPPONENT SKILL://///////////////////// // - wronggearchangeratio: SETS THE PROBABILITY THAT AN OPPONENT MISSES THE GEAR SHIFT // - wrongearduration: DURATION (in milliseconds) OF STOP ACCELERATION IF OPPONENT DO A WRONG GEAR CHANGE // - normalizednitroshottime: THE TIME WHEN OPPONENT SHOT THE NITRO CHARGE. THE TIME IS NORMALIZED, 0 MEAN THAT OPPONENT WILL SHOT NITRO IN THE BEGINNING OF THE RACE, 1 WILL SHOT IN THE END, 0.5 WILL SHOT IN THE MIDDLE OF THE RACE // - nitroduration: DURATION (in milliseconds) OF NITRO opponent_skills: [ {wronggearchangeratio:0.9, wrongearduration:1500, normalizednitroshottime:0, nitroduration: 0}, //OPPONENT 1 {wronggearchangeratio:0.8, wrongearduration:1500, normalizednitroshottime:0, nitroduration: 0}, //OPPONENT 2 {wronggearchangeratio:0.7, wrongearduration:1500, normalizednitroshottime:0, nitroduration: 0}, //OPPONENT 3 {wronggearchangeratio:0.6, wrongearduration:1500, normalizednitroshottime:0, nitroduration: 0}, //OPPONENT 4 {wronggearchangeratio:0.5, wrongearduration:1500, normalizednitroshottime:0.25, nitroduration: 1500}, //OPPONENT 5 {wronggearchangeratio:0.4, wrongearduration:1500, normalizednitroshottime:0, nitroduration: 0}, //OPPONENT 6 {wronggearchangeratio:0.3, wrongearduration:1500, normalizednitroshottime:0.4, nitroduration: 2000}, //OPPONENT 7 {wronggearchangeratio:0.2, wrongearduration:1500, normalizednitroshottime:0.4, nitroduration: 3000}, //OPPONENT 8 {wronggearchangeratio:0.1, wrongearduration:1500, normalizednitroshottime:0.35, nitroduration: 3000}, //OPPONENT 9 {wronggearchangeratio:0, wrongearduration:1500, normalizednitroshottime:0.1, nitroduration: 4500} //OPPONENT 10 ], ////////////////////////////////////////////////////////TRACK PARAMS///////////////////////////////////////////////// //LENGTH (IN METERS) OF A RACE TRACK track_meter_length: [ 300, //TRACK 1 500, //TRACK 2 1000, //TRACK 3 300, //TRACK 4 300, //TRACK 5 1000, //TRACK 6 500, //TRACK 7 300, //TRACK 8 1000, //TRACK 9 500 //TRACK 10 ], ////////////////////////////////////////////////////////REWARD PARAMS///////////////////////////////////////////////// /////////////FIRST TIME REWARD, FOR COMPLETING A TRACK /////////// track_rewards: [ 100, //TRACK 1 150, //TRACK 2 200, //TRACK 3 250, //TRACK 4 300, //TRACK 5 350, //TRACK 6 500, //TRACK 7 550, //TRACK 8 600, //TRACK 9 700 //TRACK 10 ], /////////////BONUS REWARD EACH TIME YOU WIN A RACE. BASED ON THE LENGTH OF THE TRACK, AND MULTIPLIED BY THE VALUE BELOW/////////// bonus_multiplier_length_reward: 2, /////////////BONUS REWARD EACH TIME YOU WIN A RACE. BASED ON THE OVERTAKING DISTANCE, AND MULTIPLIED BY THE VALUE BELOW/////////// bonus_multiplier_overtaking_reward: 1.5, /////////////BONUS REWARD EACH TIME YOU WIN A RACE. BASED ON THE LEVEL TRUCK NUMBER, AND MULTIPLIED BY THE VALUE BELOW/////////// bonus_multiplier_difficulty: 10 });
The game use two CSS files. 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. 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 canvas and some hack to be fully compatible with all most popular mobile devices
This game contains:
Resuming, the complete game flow is the following:
You can easily change all the game graphic, replacing all the file you need in the "/sprites" folder. Just respect file format (.png or .jpg) and size if you don't want to change any code line.
If you want to disable all the sounds for mobile devices, you have to change the following value in settings.js file:
var DISABLE_SOUND_MOBILE = true;
CTL Arcade will allow you to add a real arcade on your worpress website, in this way your users will be more involved and will stay connected longer.
It's possible to add Ads banner at the beginning of each game and at the end of each level. This will give you a new tool to increase your revenues.
Your own users will promote your website sharing their scores on the main Social Networks, with no extra costs for you.
You'll get by default the score-sharing on Twitter. To add Facebook just follow the guideline below.
3 widgets can be added in your pages through a shortcode.
Once again, thank you so much for purchasing this game. Feel free to contact us if you have any questions or issue relating to this game. No guarantees, but we'll do our best to assist.