Posted June 18, 2023 by The Grumpy GameDev
As soon as I start having game data, I immediately create the functionality for saving and loading it.
I use POCOs to store the data, and I always make sure that they are easily serializable to json.
This was not always so.
I used to persist to a SQLite database.
Which made adding new world data slower than it needed to be.
And it made refactoring it absolutely awful.
So now: JSON!
My save and load functions become effectively one line.
And once I have any sort of world data object, I can persist it to a file and load it from a file.
And thus completes all of the non-gaming part of the project.
Approximately, it took 4-6 hours to get to this point.
Now I can FINALLY make this into a game!