Created: 12/02/2015
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!
Zombie Invasion is a HTML5 survival game. survive the zombie horde as long as possible avoiding them from crossing the bridge. Each zombie that escapes you damages your energy bar. Be careful not to hit the runaway survivals, in this way you'll get extra energy
Instructions: Tap on the screen to hit the zombies!
The ZIP package contains the game with 11360x832 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.
To install the game just upload on your server the game folder game1136x640.
1 2 3 4 5 6 7 8 | $(document).ready( function (){ var oMain = new CMain(); $(oMain).on( "save_score" , function (evt,iScore) { //alert("iScore "+iScore ); }); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | TEXT_GAMEOVER = "GAME OVER" ; TEXT_SCORE = "SCORE" ; TEXT_PLAY = "PLAY" ; TEXT_HEALTH = "HEALTH" ; WAVE_TEXT = "WAVE" ; TEXT_HELP1 = "TAP THE SCREEN TO KILL THE ZOMBIES. SAVE THE SURVIVOR TO GET EXTRA ENERGY!" ; TEXT_HELP2 = "IF YOU LOSE ALL YOUR HEALTH, YOU WILL DIE!" ; TEXT_SHARE_IMAGE = "200x200.jpg" ; TEXT_SHARE_TITLE = "Congratulations!" ; TEXT_SHARE_MSG1 = "You collected <strong>" ; TEXT_SHARE_MSG2 = " points</strong>!<br><br>Share your score with your friends!" ; TEXT_SHARE_SHARE1 = "My score is " ; TEXT_SHARE_SHARE2 = " points! Can you do better?" ; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | var oMain = new CMain({ //Sets lifepoints of the player playerlife : 10, //Sets damage done (in lifepoints) by: damage_zombie_0 : -1, //Zombie0 damage damage_zombie_1 : -1, //Zombie1 damage damage_zombie_2 : -1, //Zombie2 damage damage_zombie_3 : -2, //Zombie3 damage damage_survivor : 1, //Health points given by survivor //Sets lifepoint (in number of taps) of: life_zombie_0 : 1, //Zombie0 life life_zombie_1 : 2, //Zombie1 life life_zombie_2 : 3, //Zombie2 life life_zombie_3 : 2, //Zombie3 life life_survivor : 1, //Survivor life //Sets score earned by each kill (reverted for survivor): score_zombie_0 : 100, //Zombie0 score score_zombie_1 : 200, //Zombie1 score score_zombie_2 : 400, //Zombie2 score score_zombie_3 : 800, //Zombie3 score score_survivor : -800, //Survivor score start_spawn_time : 2000, //Starting time (in ms) spawn of a zombie/survivor (limited to 500) spawn_time_decrease: 50, //Time (in ms) that will subtract to the start_spawn_time each WAVE stage_start_time: 10000, //Starting time duration (in ms) of a WAVE (not limited) stage_time_increase: 1000, //Time (in ms) that will added at stage_start_time each WAVE //Number of simultaneous zombie spawn. This array is ordered by WAVE sequence. It's not limited in number of spawn, nor in number of array elements. Adding more elements, you will add more different WAVES. Subsequent WAVES > of this array length, will use last element forever. max_spawn_onstages:[1, //WAVE 1 2, //WAVE 2 2, //WAVE 3 2, //WAVE 4 2, //WAVE 5 2, //WAVE 6 2, //WAVE 7 2, //WAVE 8 2, //WAVE 9 3], //WAVE 10 //Zombie probability spawn in percentage. The Array is ordered by zombie type. E.g. Index 0 mean zombie0 and so on... If a zombie-type rate is not specified, will have 0 chance of spawn. zombie_rate_onstage_0: [100], //WAVE 1 zombie_rate_onstage_1: [80,20], //WAVE2 zombie_rate_onstage_2: [40,50,10], //WAVE3 zombie_rate_onstage_3: [40,40,20], //WAVE4 zombie_rate_onstage_4: [35,40,25], //WAVE5 zombie_rate_onstage_5: [35,35,25,5], //WAVE6 zombie_rate_onstage_6: [20,25,35,20], //WAVE7 zombie_rate_onstage_7: [15,20,35,30], //WAVE8 //From WAVE 8 occurences are fixed survivor_rate_onstages: [0,0,5,10,15,20,25,30] //Survivor probability spawn each stage. Index of array mean WAVE. ////////////////////////////////////////////////////////////////////////////////////////// ad_show_counter: 5 //NUMBER OF WAVE PLAYED BEFORE AD SHOWING // //// THIS FEATURE IS ACTIVATED ONLY WITH CTL ARCADE PLUGIN./////////////////////////// /////////////////// YOU CAN GET IT AT: ///////////////////////////////////////////////////////// }); |
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 7 mapped events that can be useful eventually for stats
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | <script> $(document).ready( function (){ var oMain = new CMain(); $(oMain).on( "start_session" , function (evt) { //THIS EVENT IS TRIGGERED WHEN PLAY BUTTON IN MENU SCREEN IS CLICKED }); $(oMain).on( "end_session" , function (evt) { //THIS EVENT IS TRIGGERED WHEN GAME IS OVER OR THE EXIT BUTTON IS CLICKED. }); $(oMain).on( "start_level" , function (evt,iLevel) { //THIS EVENT IS TRIGGERED WHEN A NEW WAVE STARTS }); $(oMain).on( "end_level" , function (evt,iLevel) { //THIS EVENT IS TRIGGERED WHEN CURRENT LEVEL IS OVER. }); $(oMain).on( "save_score" , function (evt,iScore) { //THIS EVENT IS TRIGGERED WHEN GAME IS OVER. IT CAN BE USEFUL TO CALL PHP SCRIPTS (NOT PROVIDED IN THE PACKAGE) THAT SAVE THE SCORE. }); $(oMain).on( "show_interlevel_ad" , function (evt) { //THIS EVENT IS TRIGGERED WHEN THE EXIT BUTTON IS CLICKED OR EVERY CERTAIN AMOUNT OF WAVES. MAY BE USEFUL TO CALL ADS SCRIPT. PLEASE EDIT PARAM 'ad_show_counter' in INDEX.HTML TO SET THIS VALUE. }); $(oMain).on( "share_event" , function (evt,iScore) { //THIS EVENT IS TRIGGERED WHEN GAME IS OVER. CAN BE USEFUL TO CALL SHARING FEATURE SCRIPTS. }); }); </script> <canvas id= "canvas" class= "ani_hack" width= "1136" height= "832" > </canvas> |
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:
1 | 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. Fell 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.