GeneralRulesIncludeInSaveUnit Method |
Namespace: (Default Namespace)
public virtual void IncludeInSaveUnit( SaveUnitInclusion Include )
There are many functions that can be used to specify what elements should be included in a saved game file. This function is designed for setting up a very rough outline of what kind of data will be included in the save file. After this is called, the selection can be fine tuned with further calls to related functions in the See Also list. If nothing is included in the SaveUnit before SaveGame(Int32, Boolean) is called, everything will be included by default. See SaveUnitInclusion for details about the meaning of different categories.
By including maps in a SaveUnit, all the tiles and sprites are remembered exactly as they were when the game was saved, but only for those maps that are included. Maps that aren't included will be reset to their initial state next time they become active after loading that game.
By including only counters (and not maps) in a SaveUnit, you can store some general information in a SaveUnit in a significantly smaller file, and use that information to re-initialize some general properties of the game. For example, the number of lives and inventory owned by the player (assuming inventory is stored in counters) might be adequate for some games (if you don't have to worry about items being available again on maps that have been reset to their initial state, or if you have few enough items that you can initialize them based on counter values).