Using the File System with save data

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • Hello Construct community!

    Recently I've decided to switch my game's save system from using local storage to writing save data with the file system plugin, since I'm planning to launch my game on Steam.

    Here are some questions I have about writing a file with save data:

    1. If I understand correctly, you need do something like this:

    Wherein you write a file called "Save_Data.txt" inside the app folder.

    2. What is the best folder to save the Save_Data.txt to? I've noticed there are other picker tags like "<current-app-data>", "<local-app-data>", and "<roaming-app-data>". Is there any reason to use or not to use one of these?

    3. Does the overwrite mode work the same as Python's open() overwrite mode, where It will create the file if it does not exist?

    I appreciate any thoughts or help on this!

    Tagged:

  • You could just do a quick export to try it out which should confirm that 1) and 3) are correct.

    For security reasons the system often makes application install folders read-only, e.g. inside "Program Files" on Windows is typically all read-only. So generally you should assume the "<app>" and "<web-resource>" folders are read-only. I would say the best folder to use is "<current-app-data>" which is where apps usually write user data to. You could also use "<saved-games>", but that is Windows-only, and I'm not sure what the convention is (I guess use a subfolder for your game?)

  • Try Construct 3

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

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

    Thank you for the explanation and taking the time to respond. This helps a lot!

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