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

Make savegames robust without needing version #596

Open
ioan-chera opened this issue Jun 24, 2023 · 0 comments
Open

Make savegames robust without needing version #596

ioan-chera opened this issue Jun 24, 2023 · 0 comments

Comments

@ioan-chera
Copy link
Member

I think a way to make saves more robust and perhaps even forget about versioning is to store them with named fields instead of purely sequential. Kinda like JSON but maybe simplified to be quickly readable and writable as binary without all the silly syntactic baggage. This way when loading you search for the fields by string, leaving default if not found, and there’ll be no problem of the wrong value getting into the wrong field and crashing. If the save file gets too big, we can use zlib to compress it. Care must be taken when we refactor the code, because we shouldn’t rename the field save names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant