Hello! My game has a lot of variables from coins, upgrades, etc. that I want to save. Currently, I'm using LocalStorage to save all these variables, and they are getting a bit lengthy. I'm looking for a better way or other methods to save all these variables and retrieve them on load. Thank you!
Note: I'm using this storage example from dop2000
I use arrays to store variables for settings and such, and save that array to local storage asjason.
Perhaps that's an approach that could work for you.
Develop games in your browser. Powerful, performant & highly capable.
You can store the value and the identifier in adjacent cells of an array and then use loop in the function to save them to local storage. This would remove the need to save each individual key string and value from your dictionary.