title: Saving a Ton of Data for a Game
body: <p>So I'm designing a 2D game in C++ with tons of data-- basically, it features randomly generated, blocky terrain (in the form of a very large byte array), much in the style of Terraria, and will also need to save state for monsters (among other various game objects).  As the player runs around, sections of the game world will be loaded/saved to the disk, making for an infinitely expanding game world (similar to Minecraft).</p>
  
  <p>What's my best option for saving everything to the disk?  I'm mostly concerned with efficiency (so the user never has to wait on content to load), but ease of use and maintainability are a close second.  I'm very familiar with Minecraft's method of saving, which has a separate file for each "Chunk", but I was wondering-- should I designate my own files like Minecraft, or go with a database?  What other possibilities are out there?  If I use a file, would I get a significant performance boost by asking the OS for raw access and handling that myself (much like a database does)?</p>
  
  <p>Also, I'd like to be able to port the project from PC to Mac and console-- alternatives for individual platforms are fine, I'll just have to swap methods depending on the platform.</p>
  
  <p>Thanks!</p>