Skip to content

Convert save data files from json to csv#60

Open
K-Meech wants to merge 12 commits intomainfrom
km/export-to-csv
Open

Convert save data files from json to csv#60
K-Meech wants to merge 12 commits intomainfrom
km/export-to-csv

Conversation

@K-Meech
Copy link
Collaborator

@K-Meech K-Meech commented Feb 13, 2026

For #20

This PR converts save data files from .json to .csv format, as discussed in the last meeting. @mmcleod89 and I looked for an existing csv reader integrated into unity, but none appeared to exist - as such, this PR uses built-in functionality like StreamWriter to read / write csv manually.

I wanted to avoid adding lots of boiler plate code to the various GameData classes, so currently all the conversion code is inside SaveData and uses reflection to read / populate the relevant fields. Not sure if this is the best way to do this - so do feel free to change this however you'd like!

Still todo:

  • save data is only created for complete games so far. We need to add saving when a game is stopped early via the exit button / quitting.
  • This keeps the data saved as-is, but David has made a rough outline outline of extra data he'd need: see issue 20. This needs to be discussed / game data classes updated.

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

Successfully merging this pull request may close these issues.

1 participant