[PLUGIN] Clay.io (leaderboards & achievements)

  • austin: My first game screen. I only use Clay.io styles. Clay.io loader is disabled. The game is actually loaded in under 1 sec. But it only displays the logo and everything else after some more seconds. Is that version 0.3.6 that you have updated? I'm using it. I downloaded it again, updated my files in the visual studio project but I still see the old log-in box.

  • Also, when I debug the game, I found out that if the player close the log-in box without logging in first, the Clayio.LoggedIn turns to 1. In the next launch, it is 0 again. Is it supposed to work like so? or is it a bug?

    If the player is not logged in, when he wants to submit the score to the leader board, the log-in box does not appear because Clayio.LoggedIn is actually 1 already.

  • Snooba - are you trying to call any specific functions before Clay.io is ready (a separate condition)? This might happen if you try calling the player login before the plugin has loaded (player login is actually called at the beginning if the player is logged out regardless)

    Great thanks! It;s odd that it didn't fire an error until I updated C2, but yeah, adding the "Clay.io is ready" condition fixed everything :)

    /hugs

  • I posted a question in the clay.io forum also, but I thought to ask here too..

    Has anyone had the same issue as me?? The clay.io works ok, when testing locally or previewing on wi-fi.. But when playing the game on cocoonjs launcher, it does nothing! I added 10 easy achievements to my game in clay.io settings and they unlock just as they should, but only as I said, in preview or wifi..

    I added in-game buttons just to see if it is working at all. One to show up the "show all achievements" list and another button for "prompt login".

    Yes, those buttons work.. In preview, wifi and cocoonjs..!?!

    Am I missing something obvious??

  • tipztv you shouldn't have to do any checking if the user is logged in when posting a score, Clay.io should take care of that. The reason it does turn to one is closing that box logs the user in as anonymous. The most recent version of the plugin is 0.4.4 (check the README file, the documentation page isn't updated as often - takes a decent bit of time to do so).

    @Chef - responded on the Clay.io forum

  • austin

    I think I am missing something really obvious, and also, I am not sure this is more a C2 question or a Clay.io question, but I ask anyway.

    If someday, one of my game isn't free, since I see this expression:

    Clayio.HasInstalled (1 if installed/purchased, 0 otherwise)

    Does that means that the game will be playable if not bought, and so, to make a Demo of it, I have to check the Clayio.HasInstalled value to do some actions? (like, for exemple: Go to layout Level5, Else, go to layout EndOfDemo)

    Or it is something else I'll have to do?

  • austin: It's working great now! Thanks a lot!

  • Did someone try to use clay.io with Ejecta?

  • Austin.

    I'm implementing clay.io for my game, but there is a but (I hope this wasn't intended).

    If I prompt the user login in this way:

    Start Layout->Clayio.LoggedIn==0->prompt login.

    If the user closes the popup without actually loggin in, Clayio.LoggedIn returns 1, it should return 0!

  • Aphrodite That's correct. The only other thing you would have to do is call the purchase game action if they haven't purchased it :)

    @0plus1 That's because closing it logs them in as anonymous. Regardless, the API already detects if the user is logged into Clay.io, and displays the login box if they're not, so you shouldn't need that event.

  • austin

    Oh I see, the issue I have with this is that I would like to know if the user is actually logged in, if he's logged as anonymous then achievements are lost forever as I check locally if they have been awarded, same goes for high scores and that stuff, can you elaborate on these issues?

    Thank, so far apart from this issue I'm really liking your product, kudos.

  • It's been nice having everything come together so well for my game, and the in-app payments work wonderfully!

    Might I request an expression that lets us know how many items are in a cart? This would help a lot with ui elements. Possibly even be able to run a loop through which items are in the cart like you can with successful payments. You can try to track it with in-game arrays and such, but the user has the ultimate option to remove items from cart once the cart is pulled up. And it doesn't send back to the game that it as been removed. This is no problem for identifying purchases, but is a little bit of an issue for having a ui that responds accurately to the cart.

  • Can't Post to Facebook or Twitter

    Hey Yo'll!

    I have an issue where I can only post to fb / twitter within Construct 2's game preview.

    When I export my game as HTML5 web and host it on Drop box, the social features wont post to my fb / twitter account, despite being logged into these accounts with Clay.io.

    Clay.io doesnt seem to remember that I'm logged in as the login prompt keeps appearing if I press the Twitter button again (to post game link)

    Tested on r128.2 & r129 using chrome.

    Thanks,

    Alex

    Image shows Clay.io posting successfully after login in C2 game preview:

    <img src="https://dl.dropboxusercontent.com/u/20299415/pictures/Success-authorises%20%26%20posts%20in%20C2%20preview.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • C-7 added to my todo list

    @NECROKRIEG does it work if you upload the files to Clay.io? I think it might be an http vs https issue, and if it works on Clay.io, that would confirm it

  • Heya Austin!

    Social Not Working [Resolved]

    I think you are right because when I hosted the files on another server (not dropbox) it worked well! How do you find out if a server is using http or https?

    Social Not Working with Firefox (C2 Preview)

    I have no idea why but it doesn't work. I really don't like Firefox it has fallen behind Chrome. (Graphics processing slower, C2 image points move around) But it is still a leading browser. Firefox pic attached.

    Thanks Mate!

    Clay.io is awesome

    -Alex :D

    <img src="https://dl.dropboxusercontent.com/u/20299415/pictures/Social-Fail-Firefox.png" border="0" />

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