Is saving the game better now?

0 favourites
  • 6 posts
From the Asset Store
Match the similar cards with each other and free all animals!
  • I'm pretty happy with the latest Beta updates, particularly the attention to Steam and Archives.

    I have been using LocalStorage and NWJS to save and load my game on Steam, but I have some problems saving in the Cloud because I need to point to a path and the IndexDB folder in AppData, sometimes it works and sometimes it doesn't, it's a bit confusing.

    I believe a guaranteed way would be to create a Save folder in the local files or somewhere else, and store the LocalStorage Json file inside it, making it easy to locate. I've already tried to do this using FileStorage but without success.

    Anyone who has already tested the improvements in the Beta version, do you know if it is now possible to do this?

    In my mind it would work like this:

    Start Layout-> Check if Save.JSON exists in the Save folder

    If not, it creates the folder and loads an "empty" array of Save.

    If it exists, it loads Save.json into the Array

    After the player saves the game, it saves the Array as Json "replacing" the previous one.

    My game basically works like this, the difference is that when LocalStorage saves the Array as Json, it is not in an accessible location, and apparently it is in a strange format of several files there in Appdata.. If you could save it as a normal, accessible .json file, it would be a huge Game Changer.

    Thanks!

    Tagged:

  • You should be able to use File System to write files to a folder that Steam Auto-Cloud will sync for you. There's some information on this here.

  • You should be able to use File System to write files to a folder that Steam Auto-Cloud will sync for you. There's some information on this here.

    In this case, my game starts by pulling an ArrayJson with Ajax to the Array that I will use, and when saving, LocalStorage saves this Array as a Json.

    If LocalStorage already exists, it places the Save from LocalStorage in this Array

    In this example, I have a JsonArray of Save in my game folder, but it is only read by Ajax and used if it is the player's first time, but the part of actually saving the game is using LocalStorage, and the json of this LocalStorage is a mystery, I use the files that are in AppData to be able to save in the Cloud

    In my situation, how could I use the FileSystem? Is it possible for me to save and edit the original Json in the folder? Or create a Json in another location and every time my game saves it goes there and edits it? If it is possible then I just need to give the location of this Json to Steam, but from what I have researched and tried it is not possible to use the FileSystem to edit a json file with what is in the Array.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You shouldn't use Local Storage with Steam Cloud. Use File System writing to a dedicated folder.

    If your game already uses Local Storage, you probably want to set up something like the following for backwards compatibility: use File System to write to a dedicated folder for Steam Cloud, but also check Local Storage for any older saves made that way, but don't save any new data to Local Storage.

  • You shouldn't use Local Storage with Steam Cloud. Use File System writing to a dedicated folder.

    If your game already uses Local Storage, you probably want to set up something like the following for backwards compatibility: use File System to write to a dedicated folder for Steam Cloud, but also check Local Storage for any older saves made that way, but don't save any new data to Local Storage.

    Sure, I created this example to test the use of FileSystem, but it didn't work, am I missing something?

    I created a Json file (VisualArray) where the values ​​will be stored, then using Ajax I load this Json (VisualArray) into my Real Array, when saving the game, I save the Array in Json format in the original Json file.

  • You shouldn't use Local Storage with Steam Cloud. Use File System writing to a dedicated folder.

    If your game already uses Local Storage, you probably want to set up something like the following for backwards compatibility: use File System to write to a dedicated folder for Steam Cloud, but also check Local Storage for any older saves made that way, but don't save any new data to Local Storage.

    I managed to save a json in the documents folder and then load it if it exists. I'm very happy, and more ambitious now..

    It is now possible to export using WebView2 for Linux with Steamworks, in my case I use the tag for documents, in a Linux situation can I use the same tag or should I save the json in another specific Linux location?

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