title: How do video games efficiently store/retrieve large amounts of data?
body: <p>For example, in Fallout 3, a save game stores the state and location of every single object and NPC in the game, and only takes up a few MB's.  How do they do that!?!?</p>
  
  <p>And then, during game play, how is this data added/retrieved in/from memory such that it can be displayed to the player in real-time?</p>
  
  <p><strong>UPDATED:</strong> (I'm going to make you work for your answers :P)</p>
  
  <p>Based on Kevin Crowell's answer...
  So I guess you would have a rendering distance that would apply to objects and NPC's, and you would "SELECT" the objects and NPC's within the given range.  However, what type of data store would you use in order to get these objects?</p>
  
  <p>In other words, you would you have a gigantic array of every object in the game, and constantly update a smaller list that holds the visible objects to render?</p>
  
  <p>Also, per Chaos' answer...
  Would would happen if you eventually touched every object in the game?  Would your save game get bigger and bigger?  In the case of Fallout 3, I'm pretty sure there aren't "stages", where the past data could just be dropped.  Everything is persisted when you leave/return to a location.  So how do you think this specific case is implemented?</p>