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

Thoughts on how the save data should be encoded #1030

Open
CG-Tespy opened this issue Sep 19, 2021 · 2 comments
Open

Thoughts on how the save data should be encoded #1030

CG-Tespy opened this issue Sep 19, 2021 · 2 comments

Comments

@CG-Tespy
Copy link
Collaborator

I've been working on the save system, adding unit tests and such, and I've been thinking... Perhaps using StirngPairs to represent various types of save data is too limiting. Devs may want to attach special metadata to the save contents, which can do things like help fix glitches or import save data from one game into another for goodies.

I am thinking of going instead with a flexible interface that allows devs a lot more freedom than a key-value pair of strings.

What do you guys think?

@Arylos07
Copy link
Contributor

Just now seeing this.

I think key value pairs of some kind will be the most flexible for developers who aren't familiar with programming and should work with Fungus's workflow. I wouldn't reserve it for strings though. It's a little outdated but I would look at this PlayerPrefs replacement for a reference of how to handle it. You'll have to make separate arrays for each type, but that will allow the same control users want without having to cast/revalidate data too much.

The only real other option is to use a binary class to store information and encode it into a file, but that requires some code writing by users since they'll have to add all of the data they want to save to the saving class.

@CG-Tespy
Copy link
Collaborator Author

I think key value pairs of some kind will be the most flexible for developers who aren't familiar with programming and should work with Fungus's workflow.

How are devs supposed to save their own custom types without programming, though? I thought it was a given that when it comes to encoding save data that isn't supported by the system right out of the box, users will need their own custom scripts.

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

No branches or pull requests

2 participants