Hi all,
Working on this RPG that I've mentioned previously. My previous post regarding it was about a Visual component for a character, and having it linked to a non-visual object that actually contained all the stats and methods for manipulating the stats (ie. Picking up Armour would change Armour Protection stat).
I've set up the non-visual object already with fields and properties, etc., but now I'm thinking changing this to become a dataset wrapper would be a better way - and I'm interested in anyone's comments.
When I say wrapper - I mean that the non-visual object would not contain any fields relating to stats, or item lists (like weapons, potions, etc.), but instead the relevant properties would call functions that would directly read from the dataset. Similarly, writing to the properties would update the dataset. This approach would eliminate the need for a loading/saving routine, and the built-in caching routines in the datasets (and Windows) would not slow things down imo.
There would be a little bit of structuring involved to ensure efficient use of dataset objects - I wouldn't want every item to need it's own dataset of course.
I haven't thought this through enough to see if there's potential pitfalls waiting for me later on with either approach, perhaps somebody's already done this exercise?
Thanks.
Working on this RPG that I've mentioned previously. My previous post regarding it was about a Visual component for a character, and having it linked to a non-visual object that actually contained all the stats and methods for manipulating the stats (ie. Picking up Armour would change Armour Protection stat).
I've set up the non-visual object already with fields and properties, etc., but now I'm thinking changing this to become a dataset wrapper would be a better way - and I'm interested in anyone's comments.
When I say wrapper - I mean that the non-visual object would not contain any fields relating to stats, or item lists (like weapons, potions, etc.), but instead the relevant properties would call functions that would directly read from the dataset. Similarly, writing to the properties would update the dataset. This approach would eliminate the need for a loading/saving routine, and the built-in caching routines in the datasets (and Windows) would not slow things down imo.
There would be a little bit of structuring involved to ensure efficient use of dataset objects - I wouldn't want every item to need it's own dataset of course.
I haven't thought this through enough to see if there's potential pitfalls waiting for me later on with either approach, perhaps somebody's already done this exercise?
Thanks.