-
-
Notifications
You must be signed in to change notification settings - Fork 5
Using serde for player data saving #24
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersrefactorSomething isn't right in terms of orgnisationSomething isn't right in terms of orgnisation
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersrefactorSomething isn't right in terms of orgnisationSomething isn't right in terms of orgnisation
Type
Projects
Status
Ready
Currently we use serde with bitcode for world saving (or at least we will when #23 is merged) but player data is still saved using plain bitcode. This means any 3rd party code (like bevy_math's vecs) must first be converted to a data type we own, which is annoying and won't scale well as player data gets more complex. I didn't add it in the PR that moved the world serialization to serde because I cba figuring out the lifetimes stuff, but have since realized I was overcomplicating it.
This could be implemented as a simple method on the OfflinePlayerData struct that takes in the state and a UUID as an argument. I have left this unfixed as it's not massively important for now and could be a good first issue for people looking to start with the project.