Saving Data When Closing Game

So, I was wondering if anyone knows a way to save data and reload it even if closing the game?
I tried using the better settings extension and the password-save extension, but no of these seemed to keep data if I close and reopen the game.

I’m trying to make a profile extension/game where if you click the login button and type in some details, it should reload your data/profile. Though it seems when I tried doing this, the simulator would not remember the data.
@richard @WoofWoof

2 Likes

Better settings should do this, you just have to refference the setting on startup and make sure you set the setting every once and a while, or when you press a save button in the menu or something like that.

1 Like

Honestly im ready to see what the answer is because i kinda wanna do the same.

1 Like

They should save data when reloading and closing the game and stuff. Not if you switch devices or reset the cookies though. If you aren’t deleting cookies, something might be wrong with your code, so you should share it and we can help.

1 Like

there’s no way for us to know if someone is closing the page or quitting their browser, so it’s not really possible to do this as you’re describing.

you can, however, just save state continuously in a forever loop like @Rune mentioned. that’s probably the best way to replicate this behavior.

2 Likes

oh wait, i think i misunderstood. the data should absolutely be getting saved if you’re using the settings or better settings extension. one thing to note though is that we base the settings on the name of the project so if you change that the settings will appear to get wiped out

if that’s not what’s happening, please share your code

2 Likes

idk, but these work:

so I could create a project with the name of another one, and I can cheat a game?

2 Likes

better settings extension should do it.

I don’t think so. It’s per project, but code in the project deletes all settings if the name is ever different than last time it was run. This is so that settings from a different game will get deleted on hardware.