Facebook Instant Games - Leaderboard vs Connected Players

0 favourites
  • 7 posts
From the Asset Store
A small template showing how to build a firebase ranking
  • I am developing my Facebook Instant game for the last months and I got extremely confused with some aspects regarding Instant game plugin and terminology.

    My game will consist of short matches, where each match is 3 rounds. I have already created a backend to store additional data regarding matches that will occur on the game.

    On my game I want to have a leader board, displaying: player photo, player name, player score.

    Now my issue:

    One important information for my backend (to keep match results, rounds etc) is Facebook id. I know i can get this unique value from "Connected players" but why is this not available on leader board?

    1) Do I have to load both "leader board" and "connected players" to have both data?

    2) What is the exact difference between players listed on "leader board" and "connected players"?

    It is already extremely difficult to proceed with the development as I have to test almost every aspect of the main menu (leader board generation, GUI stuff, buttons, scores, matches, communication with backed) but uploading every time to Facebook to do a real test.

    3) As I can tell, current Facebook Instant Games plugin implements 6.3. From version 6.2 there is an option to fetch score data for connected players. Where is that on Construct's plugin?

    "(New) Connected Player Score Entries Introduces the new Leaderboard.getConnectedPlayerEntriesAsync() API, which fetches the score entries of the current player's connected players from the leaderboard."

  • That functionality exist in Load Leaderboard data, just change Results into Connected players.

  • That functionality exist in Load Leader board data, just change Results into Connected players.

    No, this i snot the problem. The problem relies on Facebook plugin implementation, although it is supposed to use SDK version that includes those features.

    What i need is having:

    Player name

    Player Score

    Player Photo

    Player ID

    The whole issue is that there is data for Player name, Player Score, Player Photo on "leader board" and there is Player name, Player Photo, Player ID on "connected players".

    How can we fetch all data? Or how is it even possible to correlate both of them?

  • I was replying to your question "From version 6.2 there is an option to fetch score data for connected players. Where is that on Construct's plugin?"

    And I told you where it is.

    But you cannot get the player ID from that function, because it is not part of it.

    So you have to ask your question to Facebook, not to scirra.

    (the answer will be that you need your own backend though... )

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I have already a backend storing other information for each player. To use backend to have IDs of the players to connect with FB ID's is the worst thing you could do. The simplest thing would be to have data from connected players that include ID, name, photo etc.. The only thing missing is "scores" that is implemented from facebook SDK v6.2

    API Reference v6.2 Changelog

    Connected Player Score Entries Introduces the new Leaderboard.getConnectedPlayerEntriesAsync() API, which fetches the score entries of the current player's connected players from the leaderboard.

    I am still wondering why Scirra has not given any answers regarding Facebook Instant Games plugin, which is supposed to cover this function since it implements version 6.2 of SDK.

  • you will never get scores from requesting info of the connected players (getConnectedPlayersAsync). Since there can be several leaderboards, so it is impossible to know which score to fetch. So no info of any score is part of this request.

    you can though get scores from connected players using the leaderboard function (Leaderboard.getConnectedPlayerEntriesAsync) as you say. Which is the update in v6.2 and it is already implemented which I described, so yes, it is covered! But from this function you will not get the IDs.

    Scirra do not decide this, this is how the IG functions work. You will need to adress this to Facebook, not to scirra.

  • So how other developers implement this? It is supposed to be a very simple concept. To have a leader board with just basic player details (name, photo, score) and it it in order to identify the player (if you can play with him etc..) Even if you use your own backend, it is near impossible to match leaderboard players with your database...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)