I’ve been working on my game, and long story short, it’s an RPG. It has loads of data stored deep into nested objects. For an example, I have a Character class (that extends MovieClip) with lots of data in it - some of that being abilities, which are part of an Ability class. In that Ability class is a SpellGraphic class. Etc.
What I would really like to do is simply save my Character class to my sharedObject. However, sharedObjects do not like saving custom data types, or MovieClips.
I’ve looked into using registerClassAlias(“SaveGame”, SaveGame), and while I could create a SaveGame class (extends Object) and store all my custom data in it, when I re-loaded the data (which did did correctly re-load as a SaveGame class in the sharedObject), the data would re-default to the initial values. It turns out that whenever SaveGame loaded, it would re-create a new instance - so I have been unable to actually save and then recall data from my SaveGame class after re-loading the flash. I can not save anything worthwhile in my SaveGame class, and this did not solve the issue.
I am trying to find a way to preserve the state of my game (by hopefully storing my characters and game data directly) without having to individually store every single variable, which would be an absolutely mammoth task, and create substantial room for bugs.
I’d appreciate some help here.
Thanks.