[PLUGIN] Clay.io (leaderboards & achievements)

Post your completed addons to share with the community

Post » Wed Jul 18, 2012 11:43 am

Haven't begun yet ;) Sending you a PM
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Wed Jul 18, 2012 7:50 pm

Awesome @austin! ;]
Thanks!
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Thu Jul 19, 2012 8:20 am

I just noticed, that it's a "Clear scores" function in Clay.io's Leaderboard admin. This helped me alot!
B
19
S
5
G
4
Posts: 109
Reputation: 4,195

Post » Thu Jul 19, 2012 8:26 am

@austin I've found your example game: http://firenano.clay.io/

This is exactly the same leaderboard logic what I would like to make in my game!
When the game ends:
A: Ask user to Enter name, click on submit, get the score data in the bg, display the Leaderboard with the game design, and place a custom back button to close it...
B: Dont submit score button, no Leaderboard display.

I can make all things except to get the score list in the bg, and display it with my game's design.

Will it be a feature of the C2 plugin?
B
19
S
5
G
4
Posts: 109
Reputation: 4,195

Post » Thu Jul 19, 2012 8:58 am

@austin I would like to ask where I can find the graph of the Custom Statistic?

I used the Cio Custom stat event with
Metric name: "Level" & myvariable, what needs to make it "Level6" "Level12" "Level24" and
Increment amount: 1


I noticed, when used the Cio's Log Play event, a new "Play" metric appeared in Clay.io's game admin page. I trought that this event can be used to record additional information about players:
- The plugin records automatically how many times a game is loaded in a browser. - The Log Play could be used to record how many times a user plays.

In Clay.io's game admin it is a little deceptive to have a "Plays" in the top of the Statistic type selection and an another on the bottom. Maybe the metric, what is auto recorded could be have a name like "Visits" or "Opens" or "Game started".

I really love the value diplay on the right of the statistic! :)
B
19
S
5
G
4
Posts: 109
Reputation: 4,195

Post » Thu Jul 19, 2012 10:32 am

Added that feature for leaderboards ("Fetch"). Basically you call fetch, it stores the data in an expression, so use the fetch completed condition and another condition that is a loop from 0 to Clayio.LeaderboardScoreCount. Then with that, you can use the expressions Clayio.LeaderboardScore and Clayio.LeaderboardName passing loopindex as the parameter, so: Clayio.LeaderboardScore(loopindex)

Hope that makes sense, if not, the docs on it are here

Right now it caches the list of available stats for a day which is my guess why they didn't show up. I need to find a better way to do that, but I cleared it for you (so it'll show up now)

Changed "Plays" to be "Views" to be more clear.

Thanks for all the feedback!

austin2012-07-19 10:33:36
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Thu Jul 19, 2012 10:39 am

Amazing... will instantly be used on my game for the next update ;)

Now it is time for the payment and items implementation (even with separate backend).
B
42
S
9
G
6
Posts: 437
Reputation: 5,626

Post » Thu Jul 19, 2012 1:31 pm

Wow, wow, wow!
It's a fantastic feeling to ask some question one days amd have the solution in the next - with advice or by a new feature developement!

I have several questions in PM, may be interesting for C2 users:

1. You may a Clay.io login box appears just after your game is loaded. To turn it on/off look at the Clay.io/admin/Yourgame/Settings and check/uncheck "Always show clay.io login box on load when a player isn't logged in".

2) I did a mistake, and recorded about 6000 score submits in several seconds from C2 preview. Now there is a new "Clear Scores" link in the Clay.io/Mygame/Leaderboard screen, so this kind of bug may be solved...:)

@austin - I think the data is not removed from the statistic graph's tables.

3) Now this is clear in Clay.io/MyGame/stats that the first stat type "Views" is how many times a game was loaded in a browser. And the "Plays" is how many times a user played a game.
The first one is auto incremented, once your game is loaded (with Clay.io plugin)
And we have an Action for the Plays: "Log Play" in C2 plugin.

4. We now have an Action to get the Leaderboard date in the background, and show it for our gamers in the game's design.
Do not panic, if you can not find Fetch Leaderboard Object action, it will appear if you try to add it in a For Loop! :)

(You will need to download the new Clay.io plugin!)
B
19
S
5
G
4
Posts: 109
Reputation: 4,195

Post » Thu Jul 19, 2012 1:43 pm

If you reset again it should clear the stats as well now

The fetch leaderboard action shouldn't be in the for loop (and should show up without it being in one). Here's what my setup looked like (obviously just for testing purposes, what this spits out isn't pretty at all):

austin2012-07-19 13:44:25
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Thu Jul 19, 2012 3:35 pm

@austin You are right! I will test and write only after that in the future. But I can not wait for my worktime to end and test the new Leaderboard function! :)

I noticed, that my test with custom stat appeared in the statistic, what is great! I wonder if there is some delay (approx. 4-6 hours) between the custom stat is sent/recorded and it is displayed in the dropdown in Clay.io's stat.

Unfortunately I did a mistake here again, so I have now "Level0" in the dropdown. If I ask about how to remove a custome metric, you may make a delete metics link... but it's not a high priority thing.

It makes an another (long term) question: if somebody accidentally clicks to "Clear Scores" for a Leaderboard or for example "Delete Metrics" in this last case, it may be very big loss especially.

My favourite solution for this is the MailChimp's one:
- click to the delete button
- you get a popup what tells, that you will delete "XY" and it can not be undone
- you need to type in "DELETE" in a text input and click on to "OK, I understood, and want it!"

It used to save my live... :)
B
19
S
5
G
4
Posts: 109
Reputation: 4,195

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests