Construct Plugin

Forum Listing » Game Achievements Forum » View Topic


  • Here's the completed plugin for Construct for working with the Game Jolt API.

    Current Features

    - User Authorization
    - Trophies
    - Scores
    - Data Storage

    Install Plugin

    You'll have to first install the plugin files into Construct. This should be in Construct/Plugins. The file can be downloaded here:

    http://gamejolt.com/freeware/games/construct-api-example/files/game-jolt-api-plugin/download/937/1921/

    Example CAP

    Once you have the plugin installed, here is an example CAP file to look at:

    http://gamejolt.com/freeware/games/construct-api-example/files/api-example-files/download/937/1922/

    Source Code 

    You can fork and modify and help make it better, if you'd like.

    https://github.com/hworld/gj-construct-plugin 

    Some Documentation

    You first need to populate the Game Jolt API object with your Game ID and your game's Private Key. These can be found in the Manage Trophies section when you're editing your game.

    After that you'll have to set the Username and User Token as well. This can be done in the event sheet. You can not make any API calls without having the Game ID, Private Key, Username and User Token variables set.

    Experiment around with it. The example CAP should show you pretty much how to use it.

    If you have any questions, just ask.

    Last edited on July 30, 2012 - 07:04 PM by CROS

  • Cool, it's really simple and easy to implement too! Nice job on the plugin CROS. Built in high-scores is great too.

  • Yeah, seriously, this is awesome. I think even a total idiot like me can actually make use of this, which just proves how awesome this is. Great work Cros!

    Now I need to go use it. Hmmm...Music

  • "Is achievement achieved" seems to be broken, as I get achievement messages very time I use the example.

  • Okay, all the current stuff is now working, I believe.

    It's also up to date with the current API. Main post updated.

  • Great work! Thanks!Innoccent

  • Downloading.. gonna test this right away :)

  • One question:

    How does the Guest thing in hiscore work and what the extra data does?

    ktxbb

    -Seagull out

  • A score can either be for a member of Game Jolt (you would need to pass in their username/token) or for a guest (just a guest name). Extra data is for you to put in any extra data that you'd like with the score. For example, you may put in the number of seconds they played, so you can make sure they didn't cheat with their score somehow. You can put anything in their that you'd like, really.

  • Ah ok thanks ^^

    Just inserted API and login stuff yesterday and got it actually working so looking good so far. Maybe I get something done by next weekend that might be playable.

  • Added in support for multiple high score tables!

  • using the condition to check to see if an achievement is unlocked seems to generate a crash no matter how I handle it.

  • The source code is now hosted on GitHub for anyone interested in either helping or just seeing how the plugin works.

  • I can't install the plugin. When I start Construct, it says that "cannot open file common.js"

  • Is that Construct Classic or Construct 2? This is the Construct Classic plugin.

Friends {{client.onlineFriendsCount}}/{{client.offlineFriendsCount}}

People Online:

Room Users {{client.usersOnline.length}}

: