Saving/Loading values associated with objects

0 favourites
  • 1 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • Hi All,

    I'm working on a saving/loading system for my game. Right now, I store instance variables in several objects. I'd like to be able to save these values to an array, stick the array into storage, and at a later time, load the array from storage, and reassign all the instance variables.

    I'd rather not have to manually code each different object's instance variables being added to/loaded from the array as some of my objects have quite a few instance variables. It would be handy if instance variables were indexed, and there were an expression to reference them by index. That way, I could loop through each instance variable's index to save to/load from the array.

    A work around I've been thinking about is getting rid of instance variables altogether, and just using arrays. I would create an array per object to hold the values that are currently stored in instance variable. That way, I could loop through the array to save/load these values. I guess my questions is, "Has anyone found a better method for saving/loading values associated with objects"?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)