简体   繁体   中英

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

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!

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.

看看Swarm的Leaderboard系统,它与这里提到的其他系统类似(ScoreLoop / OpenFeint),只是考虑另一种选择:)

Have a look at Scoreloop 1.0 in NDK 2.0 release for BB. https://bdsc.webapps.blackberry.com/native/beta/?CPID=TWDToolDL&Date=112311

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM