I understand that in order to save a game, you create an object with all the parameters you want to save, copy all them to that object and then SaveGameToSlot
But if I have like dozens of monsters, inventory objects, players, animations going on, etc do I have to copy all monsters positions, states, buffs, frame of the animation they are in, inventories… one by one?
Is there a way to save a whole group of objects at the same time?
In my case, the inventory would be an array of inventory objects’ IDs (objectIDnumber1, objectwithIDnumber23, etc)
All monsters would have to have a function that transforms all it’s data to many 2D arrays for example the number of monsters would be the number of columns in that matrix (I say columns because I imagine it like a table). Each column would represent each monster, then each row would be a certain parameter for example position or buffs.
So this is how I would do it, but is there a better way?
I mean how would you save a lot of data like that in an efficient way?