[PLUGIN] Clay.io (leaderboards & achievements)

Post your completed addons to share with the community

Post » Fri Jul 13, 2012 4:52 am

1) As of right now you have to override our CSS on your page. Our CSS stylesheet is inserted after the first <script> tag, so as long as you have your CSS after the first <script> tag in index.html, all of our stuff should get overridden.

Chrome's dev tools/firebug will be your best friend for this, but the structure for achievements is:

.clay-achievement
.clay-achievement-header
.clay-achievement-content
    (if there's an icon for the achievement you'll have these as well)
    .clay-achievement-icon
    .clay-achievement-description
    (endif)
.clay-achievement-close

2) The payment API being integrated into the plugin is on the todo list. I've integrated "Show all achievements" and updated the plugin with it

3) Encryption isn't possible right now. I'm not familiar enough with Construct 2 to know if you can create a backend for your game. So long as you have a backend, you'll be able to. Perhaps there's a way to get it working well with the AJAX plugin, I'll have to take a look

4) Fixed (no need to update the plugin for this fix to work)austin2012-07-13 05:45:34
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Fri Jul 13, 2012 5:30 am

@austin

"payment API" ! It's cool~
B
97
S
22
G
176
Posts: 4,111
Reputation: 103,025

Post » Fri Jul 13, 2012 11:52 am

This is very relevant to my interests!! Nice work!
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Fri Jul 13, 2012 8:34 pm

Hi, I cant make the plugin work. Can someone post a small .capx without the API IDs just so I can see if Im doing something wrong?
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Fri Jul 13, 2012 9:13 pm

http://clay.io/plugins/scirra/test.capx

That's a very basic implementation of it. If you hold the space bar down, the score will go up, when you left click on the score, it will post it and show the leaderboard.

Let me know if you figure out what's going wrong!austin2012-07-13 21:13:36
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Fri Jul 13, 2012 9:31 pm

Hi @austin, thank you for the example.
Now its showing me the message "Game Key Error!
Game not found" on the upper right corner of the page.
Ive copied the secret key from the api page on the clay.io object and used the leaderboard ID on the leaderboar events.
Do you have any clue what Im doing wrong? ;]
Im using R99 by the way.sheepy2012-07-13 21:31:37
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Fri Jul 13, 2012 9:36 pm

Ive figured what I was doing wrong: I was using the secret key when I was supposed to use the subdomain/game key instead. ;]
Maybe it would be better to make the difference between the two things clearer. ;P
Anyway, thank you for the plugin, Im very excited about the possibilities!


B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Fri Jul 13, 2012 9:48 pm

[QUOTE=austin] 1) As of right now you have to override our CSS on your page. Our CSS stylesheet is inserted after the first <script> tag, so as long as you have your CSS after the first <script> tag in index.html, all of our stuff should get overridden.

Chrome's dev tools/firebug will be your best friend for this, but the structure for achievements is:

.clay-achievement
.clay-achievement-header
.clay-achievement-content
    (if there's an icon for the achievement you'll have these as well)
    .clay-achievement-icon
    .clay-achievement-description
    (endif)
.clay-achievement-close

2) The payment API being integrated into the plugin is on the todo list. I've integrated "Show all achievements" and updated the plugin with it

3) Encryption isn't possible right now. I'm not familiar enough with Construct 2 to know if you can create a backend for your game. So long as you have a backend, you'll be able to. Perhaps there's a way to get it working well with the AJAX plugin, I'll have to take a look

4) Fixed (no need to update the plugin for this fix to work)[/QUOTE]


Thank you for the answers! I copied the structure of notification window.

Actually i still don't see an action about "Show all Achivements"
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Fri Jul 13, 2012 10:08 pm

@sheepy I've updated the game settings page to make that more clear, thanks for pointing it out

@Joannes Hmm, yes it would seem I didn't upload the file to the correct spot - download again here
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Fri Jul 13, 2012 10:13 pm

Im having a blast experimenting with the features from clay.io, awesome work!
Just a couple questions:
1- Will there be a way to post the canvas screenshot to facebook?
2 - Is there any way to make a facebook login page that isnt a pop-up? The facebook pop-up is being blocked here by chrome.
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests