Saving in Games

This forum is currently in read-only mode.
From the Asset Store
Match the similar cards with each other and free all animals!
  • I searched through the wiki and through tutorials, nothing found.

    I know I can make this with the INI Object. But I don't like it, that it saves at the Windows Folder and also, it's not encrypted. That means, those people that find out, could easily just cheat the game. Also, I didn't found out how to work with the Array Object.

    Any suggestions, pwease? :3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The system object has a couple of save actions built in: "Quicksave/quickload" and "Save/load to disk". These basically save a perfect state of the game, and they're not just plain text so cheating isn't as easy.

    I will mention, however, that some plugins(mostly third-party plugins) don't work properly with these actions.

  • Hmm, this wouldn't really work with saving settings, like language setting, full screen/windowed, etc.. If there are no other possible ways, is there any way to save the ini to a different place instead of .../Windows? And maybe some other plugin that encrypts this file (Like Blowfish).

  • The INI object isn't made so much for making INI files as it is for reading them.

    If you're just looking to save things like configurations, you could use the HashTable for that, which allows you to assign values to 'keys' and then access the values through these 'keys'. The files it saves are also not plain text, making it harder to crack.

    One thing I'll point out, in case you don't know this yet, is that if you want to save your file to the same path as your game, you can use the apppath expression. For example, to save your file "blah.yes" to the same folder as your game, you would put:

    apppath & "blah.yes"[/code:31ngp681]
  • That means, those people that find out, could easily just cheat the game.

    Hmm, this wouldn't really work with saving settings, like language setting, full screen/windowed, etc..

    So you're afraid people will cheat your game using language and screen settings?

    Anyway.. you use both then don't you, like other games. One method for saving the game. One (the ini) for saving your game settings. That way you get the best of both worlds.

    Also along with Linkman's third party plugin warning. You also need to ensure things have loaded back in correctly. Some stuff set at start of layout, doesn't save and needs to be done on load. Also you can limit what is and isn't saved on a per object basis.

    The quicksave/load is just into memory btw (handy for temp level progress perhaps, or for time traveling items). The Save/Load one is for saving the actual files, which you can name whatever you like, including extension, and they'll still work.

    And it saves the ini wherever you want it to. Don't know of any game saving it in the windows directory, but if you wanted to you could. Though remember the whole security thing. Generally makes more sense to save it there in the Apppath along with the rest of the game.

    Edit: Curses Linkman for posting just before me!

  • So you're afraid people will cheat your game using language and screen settings?

    Nah, I wanted to save the level progress too. But now after reading your text, I got an idea.

    I use Save Game for levels and use ini for settings. I'm such a Genious!

    But for some reason, after it loads the file, ZOMG, the enemy disappears into nothingness. Is this because of "For Each [Sprite]"?

    CAP File with the problem

    Put this in a folder, then go to Arcade. Then press 1 to save a file (should come level.sav). Then close the app, open it again, go to settings and then press exit. It will load the file and the enemy is gone.

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