Search Unity

GameFoundation Init Save / Load / Merge / Conflict with remote data

Discussion in 'Game Foundation' started by VektaCo, Feb 9, 2021.

  1. VektaCo

    VektaCo

    Joined:
    Sep 30, 2019
    Posts:
    31
    I want to setup GameFoundation Save / Load / Merge / Conflict with remote data
    Is this something that might be available in a future version, for use with iCloud saves, etc.

    Otherwise I would end up rolling out my own version.
     
  2. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @VektaCo ,

    Providing a connection to a backend server is definitely a use case we intent to support in the future, but its still in its early planning stages, so unfortunately I can't say at this point what shape it will take, specific features it might have or what the timeline for it may be. We would love to hear more about your intended use case, or any particularly unique needs you might have for it, to help inform our implementation though.
     
  3. VektaCo

    VektaCo

    Joined:
    Sep 30, 2019
    Posts:
    31
    I wouldn't need any connection to the server. I would just like to be able to compare the data and merge the better of the two save files.

    Currently it seems you can only initialise the whole system using the LocalPersistence file, so all i can do is overwrite the file.
    Without rolling out my own parser, there is no way to quickly compare values.

    e.g iCloud Savegame workflow.
    Easy example is a Wallet. If my local and server save get out of sync, I would always want to merge in the bigger Currency value.

    My best case would be to be able to easily merge Saves using some user defined ruleset / and have more control on what objects save etc.

    My main use case for GameFoundation is a Shop with both Virtual and Real (IAP) Transactions.
    Purchased Items are stored in the users inventory.
    I backup this data to the cloud by adding the LocalPersistance (JSON) to my save file.

    *this also might be overkill and I should just manually track the wallet values
     
    Last edited: Feb 11, 2021
  4. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @mk0a1a and @VektaCo

    Thanks for those two use cases, I will pass them up to our product folks working on the roadmap.

    @mkoa1a Yes, the ChilliConnect sample should be able to serve as an example for how to roll your own adapter for cloud sdks that are unsupported!

    @VektaCo That ChilliConnect sample may help you as well, you could potentially create your own adapter to connect with an iCloud savegame file, and do some merging within that. However your use case of wanting to be able to merge two versions of a database makes sense, and I didn't realize that was what you were going for, so thanks for the clarification!
     
    saskenergy likes this.