Do you distinguish constant and changeable game objects when you save/load game? If yes, how do you do it?

If not to save constant objects (for example, mountains and trees), we optimize memory usage and save/load time. But functional requirements for the game can change. Now you want trees to be mutable and destroyable. It can screw up all previous game states. Trees were not saved => saved game map is interpreted as the prairie without trees.

  • \$\begingroup\$ With a title like this, no one asking questions about save games will ever find it again. \$\endgroup\$ – user744 Oct 1 '10 at 16:26
  • \$\begingroup\$ Title was updated. \$\endgroup\$ – topright Oct 1 '10 at 16:32

Saved games should either:

  • Completely describe everything, whether mutable or not. This is the safest way, and easy, but does use a lot more space. It doesn't really use more memory, since you need the trees either way. It just uses more persistent storage, which there is plenty of on anything that's not a Nintendo DS. It also means you can't fix bugs in levels without players having to restart the game to get the bug fix.
  • Describe differences between the default map state and its current state. This solves the tree example you give. The save game says nothing about trees; therefore the trees are in their default place on the map. It means you cannot do the reverse - change something from mutable to fixed - but there is obviously no way to do that and preserve the save file accurately.
  • \$\begingroup\$ Second idea is interesting. \$\endgroup\$ – topright Oct 1 '10 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.