(SOLVED)Looking for ideas, suggestions and so forth on how I should manage my persistent code.

flyinian

Member
In my current project I have to keep track of numerous changing numbers. i.e cash, statistics, etc. I am currently planning on placing all of this code in a single object and making it persistent. Would this be a good idea? What do you recommend?

Thanks.
 

chamaeleon

Member
Without additional details to indicate otherwise, yes, it's probably a good idea to keep it in a persistent object (or more than one if some logical division makes it easier to "namespace" data). Just don't forget to use data structures as well where appropriate.
 

flyinian

Member
Without additional details to indicate otherwise, yes, it's probably a good idea to keep it in a persistent object (or more than one if some logical division makes it easier to "namespace" data). Just don't forget to use data structures as well where appropriate.
Thank you.
 

chamaeleon

Member
Would there be any issues if I reference the variables from the object directly?

I.e object1.variable1
If you only have one instance of the object, sure, that's fine to do. It's not really different from using global variables. Or you can of course name your instance in the initial room that it is placed in to give it an easy to remember and type name too. Whatever floats your boat.
 

flyinian

Member
If you only have one instance of the object, sure, that's fine to do. It's not really different from using global variables. Or you can of course name your instance in the initial room that it is placed in to give it an easy to remember and type name too. Whatever floats your boat.
Awesome, Thank you.
 
Top