SSave
A downloadable package for Windows, macOS, Linux, and Android
Download NowName your own price
A simple save file system for GameMaker
This project is open-source and available on GitHub.
Try out my other GameMaker assets!
While save files can be basic, there are a lot of issues that come from just simply saving and loading raw data.
SSave tackles these problems whilst also having quality-of-life features that make creating save data easier and more secure.
Why use SSave?
- Comes with a built-in manager so you don't have to create a system to track everything yourself (this can be disabled if you really want to!)
- Values are typed to prevent game-breaking issues occurring from wrongly typed saved data
- You can create any number of different file types (like a settings file that is separate from your save file)
- You can create multiple versions of a save file type (a common use case for this is having multiple slots of save files)
- Old saves automatically sync with any new data you add to your project that wasn't originally in the save file.
You can be 100% sure that a value in your save file is ALWAYS there, even if removed from the file - Don't want users to tamper with your files? You can both encode or encrypt your files. This information is handled internally, so you can load a protected file without needing to do any extra work
- Buffers are a supported value type!
Updated | 22 days ago |
Status | Released |
Category | Assets |
Rating | Rated 4.0 out of 5 stars (1 total ratings) |
Author | stoozey_ |
Made with | GameMaker |
Tags | Asset Pack, encryption, GameMaker, package, save, save-file, save-system, saving, stoozey |
Links | Source code |
Download
Download NowName your own price
Click download now to get access to the following files:
ssave-1-4-0.yymps 62 kB
Development log
- V1.4.0 Released - New Demo!Aug 10, 2023
- V1.3.3 ReleasedJul 30, 2023
- V1.3.2 ReleasedJul 17, 2023
- V1.3.1 ReleasedJul 10, 2023
- V1.3.0 Released - Built-in Manager!Jul 07, 2023
- V1.2.0 Released - Buffer Support!Jan 27, 2023
- V1.1.2 ReleasedOct 22, 2022
- V1.1.1 ReleasedOct 16, 2022
Comments
Log in with itch.io to leave a comment.
Hi, please, please, please add the feature to delete the ssave files...
You should 100% make a documentation for this, I’m not really understanding how it works and it’s getting me crazy 😭. A documentation would make it so much easier
Yeah I've been planning on doing this for ages but always too busy. Sorry about that, there are some great resources on YouTube, though!!
Can you explain the decrypt process to load the data back into the game? also are you able to use ds maps or ds lists with this for saving inventory or would i have to convert them to an array first? also also the file doesn't seem to import anything I'm using gms 2.3
Hi, you don't need to do anything to decrypt the files; if it's encrypted SSave will already know--it is handled automatically (using Sphinx internally).
As of V1.4.0 you should be storing your inventory data as either a struct or an array. But, I will write down a note to add support for more data structures as it would definitely be useful.
Are you sure you're adding the files to the import list when opening the package? GameMaker doesn't select anything by default.
Thank you for explaining it, so I would just load the save file using the command and i would automatically decrypt the files and I could reassign the variable values.
When I try to import it into game maker, I don't get a secondary screen asking me what files i want to import. Just the do you want to import confirmation box. and then it just seems to load a blank project.
I have also tried downloading the Zip from github and I am unable to open the project. I get a failed to load error.
I resorted to opening the files in notepad and copying all the code into a new project and I am running into an issue. the scripts __scr_ssave_value and __scr_ssave_header are giving errors because of the lines (respectively) * return (__value ?? __defaultValue); * and *__protection = (_protection ?? __protection); * the script for __scr_ssave_manager is blank.
I also get duplicate script name errors for the scripts but i just copied and pasted them
I figured out the issue, I was using a really old version of game maker. I updated it and it worked.
Also i have another question. Am i able to convert a ds map into an array to save and back to a ds map? Its just that was the way i learned to handle quests trees so its what I'm used to using to store them.
Thank you
Glad you sorted your problem out! Yeah, this was written for GameMaker Studio 2 V2.3+, anything older than that won't work.
To answer your question, yes, you can do that using json_encode to turn it into a struct. Then, when loading it in you can read through the struct's values and re-create the DS map. (note that you cannot directly set the DS map as a value in SSave, so when re-creating it you will have to store the DS map in a variable somewhere else).
Hope that helps!!
hi. is there a documentation? i couldnt find on the github link.
Hey, I never got around to writing proper documentation (but plan to!)
I would recommend either watching a tutorial on YouTube—there’s a few of those OR looking through the demo. Sorry for any inconvenience!
Nice library. Does it work with local storage if running as HTML5? Looks like it just calls buffer_save under the covers, so I'm guessing yes(?). I'm new to GameMaker so not sure
Answering my own question after some testing, it does store the data in local storage with HTML5
Can you help me? I am trying to save the highscore of the player.
I have created a persistent obj_manager and in the create event I had this:
new SaveFile();
file = ssave_get(SaveFile, ''save'');
Highscore = file.get("highscore");
file.set_protection(SSAVE_PROTECTION.ENCRYPT);
and in another object I pasted this code:
if (global.points > Highscore) {
file.set("highscore", global.points);
Highscore = global.points;
}
in the script I had this:
function SaveFile() : SSave("save") constructor
{
add_value("highscore", SSAVE_TYPE.REAL, 0);
}
this doesn't work and I don't understand why.
You should release a video tutorial or some sort of documentation for this, this tool seems amazing, but the demo isn't very useful and it's practically impossible to understand what I can even do with this tool.
Hey, I definitely plan on making documentation for all my tools at some point--just need to find some free-time to do it. I'll also look into making the demo a little easier to go through/understand. Thanks for the feedback :)
did you find out how it works?
I did! I joined a Gamemaker library Discord and the person that made SSave was in the server so I just asked them personally when I ran into issues.
Here's the link to the thread: https://discordapp.com/channels/724320164371497020/1152264847392768110
Here's the link to join the Discord: https://discord.gg/8krYCqr
thank you I forgot to delet my message because I figured it out later, but I am still going to join the discord
in scr_ssave_manager there is an error in line 173 that breaks all of it.
Hey, thanks for reporting. I've released a hotfix for this, let me know if that fixed it for you, if not could you show me your code and/or the error message you get? Thanks
This makes it super easy to save and encrypt arrays in newer versions of Gamemaker. Thanks!
:)
coooool!!! it remains only to understand how to properly integrate saving and loading )))))ahahhaha