Skip to main content
4 events
when toggle format what by license comment
Sep 26, 2016 at 13:02 comment added Ewan Also, game are notorious for breaking changes in save games. Putting the parsing logic in a repository allows you to have GameStateRepoV1 etc
Sep 26, 2016 at 12:58 comment added Ewan i would totaly split it into GameState and GameStateRepository. The key thing I notice is your Equipment.Read() method. Say you change the format to xml, or download a save from the internet. You dont want Equipment to know about binary writer
Sep 26, 2016 at 9:26 comment added Karlovsky120 The thing is that it's a savegame file. I'm updating the question with a sample of root class. The class doesn't really make much sense if I don't add the save/load code. The whole object is saved by calling rootInstance.Write(string path) which then deals with all the rest of the saving. Since it's a binary file, I don't think inserting is a thing that would speed up anything. Is it?
Sep 26, 2016 at 7:47 history answered Ewan CC BY-SA 3.0