[PLUGIN] Clay.io (leaderboards & achievements)

0 favourites
From the Asset Store
Implement a customizable array-based achievement system with the fully-commented template.
  • Fail. Fixed.

  • Hi Austin

    Just started messing around with Clay.io

    Good job! I'll probably use it on my future games!

    Two questions:

    1- It seems the login window is automatically shown at the start of the project. Is there a way for me to avoid this, and show the login window via events?

    2- What happens if a user is offline and awards an achievement? Do I have to program this myself, or will Clay.io automatically sync this when logging back in?

  • Hi Austin!

    I just started using Clayio and I'm loving it! I really needed a simple leaderboards solution and all of a sudden I have freakin Steam! :D

    I1m having trouble with one issue: in the "Save Leaderboard Score" action, Construct won't let me leave the "Player Name" field empty. If I leave just the "" it posts the score with my Clayio login, it doesn't ask for a player name. Am I doing something wrong?

    One other thing (a little like what gammabeam is asking, but not quite): Do leaderboards work offline? If a game is played offline will Clayio save and display locar leaderboards? I'm guessing no, if so, do you plan to add this feature?

    EDIT:

    Woops, You just replied the first part of my question in the comments for the integration tutorial, thanks. But still, it just doesn't ask me for a player name at the time of the score posting. It automatically posts with my profle (not Clayio login, I was wrong, I think it's my Scirra profile). What am I missing?

  • Is it poss for me to be using this plugin and all clay.io features if i put my app on google strore? thx

  • 1) Uncheck this box in your game's settings - then you can call up the login window with the action "Prompt Login" (I just updated the plugin with that action, as well as a condition for when they successfully login after you prompt, and an expression on if they're logged in or not)

    <img src="http://new.tinygrab.com/a160021eefafcbc8841cce3c4dd8f0082d42db8341.png" border="0" />

    2) They're automatically synced. They're also synced if they haven't joined Clay.io and join later.

    mmarcati

    Leaderboards do not work offline - I suppose it's possible, but I can't say it will be implemented any time soon (so many other things to do, and we're a very small team). For it to work, you would have to include socket.io and our API (downloaded) in your project files, and we'd store the scores in localstorage until a connection is found.

    It should be using your Clay.io login (perhaps it uses the same gravatar image which is why you thought it was your Scirra login?) - you can test it by opening an incognito window and trying again (if you're using Chrome)

    megatronx

    Yep, the API will work on Chrome's Web Store

  • Thanks, Austin. Yes, I got confused by the gravatar. And yes, when I ran the game incognito Clay.io did exactly what it was supposed to, so thanks again!

    Awsome tool, man! Thanks a lot and I hope to publish my games at Clay.io very soon!

    And here's a WIP with a little test of the leaderboards:

    Leaderboards test

  • mmarcati, I never see a leaderboard when the game is over. Or what I should expect?

  • Woops. Yes, it seems I uploaded a leaderboardless version by accident. Silly me. Correcting it right now... And there. Should work now.

    Thanks for checking out and bringing it to my attention, cklester!

  • Really awesome, I will look for editing the interface (I read that is possible some pages ago).

    If It is possible I will use Clay.io for my games achievements and leaderboards :)

  • Yep, just a bit of CSS will do the trick

  • Updated the plugin once more with the ability to fetch the items a user owns. I realized it's sort of necessary if you're going to do in-game transactions. You can fetch all the items they've purchased any time they're playing your game. Say they purchased a level pack, you can detect that, and let them play those extra levels.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="http://s3.amazonaws.com/rapgenius/1291131680_two-thumbs-up.jpg" border="0" />

  • I have a question, Clay.io will run fine with Construct2 r100? I mean the .exe publish method.

  • It runs on Chromium/WebKit, so it should :)

  • Hi Austin, great update!

    The prompt login is brilliant!

    I'm just missing a condition for when the user closes the login window (by cancelling or logging in) because right now there's no way for me to block the user clicking objects in the back. I want to be able to restore a "avoidClicks" variable I'm using to control it.

    Is it possible for you to add that as well? <img src="smileys/smiley9.gif" border="0" align="middle" />

    Thanks a lot!

    EDIT:

    I think I have a bug with "Tweet" and "Post to Facebook Wall". The status bar on the browser tells me it is contacting clay.io, and I can see a white pixel around the bottom left corner, but then nothing else happens. I tried these actions both when logged in, and before hitting the login window, by the way.

    EDIT 2:

    Sorry to be a pain in the arse, and this is unrelated to the plugin itself, but I couldn't find your assets anywhere on the site. I thing you should provide them so I can make an awesome button with your logo :D

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