Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
With a title like this, no one asking questions about save games will ever find it again. – user744 Oct 1 '10 at 16:26
Title was updated. – topright Oct 1 '10 at 16:32
up vote 3 down vote accepted

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.
share|improve this answer
Second idea is interesting. – topright Oct 1 '10 at 16:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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