[PLUGIN] Clay.io (leaderboards & achievements)

Post your completed addons to share with the community

Post » Sat May 04, 2013 4:04 pm

@austin: Previously, I have been using an older version of the plugin for the game. Yesterday, I upgraded to the latest one and the game takes really long to display the content. What happened? Any change log?

Usually, it takes 3 seconds to load the game, now, it takes more than 10 seconds or more to display the splash screen, which does not have any Clay.io event.

I found Clay.io is the problem because I have removed the plugin, and the game loads fast as usual.

On the computer, I can load the game like usual. The log-in window appears right away. But on the phone, it usually takes 10 seconds longer to load all the elements of the log-in box. This does not happen before, with the older plugin. I'm using the same wi-fi network, so the network is not the problem.

In addition, I notice the log-in box on the PC version is different than the one on the phone. I have updated all the Clay.io js files to the latest one.

Any suggestions?

B
12
S
4
G
1
Posts: 104
Reputation: 1,512

Post » Tue May 07, 2013 3:47 am

@tipztv are you still having that issue? Nothing was changed that would have caused that, but I'm starting to do a changelog in the plugin from now on.

Also made a change that should hide the social login options from WP8, but don't have a means to test it, so can you let me know if that hides them for you?austin2013-05-07 03:50:40
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Tue May 07, 2013 4:21 am

@austin: I'm still having the problem. Is the game supposed to load all the plug-ins before it displays the content? When I run the performance analysis in Visual Studio, the game actually starts under 1 second (0.77 second), but it takes 5 ~ 10 seconds to display the splash screen.

I unchecked the social options in the Clay.io settings page so those buttons are gone now. The Create Clay.io account link is still there though, which does nothing when clicked.

What about the log-in box problem? The mobile version is different from the pc version? I see three tabs on the pc version, but the old box still appears on mobile.
B
12
S
4
G
1
Posts: 104
Reputation: 1,512

Post » Tue May 07, 2013 7:26 am

After updating to the latest version of C2, I am getting this error:

Javascript error!
TypeError: Clay.Player is undefined
http://localhost:50000/Clay_plugin.js, line 1156 (col undefined)

I re downloaded the plugin just in case, but the error remains. :(
B
8
Posts: 12
Reputation: 1,308

Post » Tue May 07, 2013 7:54 am

@tipztv I may not have included the most recent clay.js and api.css in the plugin folder. Updated it, maybe that will solve things? Which splash screen are you talking about? Unless it's the custom loader I put in, Clay.io shouldn't affect the loading of the game itself.

@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)
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

Post » Tue May 07, 2013 8:36 am

@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.
B
12
S
4
G
1
Posts: 104
Reputation: 1,512

Post » Tue May 07, 2013 8:51 am

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.
B
12
S
4
G
1
Posts: 104
Reputation: 1,512

Post » Tue May 07, 2013 3:50 pm

[QUOTE=austin]@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)[/QUOTE]

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
B
8
Posts: 12
Reputation: 1,308

Post » Wed May 08, 2013 4:22 pm

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??
B
10
S
2
Posts: 27
Reputation: 1,231

Post » Thu May 09, 2013 2:49 am

@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
B
24
S
8
G
4
Posts: 208
Reputation: 6,152

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: kmsravindra and 4 guests