Posting Decimal Score To Corona Cloud Returns Integer

So I’ve managed to successfully get the Corona Cloud set up.  Logged In and posted a score to a leaderboard no problems so far.

Leaderboard is set up for reverse sort as it will be time based.  Lower time is better.

So for example if i send the score of 795 it posts ok and I can see it in the Corona Cloud Leaderboard via my PC.

However if I then post a score of 794.9, it will show as 794 on the Corona Cloud leaderboard.

Happens with all decimal values.  They show as integers.

Obviously this is not good for time based games as you can imagine.

Using debug mode I can see that the Post Parameters are sending it correctly as 794.9.

However on the Post Request Corona Cloud Leaderboard details it is being returned as 794, which is the same value as on the Cloud. 

So I’m pretty sure it’s a cloud server issue and not an issue with corona-cloud-core.lua.

Really need this resolved.  Thanks

I would suggest filing a bug report/feature request on it.  In the mean time if you’re showing your own leaderboards and not using our UI, multiple the score by 10 when you save it and divide by 10 when you go to display it.

Thanks Rob,  I would use your UI, but coronaCloud and gameNetwork are not placing nice with each other at all.  There are loads of issues running both, so just doing some backend work until it’s all fixed. 

Sure I can do what you suggest by doing x10, /10, though it does still need fixed, as anyone using the gameNetwork UI will not be able to do that.  I also want to use the gameNetwork.

How do you suggest I make a bug report when I have secret keys,login details etc, prior to accessing the cloud?

Here is what I got from the coronaCloud debug using 791.9 on a reverse sort leaderboard  I have changed auth_token and user_id to all x’s:

Corona Cloud:

Corona Cloud: – POST Call —
Corona Cloud: Post URL: https://api.coronalabs.com
Corona Cloud: Post Path: leaderboards/514e4378b63354704200009b/scores.json
Corona Cloud: Post Parameters: auth_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&value=791.9
Corona Cloud: ----------------
Corona Cloud:
Post Request: https://api.coronalabs.com/leaderboards/514e4378b63354704200009b/scores.json
Corona Cloud: Leaderboard Details: {"_id":“514e517db633543b86000080”,"created_at
":“2013-03-24T01:06:05+00:00”,“leaderboard_id”:“514e4378b63354704200009b”,“profi
le_photo_url”:null,“updated_at”:“2013-03-24T01:06:05+00:00”,“user_id”:“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,“username”:“IcySpark”,“value”:791}

Hi Icy Spark,

I have noted your request for the decimal point for scores, I’ll follow up with the dev team and update you ASAP.

Thanks

-Mohamed

That’s great mohamed thanks.  3 decimal places is ideal for racing games eg 21.342 seconds.  Plus it fits with the internal timers of corona.

Hi Icy Spark,

I wanted to let you know that we’ve just push new code on Corona Cloud that adds the ability to allow you to add up to 3 decimal points to a score as you requested. 

Thanks

-Mohamed

Thank you, thank you.

Fantastic Mohamed.  Now I can get on with coding my game.  Thrilled to bits!!!

It would be great if you could choose the type of data to be displayed on the leaderboards like on Game Center, where you can display hours:min:sec … etc 

If I understood your request correctly (please correct me if I am wrong), technically there is nothing stoping you from displaying the scores in any way you want.

At its core, what Corona Cloud is providing when it comes to leaderboards, is a place for you to store/retrieve scores, manage logic and behavior.

So after you pull the scores, you are free to show it in any way you want.

-Mohamed

I am still building the leaderboards and achievements inside Corona Cloud, so maybe I’ve missed something that I would discover.

As far as I know, and I advice I’m still learning the service  :wink: , what you say would be possible if I manage the interface to show the leaderboards by myself, that’s it ‘the manual way’, but I would like to take advantage of the Corona Cloud Dashboard and use it to manage my users, display the leaderboards, etc. So I guess my options where to show integers and control the way they were displayed: from hight to low or reversed.

When I create leaderboards in Game Center I have more options regarding the way the data is displayed, and that is what I was referring to.

Again sorry my ignorance or if I have missed something.

Cheers.

I would suggest filing a bug report/feature request on it.  In the mean time if you’re showing your own leaderboards and not using our UI, multiple the score by 10 when you save it and divide by 10 when you go to display it.

Thanks Rob,  I would use your UI, but coronaCloud and gameNetwork are not placing nice with each other at all.  There are loads of issues running both, so just doing some backend work until it’s all fixed. 

Sure I can do what you suggest by doing x10, /10, though it does still need fixed, as anyone using the gameNetwork UI will not be able to do that.  I also want to use the gameNetwork.

How do you suggest I make a bug report when I have secret keys,login details etc, prior to accessing the cloud?

Here is what I got from the coronaCloud debug using 791.9 on a reverse sort leaderboard  I have changed auth_token and user_id to all x’s:

Corona Cloud:

Corona Cloud: – POST Call —
Corona Cloud: Post URL: https://api.coronalabs.com
Corona Cloud: Post Path: leaderboards/514e4378b63354704200009b/scores.json
Corona Cloud: Post Parameters: auth_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&value=791.9
Corona Cloud: ----------------
Corona Cloud:
Post Request: https://api.coronalabs.com/leaderboards/514e4378b63354704200009b/scores.json
Corona Cloud: Leaderboard Details: {"_id":“514e517db633543b86000080”,"created_at
":“2013-03-24T01:06:05+00:00”,“leaderboard_id”:“514e4378b63354704200009b”,“profi
le_photo_url”:null,“updated_at”:“2013-03-24T01:06:05+00:00”,“user_id”:“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,“username”:“IcySpark”,“value”:791}

Hi Icy Spark,

I have noted your request for the decimal point for scores, I’ll follow up with the dev team and update you ASAP.

Thanks

-Mohamed

That’s great mohamed thanks.  3 decimal places is ideal for racing games eg 21.342 seconds.  Plus it fits with the internal timers of corona.

Hi Icy Spark,

I wanted to let you know that we’ve just push new code on Corona Cloud that adds the ability to allow you to add up to 3 decimal points to a score as you requested. 

Thanks

-Mohamed

Thank you, thank you.

Fantastic Mohamed.  Now I can get on with coding my game.  Thrilled to bits!!!

It would be great if you could choose the type of data to be displayed on the leaderboards like on Game Center, where you can display hours:min:sec … etc 

If I understood your request correctly (please correct me if I am wrong), technically there is nothing stoping you from displaying the scores in any way you want.

At its core, what Corona Cloud is providing when it comes to leaderboards, is a place for you to store/retrieve scores, manage logic and behavior.

So after you pull the scores, you are free to show it in any way you want.

-Mohamed

I am still building the leaderboards and achievements inside Corona Cloud, so maybe I’ve missed something that I would discover.

As far as I know, and I advice I’m still learning the service  :wink: , what you say would be possible if I manage the interface to show the leaderboards by myself, that’s it ‘the manual way’, but I would like to take advantage of the Corona Cloud Dashboard and use it to manage my users, display the leaderboards, etc. So I guess my options where to show integers and control the way they were displayed: from hight to low or reversed.

When I create leaderboards in Game Center I have more options regarding the way the data is displayed, and that is what I was referring to.

Again sorry my ignorance or if I have missed something.

Cheers.