Saving game data question
by Cosmic Logic · in Torque X 2D · 08/13/2010 (7:35 pm) · 0 replies
Hey,
I've got the actual file saving down and working. The problem I'm having is with serialization. To save a game I'm just serializing my entire Character class that stores all of my character information(obviously).
The only problem is that some of it's members are private and I'm using method setters to get access to them and the serializer skips over these. Now, I could band-aid it by just making them public, or I could go through a bunch of hassle to custom serialize the class to include those members (something I have to learn still).
Would making them public just be bad programming? Or would it not even be a big deal since it's not a group project and I'm the only progrmamer.
I've got the actual file saving down and working. The problem I'm having is with serialization. To save a game I'm just serializing my entire Character class that stores all of my character information(obviously).
The only problem is that some of it's members are private and I'm using method setters to get access to them and the serializer skips over these. Now, I could band-aid it by just making them public, or I could go through a bunch of hassle to custom serialize the class to include those members (something I have to learn still).
Would making them public just be bad programming? Or would it not even be a big deal since it's not a group project and I'm the only progrmamer.