GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to save progress (collected coins, gems, etc.) and be able to transfer it to any device?

xwrbnxxwrbnx Posts: 23Member
edited July 2015 in Working with GS (Mac)

Hi all,

I would like to know how to save the user's progress such as current amount of gold, gem, etc. and be able to keep it when the user uninstall and reinstall again, and when the user change the device?

Basically, the user can obtain gold during the game and when they purchase using IAP. They can use the gold also to buy something such as costumes, power ups, etc.
Example:
The user has 100 gold so far from the game.
Purchase 100 gold for $1.00 from IAP.
Buy the new costume for 125 gold.
Current gold balance is 75 gold.

Question #1:
How do I save this 75 gold so when the user uninstall and reinstall again (or when the change to a new device), they can get back to their last gold state?
What method can I use? I am thinking maybe game center/ platform, but it looks like it is for achievement with milestone.
Can it also be used to save the balance of gold, gem, etc? If yes, how?

Question #2:
Is my understanding correct that (example: my IAP item "100gold" is consumable item)
when the user purchase this IAP item:

  • Call behaviour IAP Buy Item,
  • Add the 100 gold to the user's gold balance,
  • Call the behaviour IAP Consume Item
    All almost at the same time (in sequence) so the user can immediately purchase again if they need to.
    Is my understanding correct?

Please advise. Any help is very much appreciated for the correct understanding.
Thank you.

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member

    You would need to use a server using the network behaviors. But you really need to understand PHP scripting to do this.

  • xwrbnxxwrbnx Posts: 23Member

    Hi Guru,

    Thanks for your reply. So it is not possible within the gamesalad. Sigh.

    How about my question #2? Is my understanding correct?

    Best regards.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member

    Yes that's what a consumable is.

  • xwrbnxxwrbnx Posts: 23Member

    Thanks Guru.

    Btw, is it generally acceptable when someone buy consumable items but when they can't retrieve it back when they reinstall the game or move to other device?

    I have another related topic if you don't mind :smile:
    If I use in game currency such as gold to purchase non consumable items like costumes, weapon, etc. and if I implement it using IAP as below:

    • Define the costume as free IAP item (price $ 0.00)
    • User click on the Costumes with a price of 100 gold.
    • We call behaviour IAP Buy Item which will unlock the costume but free, no payment at all.
    • We deduct the gold 100 from the user inventory.
      Is this the correct way to implement it?
      Will it pass the Apple policy when we publish it / any problem?
      If it is not do-able, what is the best way to implement it?

    And also when we call the behaviour IAP Buy Item for free/ $0.00 item, will it still show the purchase pop up from ios or google play?

    Thank you.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member
    edited July 2015

    I don't think it's something I'd worry about. Why would you have a free IAP?

  • dustingriffiedustingriffie Posts: 57Member

    I think instead you don't need to use IAP, just make an in-game shop, that will more than fit your needs.

  • jonmulcahyjonmulcahy Posts: 10,383Member, Sous Chef

    apple only requires non-consumable items to be able to be restored on a new device. consumable items like coins are expected to be on that device only. if the device dies or the player deletes the app, they are gone forever.

  • pHghostpHghost London, UKPosts: 2,301Member

    Unfortunately, there is no support for iCloud saves and such at the moment. There is a feature request for it, so hopefully one day...

    http://bugs.gamesalad.com/show_bug.cgi?id=962

  • xwrbnxxwrbnx Posts: 23Member
    edited July 2015

    thanks for the reply, all.

    @The_Gamesalad_Guru : It is actually not IAP. But since I don't know other method how to keep the costumes, weapon, etc forever (not gone when the user change device/ reinstall), I am thinking of using the free IAP trick.
    The summary of my plan is below:
    My game has gold system. The user can collect the gold during their play by colliding with gold actor or by killing the enemy. They can also purchase the gold via IAP.
    With the gold, they can buy various items or upgrade something. Such as costumes, weapons, ability, or maybe unlock new world. So, in user point of view, costumes, weapons, abilities are not IAP with $, but something they can buy using the game gold.
    Ideally, I want these items to be intact to my profile whenever I reinstall, or reset phone, or change to new device.

    As you mention, the gold is consumable and wont be able to retrieved to the last balance if the user reinstall, reset phone, or change to new device. Which is fine because (as @jonmulcahy mentioned) the consumable IAP should stay on old device only.

    However, since the user upgraded their costumes, weapons, abilities, it should stay with them. I don't think the user will be happy if they have to start again from the zero if they reinstall or move to new device. They already cannot restore the gold. Now they also cannot restore their costumes, weapons, abilities?

    I can only think of a trick of using free non-consumable IAP items.
    Which is programmatically:

    • When the user has enough gold (by collecting during the game or buy via IAP), they can buy or upgrade their weapon, costumes, abilities.
    • I define each costume, weapon, ability as free non consumable IAP items ($0.00)
    • When the user click the item, call the behaviour IAP Buy Item Costume1.
    • Change attribute Gold = Gold - 100
    • Change attribute Unlock Costume1 = true

    So when the user reinstall or change to new device, I will call the behaviour IAP Restore Items. By doing this, the user can get back their costumes, weapons, abilities in their new device.

    I am not sure whether this will work or allowed by Apple. So I am seeking advices / opinion here.

    I found a similar topic here:
    http://forums.gamesalad.com/discussion/86237/consumable-iaps-data-lost-if-player-uninstalls-game
    And the solution by @Armelline is what I am thinking about. But the last sentence makes me worry "Apple passed it, but I don't know if they actually noticed what we were doing or not."

    Thank you. Sorry for the long winded post, but the game plan will be messed if the weapon, costumes, abilities systems cannot work as intended and the user will not be happy too.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member

    I see you you are translating a consumable to a non consumable. I get it as those can be restored.

  • xwrbnxxwrbnx Posts: 23Member

    @The_Gamesalad_Guru : So will the method I mentioned above workable?
    Thank you.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member

    I've never done it before but code wize it should work.

  • xwrbnxxwrbnx Posts: 23Member

    Thanks for all the replies. I will try this first.

Sign In or Register to comment.