Leaderboard



  • Does anybody know how to set up a leaderboard?



  • @Hakan It's not easy.

    EDIT: thought the question was about an online leaderboard...

    I'd use PHP for receiving scores, but it'd be hard to stop people from uploading fake scores by modifying the HTTP request. Also, you would need some way to store the highscores and sort them to return to the user.

    A database queryable with SQL would work for this, you could query the database through PHP to insert a score in the leaderboard and count the user's position, and through that get the data of users around that score. You could also easily query for the top scores.

    With a bit of work it could probably be done. I might have a quick look at it tomorrow.



  • @Jack8680 thanks for the reply.it is still not clear for me.I cant also decide what kind of scoring I shall add into cargo rush game.I tried coins but it didnt look fine.before I saw a famous game that has 500 points each level and goes down 1 points every second may be I can do something like this.I will be happy if you can explain in detail may be with screenshots of behaviors.


  • Admin

    Are you looking for an offline leaderboard or an online one?



  • @Hamed offline sounds easier so thats ok.



  • Oh, I misunderstood what you wanted, I thought you wanted an online leaderboard. An offline one would be easier. So your just looking for a list of your previous scores to display in order? Or just a highscore?



  • Sorry about confusion..I didnt know that offline means only list of previous scores.I think what I want is an online leaderboard.I want people to compare their highscores with others.like game centre.


  • Admin

    In that case you would need to create some sort of webserver with software to store the scores, then use the http requests behaviours to connect to your server and retrieve that data (and send the new scores).

    The setting up the server part is the tricky part. I believe Hamed wants to do a tutorial on using the HTTP requests. Not sure what topic he was going to cover, but a high score list may be a good idea. But this is still a little ways off as he's trying to knock out a few things first.



  • @Murtaza Is Game Center supported by hyperPad?


  • Admin

    @Deeeds said in Leaderboard:

    @Murtaza Is Game Center supported by hyperPad?

    No. It was something we wanted to add early on. But even Apple barely supports it now. It's this weird state of just existing.

    I see 2 things happening with Gamecenter. Apple dropping it, or doing a big update to the whole concept and how it works. They started "updating" it by removing the app, and making it only apis for developers to use. But I still don't trust it to be there in the near future.



  • @Murtaza I agree with some of what you're saying with regards the social platform "efforts" of Game Center, that stuff was a bad joke. Like Apple Radio is to Apple Music, it was a hodgepodge of ideas in its first incantations. Trying to be all things to all people and never succeeding at being anything other than a nonsensical contrivance in an era when social networking had already been solved.

    However, the parts of Game Center that will probably last forever, and very logical uses of iCloud, are leaderboards, achievements and game sync. This is the part they should have focused on from the beginning, but got carried away with the idea of being a social network, as well. Which was silly.

    I'm asking about Game Center here, precisely because of the OP's title, Leaderboards.

    Game Center's ability to easily add leaderboards, achievements and game sync are all valuable facilities that will probably see Game Center go on forever, and Apple probably forever regret this horrible name and the former attempt at being a social network for games.

    In the cold hard light of 2017 we can see that there was only ever going to be one social network winner, but back when they were planning Game Center there was more perceived chance of fragmentation. It looked, for a while, like social networks might form around interests and activities. Your Hub is a similar "bet", to some extent.

    It's all about Facebook/Instagram now. Nothing else matters, unfortunately.

    However, high scores tables, achievements and game sync all require a database online, for which Game Center's iCloud usage is still the best option on iOS, and probably always will be. Replays and Game Streaming... probably Twitch and Youtube will battle this out, unless Apple figures out how to make an incredibly compelling option.

    // Side note, just about every iOS device of the last 2 years has more than enough horsepower to play almost any game AND record itself. Apple's screen video recording is a little lossy, but it's INCREDIBLY efficient, and perfect for streaming.

    @Hamed it's the polling and performance monitoring that running the screen recorder does that gives cocos2D the space it needs to perform consistently, and "buries" the bug at the core of cocos2D.

    Where the leaderboards will become increasingly useful is iMessage micro/mini advertising games.

    And this is where the potentially low profile/size of cocos2D/hyperPad games (without all those ad things you bundle in) can be a boon to that industry.

    And it's also iMessage games where you can target your original assumed audiences. That's where they all are, that's how they're all communicating when not using Facebook/Instagram.

    Micro-apps/games have become a phenomenon within WeChat in China, which Apple is aping (very closely) with iMessage. Every year imessage looks more and more like WeChat.

    There's a massive industry being built around games and interactive ad experiences for WeChat integration, and Apple has provided the same degree of access for native games in iMessage, and given iMessage its own store. Which means iMessage games and apps are native, and Apple users have a much higher expectation of app experience within iMessage than HTML game players in WeChat.

    Your little "engine that could" is perfectly suited to be tweaked for targeting this market because it's performant and light.

    What matters in Game Center (sync, achievements and leaderboards) is one of those tweaks. The other is iMessage App/Game integration, and the extensions facility.