Online Leaderboard questions

Get help using Construct 2

Post » Wed Sep 11, 2013 2:47 am

Hi,

    I'm making a game that I plan on releasing for Android, Windows Phone, iOS (iPad and iPhone), and Windows 8. Id love to have a leader board that includes all of the scores from all operation systems and devices. Can Clay.io do this? And is it the right chose for mobile leaderboards? I've been messing around with it and want to have a decent idea before committing to implementing it into my game. Any help would be greatly appreciated. Id love to hear your experiences with Clay.io, or other methods as well.

Thanks,
Adam
B
36
S
5
Posts: 156
Reputation: 3,310

Post » Wed Sep 11, 2013 7:42 pm

Anyone have any experience using clay.io with windows phone?
B
36
S
5
Posts: 156
Reputation: 3,310

Post » Thu Oct 02, 2014 6:10 am

I have been trying lately with Clay.io myself (for Android only), and it doesn't look very promising. I fear I have to drop the leaderboard all together. Not very impressive that something so basic and also something that really could make or break a game is still lacking.
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Thu Oct 02, 2014 5:05 pm

I'm now attempting to set up a database following this tutorial:
https://www.scirra.com/tutorials/346/on ... -php-mysql

It seems to be a pretty good alternative, and I have almost everything set up by now. However, I was wondering if anyone knew a way of getting a rank back as well (position in the list)? Say, in one layout I want to display a list showing the 10 best scores, but in another layout I want to display to the user what position in the list they are at.

The table I'm testing with now was created like this:

CREATE TABLE `scores` (
`id` INT NOT NULL AUTO_INCREMENT ,
`name` VARCHAR( 20 ) NOT NULL ,
`score` INT NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = InnoDB;

To retrieve the data I do this (lower is better in my game):

$sql="SELECT * FROM scores ORDER BY score ASC LIMIT 10";
$result=mysql_query($sql);

But how can I get and display the position in the list? I'm thinking I would need to have another column in the table, but that's as far as I've come by now.
B
14
S
3
Posts: 123
Reputation: 1,571


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests