Instant Games saving progress question

0 favourites
  • 12 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • Hey guys

    Just wondering if you have any thought on how you would deal with this.

    For Facebook Instant Games, would it be better to use local storage or somehow utilise the Facebook leaderboards to store progress etc.

    Using local storage means that a player can’t keep progress between devices.

    If info could be pulled from a Facebook leaderboard, they technically could.

    Is this doable?

    Thanks for any input

  • Hey guys

    Just wondering if you have any thought on how you would deal with this.

    For Facebook Instant Games, would it be better to use local storage or somehow utilise the Facebook leaderboards to store progress etc.

    Using local storage means that a player can’t keep progress between devices.

    If info could be pulled from a Facebook leaderboard, they technically could.

    Is this doable?

    Thanks for any input

    Use 'Set player data' and 'Load player data' from the Instant Games plugin to save and load player progress. You can use JSON from dictionary object. Very easy.

  • sorry oftopic but i want ask is only in my android bug or the Instant Games plugin only work the preview with internet ,sometimes the preview not work offline if i insert this plugin in objects,the preview work offline if i delete this,and sometime not work if i insert ,can anyone have this bug in android offline?thanks and sorry oftopic

  • Hi Renfd

    Thanks for the tip, however I'm having trouble getting it to work. Any chance you could list the order of events to use ?

    Currently I'm using ...

    On start of layout -> InstantGames / load player data

    on player data loaded -> set bestScore to InstantGames.PlayerData

    to save data I'm trying ...

    InstantGames / Set player data to score

    Asfaik - there is no way of checking if player data has any value.

    Thank you in advance for any help

  • Ninjadoodle just like Renfd said, just save whatever data you need in a Dictionary and save/load the dictionary to Instant Games as JSON.

    https://www.construct.net/make-games/ma ... dictionary

  • Hi twg / Renfd

    Thank you for the tip! I'm however really struggling to understand how to use the 'dictionary' object together with 'Instant Games' and 'get player data / set player data'.

    There don't seem to be any options that allow me to link the 2 together.

    If somebody could help explain in a little better, that would be AWESOME!

    I've literally tried every possible combo I could think of.

    Thank you in advance guys

  • I'm however really struggling to understand how to use the 'dictionary' object together with 'Instant Games' and 'get player data / set player data'.

    There don't seem to be any options that allow me to link the 2 together.

    You have literally been told how to use the Dictionary object with Instant Games twice in the same thread(JSON) AND linked to the Dictionary documentation which explains the expression for saving/loading a Dictionary as JSON.

    To Save Data:

    Condition: Whatever condition you want

    Action: Instant Games>Set Player Data>Dictionary.AsJSON

    To Load Data:

    Condition: Whatever condition you want

    Instant Games>Load Player Data

    Instant Games>On Loaded Player Data>Dictionary>Load From JSON string>InstantGames.PlayerData

  • Hi twg

    While I appreciate your help, I feel a little bit of hostility coming from you reply.

    [quote:2474dok7]You have literally been told how to use the Dictionary object with Instant Games twice in the same thread(JSON) AND linked to the Dictionary documentation which explains the expression for saving/loading a Dictionary as JSON.

    I've followed the previous instructions and I can't seem to save progress even though I've tried a few different setups.

    If you feel like it's too much of a bother to help people who might be struggling with a certain feature, that I would suggest leaving it up to someone else to provide help, instead of making the person asking, feel like a hindrance.

    There is no manual entry on how to use the instant games plugin and I feel like I might be missing a step somewhere, which is preventing my setup from working.

    I've asked for help politely, so it would be nice if the replies were kept the same.

    Thank you

  • Ninjadoodle no hostility is meant, I'm honestly trying to help, I'm just saying we both told you, the C3 documentation explained it, even the Instant Game plugin tells you in the Set Player Data dialog "Consider using a JSON string from the dictionary plugin" when you open it and you were still saying you don't understand how to use a Dictionary object with Instant Games.

    I just gave you the exact events you need to save/load your data to Instant Games from a dictionary, there aren't any more steps for the Instant Games plugin so I'm not sure what you are missing. All the data you have in the dictionary will be saved/loaded to Instant Games platform.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi twg

    Thank you for the reply, and thanks again for the steps you’ve listed. I really appreciate any help I get

    I must be doing something wrong as I can’t seem to make it work when testing my game on Instant Games.

    I’m going to play around with it some more to see if I’m making a mistake somewhere.

  • I know this is an old topic, but... thanks twg for the how to. super easy and worked for me. I used an array for saved levels instead of dictionary, but it worked.

  • (JSON) AND linked to the Dictionary documentation which explains the expression for saving/loading a Dictionary as JSON.

    To Save Data:

    Condition: Whatever condition you want

    Action: Instant Games>Set Player Data>Dictionary.AsJSON

    To Load Data:

    Condition: Whatever condition you want

    Instant Games>Load Player Data

    Instant Games>On Loaded Player Data>Dictionary>Load From JSON string>InstantGames.PlayerData

    Hi twg and everyone else :D Old thread, but a new and related question:

    Can I substitute the data saved into a dictionary for data saved into an array, and then save that to the Instant Games network?

    Thanks,

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