Wednesday, September 21, 2011

Done

Whee,

Im done with the saving/loading.. for now, until I add something else but even in that case its trivial to update the saving/loading functions. I made a little shortcut on Effects class tho. Effects are such a huge and complex system that for now I only save template name of the effect into file and load it back by calling effect creation function with that template name. It's not as good as it should be maybe but for now it will do.

Next thing I need to add is to give control of saving and loading to GameDirector. Currently saving and loading is done "manually" without any kind of control. This works at the moment since there is only Astacia terrain which needs to be saved and loaded ( along with its objects/npcs and such ) but when I add more places I need to be able to save all of the places not just the one the player is in. Only thing keeping eye on that is the GameDirector so I think its logical that I make the GameDirector CEO of the saving&loading CO.

On a side note.. When you save Player class I made a debug messages which shows how deep it actually goes in class hierarchy. If the deepness is calculated from going down on hieracrhy and taking account when class holds object which needs to be saved too then the deepness of player class atm goes down to 20

Player -> Living -> Inventory -> Item -> Effect -> etc etc

No comments:

Post a Comment