Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data migration of save file #184

Open
cdupont opened this issue May 8, 2017 · 0 comments
Open

Data migration of save file #184

cdupont opened this issue May 8, 2017 · 0 comments
Labels

Comments

@cdupont
Copy link
Collaborator

cdupont commented May 8, 2017

Currently the state of the game is saved in two formats:

  • AcidState/safecopy for the players profile (including library)
  • JSON for the games.
    The game state is essentially a serie of events, such as "propose rule", "input update". When the game is re-loaded, all the events are played one by one to obtain the same state than before. This is mandatory because the state contain functions, that cannot be serialized.

When the internal structures of the game changes, they need to be updated in the save files too.
AcidState/safecopy comes with an update mechanism.
However, the JSON save file need to be updated by hand, which is very tedious, for several reasons:

  • there are dependencies between the events in the event list. It's not easy to delete just one.
  • the save file contains a lot of code that need to be interpreted. If the signature of the Nomyx functions changes, the interpretation will not work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant