GamesChart HTML5 API Implementation

Implement the GamesChart API using the HTML5 and Javascript in the following simple steps: {|

Step 1 - Including the Javascript file in your project
1. Download the GamesChart code. The entire GamesChart API is contained in 1 Javascript file, called "gameschart.js". This needs to be included in your application. You will find the latest API Javascript file in the GamesChart Developer Pack. 2. Once downloaded, place the "gameschart.js" file wherever you like, but we recommend putting it in the same directory as your game code.

Step 2 - Adding the Javascript code to your game
1. Locate the part of your game code (your game's javascript code) where initialisation is performed and add the following line: gc = new GamesChart; // this will initialise the GamesChart system, do this once on initialisation 2. Next, locate the point in your code that handles your game's update mechanism and add the following line: gc.update; // this will update the GamesChart system

Step 3 - Include GamesChart in your HTML code.
1. Add the following line to your HTML head section:  2. Add a div tag to hold the information GamesChart needs to link to your game:  "id" - this must be called "gamesdiv" "data-gameid" - this is the unique game ID given to you when you registered your game on the GamesChart developer portal. "data-loadtime" - this is a time in seconds - you can use this to delay the loading of the GamesChart system in the final section, just change the width and height to match that of your game 3. Add the GamesChart canvas to the HTML page that holds your game's canvas  Again, just change the width and height to match the size of your game. Leave the rest un-changed. NOTE: If your game canvas has a z-index, make sure you change the GamesChart's z-index to a higher number to ensure it is displayed on top of your game. IMPORTANT: Once you have implemented the HTML5 API in your game, you will need to play the game once to verify the game with the GamesChart servers. You will then need to enable the game before the GamesChart icon will appear in your game. To do this please log in to your GamesChart Developer Console to view My Games on your developers and then click enable next to that game's entry.