Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a global high score for my android app?

Tags:

android

I have finished and released my game and it contains a local highscore list for each phone. I would like to make it so that the scores are global..ie. send score to a server and server sends the highest scores to all the phones when they connect

Unfortunately I have no idea where to begin. So if somebody could point out a link or give me an explanation on how to proceed I'd be very appreciative, thanks!

like image 936
Joey John John Avatar asked Nov 21 '11 19:11

Joey John John


1 Answers

You have the general idea. You have to:

  • Send the score to a server
  • Retrieve the high score table from the server

This means that you probably want to have some sort of web-based API for these two. The easiest way is to simply let someone else do it. There are free services out there that already provide global high scores. There are probably more, but for Android, OpenFeint and ScoreLoop are two big ones that I know of. You can look through their docs and see if you want to use them.

Alternatively, you can roll your own. This is a bit more work (though honestly not all that hard). If you go this route I'd recommend you build a web service that you can post scores to. The web service would save the score to a database and then when the client calls the web service to retrieve scores, the web service queries the score database and returns them.

That's a general outline, because frankly how to build that web service is a whole other question, and you'd have to decide on a language/platform etc. for that too.

like image 104
kabuko Avatar answered Oct 13 '22 07:10

kabuko