Spasman
Member
Hi there. I developed a game called Boring Man a while ago and I've had this bug or problem or something floating around the whole time. A handful of players lose their save data seemingly at random, but it has NEVER happened to me or any of the devices I've tested with, or even to people I know personally who have tried the game, so its been impossible to fix since I can't replicate it. I've gotten endless feedback data on it and I can't really seem to pinpoint a cause. (It's especially difficult because a lot of my players are young children and are difficult to communicate with)
I don't even know if its a problem in my code or a problem with GM itself. I'd like to run it through any YYG devs to see if maybe they have insight but if not, feel free to move me to the Programming sub forum if needed.
I use the installer to push the game builds. I'll compile the installer, then install the game onto my desktop, then upload the install directory to my website and Steamworks, then uninstall the game from my desktop. I do this twice, once with and without the Steam API enabled. Doing this allows me to keep my map and tile files in the Steam/Game EXE folder, instead of including them in the game and needing to extract them to the appdata folder.
When the player first starts the game, it creates the save file locally in the AppData folder. Anytime the player levels up. earns an achievement, or leaves the room (IE the menu or the room where the map file loads itself) The game will save their data automatically. If they quit the game (IE trigger the Game End event) the game will also save there as well.
The save data is encrypted via base 64 to stop save editing at face value. I use to have my own encryption script, but I simplified it to using the base64 functions to see that would stop player saves from corrupting. Still nothing. I could remove encrypting entirely but a 10 year old with notepad open would be able to edit their saves very easily.
In very rare cases, the save being "corrupted" isn't the games fault, because the player will mistake that there is a cloud saving ability (There isn't) and hop on a different computer, thinking their save was deleted when in reality it was just never transferred automatically. I also suspect some of them sometimes play for 4 or 5 hours in the first time running the game and quit the game improperly, not allowing the game to save properly (maybe by using Alt + F4). Having to clarify they haven't done those things adds to the confusion...
But most of them, I have questioned them to see if they have done either of these things and they just seemingly lose it while still on the same device and quitting the game properly.
I also suspect there are MULTIPLE ways they are losing their saves. One way I discovered was a bug within GMS (which was fixed recently). If the AppData folder had unicode characters in the file path, the game wouldn't locate the folder properly. This only resolved a certain way of players losing their save (because it wasn't saving at all in the first place)
I'm just at a loss. I've never seen this problem before in the 7 years I've used this program. I'm afraid to move forward with any other projects that involve saving because I might be making the same mistake again.
Yes I could implement cloud saving or a login system.. but for what purpose? Just to get around a bug or problem I can't resolve that shouldn't even be there?
I have provided as much info as I could for a pretty vague problem. I dunno, maybe I need advice more on troubleshooting it then a way to fix it.
I don't even know if its a problem in my code or a problem with GM itself. I'd like to run it through any YYG devs to see if maybe they have insight but if not, feel free to move me to the Programming sub forum if needed.
I use the installer to push the game builds. I'll compile the installer, then install the game onto my desktop, then upload the install directory to my website and Steamworks, then uninstall the game from my desktop. I do this twice, once with and without the Steam API enabled. Doing this allows me to keep my map and tile files in the Steam/Game EXE folder, instead of including them in the game and needing to extract them to the appdata folder.
When the player first starts the game, it creates the save file locally in the AppData folder. Anytime the player levels up. earns an achievement, or leaves the room (IE the menu or the room where the map file loads itself) The game will save their data automatically. If they quit the game (IE trigger the Game End event) the game will also save there as well.
The save data is encrypted via base 64 to stop save editing at face value. I use to have my own encryption script, but I simplified it to using the base64 functions to see that would stop player saves from corrupting. Still nothing. I could remove encrypting entirely but a 10 year old with notepad open would be able to edit their saves very easily.
In very rare cases, the save being "corrupted" isn't the games fault, because the player will mistake that there is a cloud saving ability (There isn't) and hop on a different computer, thinking their save was deleted when in reality it was just never transferred automatically. I also suspect some of them sometimes play for 4 or 5 hours in the first time running the game and quit the game improperly, not allowing the game to save properly (maybe by using Alt + F4). Having to clarify they haven't done those things adds to the confusion...
But most of them, I have questioned them to see if they have done either of these things and they just seemingly lose it while still on the same device and quitting the game properly.
I also suspect there are MULTIPLE ways they are losing their saves. One way I discovered was a bug within GMS (which was fixed recently). If the AppData folder had unicode characters in the file path, the game wouldn't locate the folder properly. This only resolved a certain way of players losing their save (because it wasn't saving at all in the first place)
I'm just at a loss. I've never seen this problem before in the 7 years I've used this program. I'm afraid to move forward with any other projects that involve saving because I might be making the same mistake again.
Yes I could implement cloud saving or a login system.. but for what purpose? Just to get around a bug or problem I can't resolve that shouldn't even be there?
I have provided as much info as I could for a pretty vague problem. I dunno, maybe I need advice more on troubleshooting it then a way to fix it.