rmkubik / unstable

An action puzzle HTML5 game written with Phaser
1 stars 1 forks source link

Cache busting on local storage when level save data contract is changed #35

Closed rmkubik closed 6 years ago

rmkubik commented 6 years ago

Do versioning of the save data (OR just process it to check what type it is when its loaded.) Maybe a version property would be a good idea.

rmkubik commented 6 years ago

Added a version property to Unstable.version and saved it to saveState.version. If there's a mismatch it moves the saveState to saveState.backup and then deletes the main saveState.