Just recently I implemented the GameJolt API for my Construct 2 project Pocket Rocket. After following the instructions on the blog post I found that there were a few omissions that slowed down the process but with perserverance I managed to do it. So Iโve decided to write a quick blog post for the new users of Construct 2 on how to completely set up the API and how to get trophies and a scoreboard added to your game.
Click here and read the blog post. Download and install the exported plugin as described.
Click on your Dashboard/Manage Your Games/ and click on the game on which you want to add the API.
Under Recommended ToDo/ click to add a trophy. (Even if you only want to add a scoreboard you have to click here!)
On the right, under Game Info/ there is a Game ID and a Private Key. Make a not of these! You will need them later in Construct 2!!!
Add as many achievement trophies as you need.
For Scoreboards click on the second tab next to Game Trophies and then click on Add A New High Score Table. This is fairly easy to set up although be aware of one thing! In the demo, included with the API and on the image on the blog, you will notice that the score is added to the score table every 15 seconds. If you have also set up your game to update the scoreboard as your score variable increases, then you must have Unique Score enabled on your scoreboard. This will only send your highest score to the scoreboard. Leaving this disabled will add to your scoreboard every time your score increases, filling your scoreboard with unwanted numbers.
When your scoreboard is set up remember to click on Make Primary, this will make things easier later.
Leave that page open in your browser and fire up Construct 2!
Right-click anywhere in your game layout and click on Insert New Object. If you have installed the plugin correctly then under Platform Specific there should appear a GameJolt object type. Insert this into your game.
In your window Projects you will see the GameJolt icon, click to highlight it.
In the window Properties you will notice Game ID and Private Key. The numbers included there are incorrect, you must insert your own ID and key from the GameJolt management page that was mentioned at number 4.
Now you can start adding your GameJolt items. Make a note of how the items are used on the blog and remember that if you want to include an achievement trophy, on the example action,
Gamejolt/Achieve trophy 5980*
you must replace the 5980 with the number next to the trophy you want to add, from the Gamejolt management page. Also if you are including a scoreboard, in the example action,
Gamejolt/ Add score of Score Score to table 0
this will add your โScoreโ variable to the one in your scoreboard. Table 0 always sends scores to your Primary table as set up earlier. If you have multiple scoreboards you must replace the 0 with the ID number next to your scoreboard on the GameJolt management page.
I think Iโve just about covered everything. Hope you have fun adding these to your Construct 2 games.
:)










4 comments