carter-reynolds / pyRPG

A text-based RPG-esque project made while learning python
1 stars 1 forks source link

Saving Data #11

Open carter-reynolds opened 2 years ago

carter-reynolds commented 2 years ago

We need a way to save data whether that be by CSV, XML, some other solution I may not currently be aware of. CSV seems easiest to me with my current knowledge but there is likely a better way to go about it.

My thought was that data would only need to be saved during every rest or quit or manual save actions. This file would only be referenced as well when the script starts to load saved data.

Constantly referencing a CSV could get inefficient and messy but if we limit how much we rely on it, it may not really be a problem this early on and will work as a temporary solution.

Pandas makes it very easy to manage data to a CSV via dataframes. This was my initial thought.

The ideal solution would be something like a python built database of some type, if that exists.

Things that would need to be saved and loaded:

carter-reynolds commented 2 years ago

This commit added player data saving functionality. exports to json currently. https://github.com/carter-reynolds/pyRPG/commit/9bdab5d1b5794b7e09711756a95a24e7999944d3

Still need to: