I was wondering what would be a good approach to handling save/load data?
Can you encrypt those files? I heard it's really easy to open the source of LOVE projects, so i imagine it would be easy for users to cheat by editing the save file variables (?)
encrypted save
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
encrypted save
poof()
-
- Party member
- Posts: 559
- Joined: Wed Oct 05, 2016 11:53 am
Re: encrypted save
You can do some simple obfusctation on save files, sure. It could even be as simple as just taking the table tracking your save data, and dumping it into a file with a serializer like bitser (awesome-love2d repo has a few other options), which will result in a file that isn't exactly human readable. This can stop an average user from just opening the file and modifying it... But then they can also potentially just use cheat engine, or share save files between players.
Even if you somehow (successfully) manage to obfuscate the source code regarding your save file management, a knowledgeable hacker could always just bypass your encryption with some work. It'll mostly be a losing battle, so my advice is just to not worry about it. The only exception may be an online multiplayer game, where it's likely better the server stores the saves rather than the client.
Even if you somehow (successfully) manage to obfuscate the source code regarding your save file management, a knowledgeable hacker could always just bypass your encryption with some work. It'll mostly be a losing battle, so my advice is just to not worry about it. The only exception may be an online multiplayer game, where it's likely better the server stores the saves rather than the client.
Re: encrypted save
You can try binary as that's harder to crack. But similar to MrFariator, I would recommend against doing that. Just let your players enjoy hacking their save games if need be.
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Re: encrypted save
Make the hash sum by the saving and recalculate it by the loading. If cheat, make the game harder and keep the hash wrong.
Re: encrypted save
I'm also for this. Interpret it like opening your game up for modding to let your customers tweak it and enjoy it more, even if that means letting them have "infinite gold coins" or whatever it is that they're going to change.
(You could argue against it if you're making a game with in-app-purchases / pay-to-win scheme.)
Re: encrypted save
Just a quick example: Sunless Sea is a mix adventure/RPG game where you navigate your boat through the story. However, keeping boat stats up such as fuel etc. get tedious over time, specifically when there is story behind it. Fortunately the game was using JSON format for their saves. So I just edited this JSON to have unlimited fuel and other items needed for boat driving to progress easier, however I kept other important story stats unchanged to enjoy the story.
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Re: encrypted save
In this case you will want to keep your saves/records on a server anyway and only sync it to a client.RNavega wrote: ↑Mon Dec 02, 2024 7:04 amI'm also for this. Interpret it like opening your game up for modding to let your customers tweak it and enjoy it more, even if that means letting them have "infinite gold coins" or whatever it is that they're going to change.
(You could argue against it if you're making a game with in-app-purchases / pay-to-win scheme.)
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Who is online
Users browsing this forum: Google [Bot] and 13 guests