[PLUGIN] Clay.io (leaderboards & achievements)

Post your completed addons to share with the community

Post » Tue Oct 09, 2012 12:33 am

Can you send me an email to austin |at| clay.io?austin2012-10-09 00:33:51
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Tue Oct 09, 2012 1:31 am

With what? I will tomorrow in the offices.
B
17
S
4
G
4
Posts: 104
Reputation: 3,950

Post » Tue Oct 09, 2012 2:22 am

Anything, just so I have an email to reply to :) It's a bit easier for me to communicate that way than through PMs here
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Tue Oct 09, 2012 2:57 am

[QUOTE=austin] Another update: CocoonJS is still in the works -- I spent the last few days implementing a "Push to Windows 8 App Store" feature (and some pushing to other app stores as well), though that probably isn't very important to the folks here since C2 already has a nice exporter for that.

What is relevant here is I've updated the plugin to work with Windows 8. Windows 8 has some restrictions where you're not allowed to call external scripts and CSS, so the API and styling for it are stored locally (this is also something necessary for CocoonJS). If you're exporting to Windows 8, change the export mode property for the Clay.io plugin to "Windows 8". It'll do the export and generate a default.html file, in that you'll have to add in:

<link href="/api.css" rel="external" />
<script type="text/javascript" src="/socket.io.js"></script>
<script type="text/javascript" src="/api.js"></script>

It isn't the prettiest solution (having to manually add that in), but it's the best I can do with the current C2.[/QUOTE]


Good news, i'm going to test them.

I have a question, do you offer ad system?
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Tue Oct 09, 2012 9:56 am

I had some problems when i'm testing CocoonJS with Clay.io inregration, it doesn't run the game.

There are pics:




Export module: CocoonJS
Debug: Enabled (Also Disabled too)
Minified: No
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Wed Oct 10, 2012 12:26 am

CocoonJS integration is still a work in progress :)

And no, no ad system yet.
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Fri Oct 12, 2012 6:02 pm

I'm trying to use the web storage and having some difficulty. Could you add some more explanation to the instructions, you say you can store arrays if you pass loopindex, but don't say how.
I thought I had something that would work, (a loop) but I can't store a simple number and read it right back.
EDIT: Ok I just found "Data Fetched" event, so I was checking before it was there. But my Array loop definately won't work with that.

Other questions, is there a trigger for when an Achievement is accepted as new, so I can play a sound as well as Clay's little popup too? And could the popup stay a second more, it's gone before the game lets the player glance up there.

Thanks for any help you can offer.

edit: I'm using Construct2 R106, and achivements, the achievement list, and player name values all work fine. Paradox2012-10-12 22:39:42
B
200
S
51
G
30
Posts: 897
Reputation: 36,496

Post » Fri Oct 12, 2012 8:20 pm

[QUOTE=austin] CocoonJS integration is still a work in progress :)

And no, no ad system yet.[/QUOTE]

Good, thanks.

I have a question, does clay.io allow us to use adsense on inside of the games?
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Sat Oct 13, 2012 11:33 am

Clay.io is not working with r106 exporting to exe :(

Anyone having the same problems?
B
17
S
4
G
4
Posts: 104
Reputation: 3,950

Post » Sun Oct 14, 2012 1:53 am

@Paradox The standard API when you're using just JavaScript to write your game accepts JavaScript objects and arrays. I was thinking that implementation would translate over to Construct 2, but it turns out the only parameters you can specify to pass to an action are strings and numbers, so you can't actually pass an array.

What you'll have to do is pass the "AsJSON" expression of the Array object to the Clay.io action. From their I think the looping will work, but it may not as the JSON could be read as a string. If that's the case I'll update the plugin to parse the JSON automatically.

There is an "Achievement Awarded" trigger.

@Joannesalfa Adsense is fine.

@devMidgard looking into it now
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests