Created: 27/04/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!
Head Soccer is a HTML5 Sport Game. Choose your favourite Soccer Team and kick the ball into the net!
The ZIP package contains the game with 1360x840 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 live_demo.
TEXT_GAMEOVER = "GAME OVER"; TEXT_TEAM_0 = "ARGENTINA"; TEXT_TEAM_1 = "BRASIL"; TEXT_TEAM_2 = "ENGLAND"; TEXT_TEAM_3 = "FRANCE"; TEXT_TEAM_4 = "GERMANY"; TEXT_TEAM_5 = "ITALY"; TEXT_TEAM_6 = "NETHERLAND"; TEXT_TEAM_7 = "SPAIN"; TEXT_COMMANDS = "CONTROLS"; TEXT_COMPLETE = "COMPLETE"; TEXT_ALL_COMPLETE = "ALL LEVEL COMPLETE"; TEXT_SELECT_A_LEVEL = "SELECT A LEVEL"; TEXT_TIME = "TIME"; TEXT_TIME_EXT = "EXT TIME"; TEXT_VS = "VS"; TEXT_TEAM_CODE_0 = "ARG"; TEXT_TEAM_CODE_1 = "BRA"; TEXT_TEAM_CODE_2 = "ENG"; TEXT_TEAM_CODE_3 = "FRA"; TEXT_TEAM_CODE_4 = "GER"; TEXT_TEAM_CODE_5 = "ITA"; TEXT_TEAM_CODE_6 = "NED"; TEXT_TEAM_CODE_7 = "ESP"; TEXT_FINISH = "FINAL WHISTLE"; TEXT_SELECT_YOUR_TEAM = "SELECT YOUR TEAM"; TEXT_CREDITS_DEVELOPED = "Developed by"; TEXT_LINK1 = "www.codethislab.com"; TEXT_WIN = "YOU WON"; TEXT_LOSE = "YOU LOSE"; TEXT_SCORES = "SCORES"; TEXT_TIME_EXTENDED = "TIME EXTENDED"; TEXT_SCORE_GOAL_PLAYER = "SCORE PLAYER GOAL"; TEXT_SCORE_GOAL_OPPONENT = "SCORE OPPONENT GOAL"; TEXT_MACTH_SCORE = "SCORE MATCH"; TEXT_TOTAL_SCORE = "TOTAL SCORE"; TEXT_CONGRATULATIONS = "CONGRATULATIONS YOU WON ALL MATCH!"; TEXT_SCORE_PLAYER_GOAL = "Score player goal"; TEXT_SCORE_OPPONENT_GOAL = "Score opponent goal"; TEXT_SCORE_DRAW_MATCH = "Score match draw"; TEXT_SCOR_WON_MATCH = "Score match won"; TEXT_MATCH = "MATCH"; TEXT_KICK_OFF = "KICK OFF"; TEXT_PAUSE = "PAUSE"; TEXT_ARE_SURE = "ARE SURE?"; var TEXT_PRELOADER_CONTINUE = "START"; TEXT_SHARE_IMAGE = "200x200.jpg"; TEXT_SHARE_TITLE = "Congratulations!"; TEXT_SHARE_MSG1 = "You collected "; TEXT_SHARE_MSG2 = " points!
Share your score with your friends!"; TEXT_SHARE_SHARE1 = "My score is "; TEXT_SHARE_SHARE2 = " points! 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({ regular_match_time: 60, //DURATION OF A MATCH IN SECONDS extend_match_time: 30, // DURATION OF A MATCH ENDED IN TIE IN SECONDS add_score_player_goal: 60, //ADD SCORE EVERY PLAYER GOAL remove_score_opponent_goal: -40, //REMOVE SCORE EVERY OPPONENT GOAL score_win: 100, //ADD SCORE WHEN PLAYER WIN A MATCH score_tie: 50, //ADD SCORE WHEN PLAYER TIE A MATCH time_reset_ball: 2, //TIME TO RESET THE BALL AFTER A GOAL IN SECONDS opponent_speeds: [2.7, 2.7, 2.8, 2.9, 3.0, 3.1, 3.3], //OPPONENT SPEEDS IN PIXEL time_opp_become_aggressive: 30, // WHEN THE OPPONENT IS IN DISADVANTAGE AND TIME REACH THIS VALUE THE OPPONENT TAKE NEW DISTANCE PROTECTION VALUES character_speed: 2.7, //CHARACTER SPEED IN PIXEL opponent_distance_protection: [500, 490, 470, 460, 445, 430, 420], // DISTANCE BETWEEN OPPONENT AND BALL FOR PROTECTION THE GOAL opponent_distance_protection_after_shoot: [390, 380, 360, 350, 350, 340, 340], //250, 270, 310, 320, 330, 340, 350DISTANCE BETWEEN OPPONENT AND BALL FOR PROTECTION THE GOAL WHEN SHOT THE OPPONENT IN DIRECTION OF THE PLAYER GOAL opponent_distance_protection_aggressive: 840, //DISTANCE BETWEEN OPPONENT AND BALL FOR PROTECTION THE GOAL WHEN IS BECOME AGGRESSIVE opponent_distance_protection_after_shoot_aggressive: 700, //DISTANCE BETWEEN OPPONENT AND BALL FOR PROTECTION THE GOAL WHEN SHOT THE OPPONENT IN DIRECTION OF THE PLAYER GOAL WHEN IS BECOME AGGRESSIVE time_refresh_AI: [0.5, 0.45, 0.4, 0.45, 0.4, 0.35, 0.3], //HOW MUCH TIME THE AI OPPONENT IS UPDATED reactivity_opponent_for_hell_shoot: {min: 0.5, max: 1}, // REACTIVITY FOR HELL SHOOT WHEN THE BALL COME BEHIND THE OPPONENT ball_velocity_x_reaction: -5, //IF THE BALL VELOCITY X IS HIGHER THAN THIS VALUE (THE BALL GO TO THE PLAYER GOAL) THE OPPONENT CAN DECIDE TO PROTECT HIS GOAL WHEN IS OUT OF HIS RANGE ball_velocity_x_reaction_attack: 2.6, //IF THE BALL VELOCITY IS HIGHER THAN THIS VALUE (THE BALL GO TO THE OPPONENT) THE OPPONENT CAN DECIDE TO GO TO BALL WHEN HIS STAY IN PROTECTION STATE ball_and_character_distance_protection: 100, //DISTANCE BETWEEN BALL AND CHARACTER FOR PROTECTION THE GOAL time_reaction_from_save_to_go: {min: 0.1, max: 0.3}, //TIME REACTION FOR CHANGE STATE FROM PROTECT THE GOAL TO GO TO BALL time_after_reaction: {min: 0.15, max: 0.2}, //TIME AFTER THE OPPONENT CAN TOOK ANOTHER REACTION BEFORE HIS PROTECTS THE GOAL time_interval_shoot: {min: 0.3, max: 1}, //TIME INTERVAL BETWEEN SHOOTS time_in_protection_state: {min: 2, max: 5}, //HOW MUCH TIME THE OPPONENT CAN REMAIN BEFORE HE BEGIN TO GO TO BALL num_levels_for_ads: 2 //NUMBER OF TURNS PLAYED BEFORE AD SHOWING // //////// THIS FEATURE IS ACTIVATED ONLY WITH CTL ARCADE PLUGIN./////////////////////////// /////////////////// YOU CAN GET IT AT: ///////////////////////////////////////////////////////// // http://codecanyon.net/item/ctl-arcade-wordpress-plugin/13856421/////////// });
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.