[PLUGIN] Clay.io (leaderboards & achievements)

From the Asset Store
Implement a customizable array-based achievement system with the fully-commented template.
  • Do you have clay.css, socket.io.js and clay.js files included as resources?

    I don't think I've specifically written up the docs on how to get C2 games working for Windows 8 yet - I just had the exporter option in there for someone who was asking a couple of weeks ago.

    Include those 3 files and let me know if that fixes things (if they're not in the exported folder, go in /exporters/html5/plugins/clay and copy them over (plus you'll have to add as resources in Visual Studio - that's an extra step even if they're located in the folder)

  • Yup I have the clay.io in my plugin folder, but I didn't set it on my Visual Studio as resource.

    Ok, thanks Austin, I will try it again and inform you later,

  • One question,

    can we use unique leaderboard ID to post our leaderboard with clay.io plugin for scirra?

    Thanks,

  • The Unique Identifier for the leaderboard has the same problem the Achievements had. The field only accepts numbers.

  • On my iPad 3 iOS6, pressing the "X" on a modal does not close them.

  • moenchlax - how did you go with clay.io in your Win 8 app? If it works I'd be pretty keen to add that into my current game:

    http://apps.microsoft.com/webpdp/app/battleship-islands/5e25ffd2-2cb0-4708-b88a-4bdc61f19107

  • moenchlax should work with the newest version of the plugin

    mcdan which modal are you trying to close and how many are open? I haven't upgraded to ios6 yet because of the whole maps deal, but worst case scenario I can upgrade to check it out and diagnose further

    EyeHawk the API should work if you export as Windows 8 and include socket.io.js, clay.js and clay.css. Per Windows 8's approval process, since Clay.io asks for user info, you'll have to include a privacy policy in the settings charm. You can add that with something like:

    WinJS.Application.onsettings = function (e) {

        e.detail.applicationcommands = {

            "about": {

                title: "Privacy", href:"http://clay.io/privacy"

            }

        }

        WinJS.UI.SettingsFlyout.populateSettings(e);

    };

    For an example of a game with Clay.io's API in the Windows 8 store, see apps.microsoft.com/webpdp/en-US/app/word-wars/7ed9304e-c0de-4a0d-880c-02dd496154f1 (though that's not a C2 game)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Awesome thanks Austin! This will be massively useful <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Slowley but surely I get the hang of it, but how do I activly log out?!

  • austin - On the: ..you'll have to include a privacy policy in the settings charm. ...

    Where do you put that code? (in the minimized output of Construct2?)

    Weishaupt - I think the only way is to log into the Clay.io website and log-out there. (I believe that's what I did when I was testing it.) Then you won't be logged-in in when you go into your game.

    Austin, is there something we are missing?

  • Weishaupt we don't have a way to logout through the API - is that something you think would be valuable for us to add? If we did do it, you would call the logout action, and Clay.io would bring up a window asking you to confirm if you want to logout. We'd have to do this so we don't have games that are malicious by logging users out of Clay.io every time they visit the game ;)

    As Paradox said, if you just want to logout, you can from Clay.io

    Paradox I think Windows 8 is okay with inline scripts so you can just toss this into your index.html (somewhere in between <head> and </head> - test it by swiping in the charm, going to settings and seeing if the privacy link shows up)

    <script type='text/javascript'>

    WinJS.Application.onsettings = function (e) {

        e.detail.applicationcommands = {

            "about": {

                title: "Privacy", href:"http://clay.io/privacy"

            }

        }

        WinJS.UI.SettingsFlyout.populateSettings(e);

    };

    </script>

    I think that will do it, but I do remember when I was adding it to Word Wars, I may have had to do something else different. I'm not around that code right now so I can't take a look, but if that doesn't bring up the link, I can take a look

  • austin: Yes, I would like the Log-Out. Think about a open internet terminal, that can be used by anyone.

  • In iOS 6 on an ipod touch 4th gen I can't close any windows by touching the x for the windows.

    I can't seem to get payments working correctly. Clay.io keeps taking money from my paypal but the purchase is not being verified. I was wondering if there are any examples to see if I am implementing it wrong.

    "Failed validatePurchase() | data: item_name:GreenThing | data: item_ids:item_43 | data: gross:0.01 | data: fee:0.01 | data: currency:USD | data: txn_id:pp-5LH88466TR3335913 | data: txn_type:web_accept | data: to_email:claydotio@gmail.com | data: buyer:ste"

  • austin It was just one modal and it was the 'Your score has been submitted' one.

    It glitched pretty intensely when the keyboard came up by squishing the background gradient effect and then not resizing when the keyboard was dismissed, although I think this occurred due to the modal issue as it nothing seemed to respond properly.

  • I'll get to this thing probably Friday, if not then Saturday. Sorry about the slow response, I'm having to sacrifice some support time for product development tie.

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)