timfreilly / unlucky-at-python

A python game I occasionally work on
2 stars 2 forks source link

Data format #7

Open timfreilly opened 12 years ago

timfreilly commented 12 years ago

I use pickle for the main character's storage, currently. I think I'd prefer something human readable.

timfreilly commented 12 years ago

As I think about this more, I realize that this may be one of the main blockers for my progress on the project. With actors, weapons, rooms, scenarios, etc, I always feel a bit hesitant that my test data is not flexible enough. My goals are:

timfreilly commented 12 years ago

I already use JSON for the data files. Maybe my strategy needs to be to identify what objects need to be data, and how to format my files. It would make sense that instead of embedding the banker's stats in the scenario, the scenario just references the banker data.

timfreilly commented 12 years ago

I think my major classes need toJSON and fromJSON methods. Also, I think Actor might need to split between Actor and subclass Star.