Forum rules - please read before posting.

AC with cloud save (cloudonce) integration?


First of all: a big thank you to Chris Burton (if he happens to read this)!

Adventure Creator is by far the best Unity asset I've seen/bought so far, and it is the single most important piece of software in an ambitious adventure game project that I'm working on.

I've been wanting to post this question for a while, and have wondered why no-one seems to have asked for it yet. I couldnt find any AC discussion about the potential benefits of integrating AC save games with cloud storages - at least for the major mobile platforms. With those I mean primarily Google Play, Appstore and Amazon.

For me at least it would be a very valuable feature, even if it supported just one save game slot (for more simple sync/conflict resolution).

I've looked for potential Unity assets for handling save games and other data in cloud services, and there are several options, but they come in big, complex packages which are more or less platform specific and save game handling is not too well document. There is one exception, a relatively new asset I found just today: CloudOnce.!/content/35621

It has praising (though few) reviews and seems to have a great and simple UI with examples, like AC:

The best part is it supports all 3 of the mentioned mobile platforms, no need to do platform specific customizations, except turn on save game support!

In theory it seems to support saving at least custom int and strings variables, not sure about binary data. My question is: does AC store savegame data as strings and where should I hook into to override the save games to use cloud data when available?

Apparently cloudonce could be used for saving other data to cloud as well, and it seems very well documented.


  • Would be nice to make the save data store follow a provider based code approach so that users could make their own provider for different save solutions.  I have duplicated the Load and Save functions of SaveSystem to use my own pre-existing data storage.  It works, but will require extra diligence when upgrading AC.
  • Thanks for the kind words, @ilmari, and welcome to the forum.

    Save handling is performed in SaveSystem.cs and Serializer.cs.  Broadly: Serializer does the file handling and serialisation, while SaveSystem processes the data.

    I would recommend searching both scripts for any mention of the UNITY_WEBPLAYER preprocessor, since AC will save to the PlayerPrefs in this case - rather than a separate save file.  Your own code could be inserted at these points to save/load from your own location.

    AC can either save to Binary or XML, but which one is chosen automatically based on your platform - see SaveSystem's GetSaveMethod function.

    The next version of AC will include a script reference, which I'm hoping will make such insertions much easier for developers.

    I'd be all for @Zyxil's suggestion of having a way to allow for custom save locations / methods without the need to make changes, but in truth I'm not sure of the best way to provide this.  I'd be open to suggestions on this.
  • edited August 2015
    Coding practice around provider based (and other "plugin type") constructs all have tradeoffs.  Thinking about it further, one of the benefits of AC is the simplicity of the scripting.  Using advanced OO functionality like Interfaces or goofy inheritance schemes will make it harder for the majority of Unity users to use.

    What might be nice is a code review to make the SaveSystem class more modular (from a function standpoint, not OO weirdness).  Separating the serialization steps from the data handling steps would go a long way in this regard.  I created my own functions that are copies of LoadSaveGame() and SaveSaveGame() because of the serialization code in them.

    What I have is working, so I'm not requesting this.  Food for thought...  ;o)

    Oh, I noticed that I've jumped on the boards without thanking you, Chris.  AC is an excellent asset and I'm happy to learn and use it.
  • Thank you, you're welcome.  Updating might be a bit difficult if you need to transfer custom functions between scripts, but in general scripting should be a fair bit easier going forward - v1.47 will include a script reference for all public variables and functions.
Sign In or Register to comment.

Howdy, Stranger!

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

Welcome to the official forum for Adventure Creator.