Azenris
Member
Hi just wanted to see your opinion on how you could go about designing this.
Basically, I have machines that can be placed on the floor.
My current system is they all have their variables and what not, but they also have global list data.
When the room ends, the data syncs up to the list.
When you go into another room that doesnt have this object, its data can continue to be manipulated.
The problem with this stragery, is there are two data sets, so I have to constantly think about which im changing, and some functions need designing twice, since sometimes its object instance variables and sometimes the list data.
I can see two options.
1) I move all the data global and dont use any instance variables. The disadvantage with this is while the room is running, i am having to constantly access list data. instead of the previously variable data.
2) move everything into the instance variables and when moving rooms, deactivate them, keep their ids and manipulate them this way. only reactivate when its their room they exist again.
I was just curious how you would go about designing this, maybe another option?
Anyway ty if anyone responds, not a normal programming question. TY
Basically, I have machines that can be placed on the floor.
My current system is they all have their variables and what not, but they also have global list data.
When the room ends, the data syncs up to the list.
When you go into another room that doesnt have this object, its data can continue to be manipulated.
The problem with this stragery, is there are two data sets, so I have to constantly think about which im changing, and some functions need designing twice, since sometimes its object instance variables and sometimes the list data.
I can see two options.
1) I move all the data global and dont use any instance variables. The disadvantage with this is while the room is running, i am having to constantly access list data. instead of the previously variable data.
2) move everything into the instance variables and when moving rooms, deactivate them, keep their ids and manipulate them this way. only reactivate when its their room they exist again.
I was just curious how you would go about designing this, maybe another option?
Anyway ty if anyone responds, not a normal programming question. TY