# Is using XNA title storage for level/config files a Bad Idea?

I've reached the point in development where my Game Engine can actually do stuff, and it's time to start thinking about how to store / load the various bits and pieces where they need to be.

I've decided to go with file storage (rather than a database), which means I'm probably going to be using .xml, .json, or .csv files. The only remaining question is how to actually store them within the game's binaries (so that any players won't be able to edit levels willy nilly).

XNA's Title Storage, being read-only, seemed as good a starting place as any, but when I loaded up the MSDN page, there's this warning on the top:

This topic describes how to add files to title storage that the game will access through stream I/O. This is the exceptional case, and is not recommended for most XNA Game Studio games. Instead, consider using the Content Pipeline to manage your game data most efficiently.

Emphasis mine.

So is it a bad idea to use Title Storage for level/config files, or is that warning intended to stop people from using it to store things like Texture2Ds and SpriteFonts ?

• If it's okay with you, I'd like to ask about an additional detail concerning this subject. Even if it happens to be okay to use TitleStorage on the XBox and WP7, would there still be any reason to use it for Windows development only? I'm currently loading everything at runtime with regular I/O (for my own reasons, the content pipeline won't do) and haven't even looked into TitleStorage before. Dec 17 '11 at 21:04
• @David For what it's worth, I'm doing windows development. Dec 17 '11 at 21:13

TitleContainer.OpenStream just opens an I/O stream in the same folder as the current executable resides. There isn't anything wrong on using it, the warning you see in the MSDN pages is because on XNA the rule of thumb is to preprocess all the content you will use via the Content Processors so you don't have to waste any CPU converting data on load.
• @DavidGouveia: TitleContainer just packs a handful of operations to automatically parse the path and make it relative to the assembly's root directory. OpenStream returns a FileStream too, but it's always opened in read mode. Dec 18 '11 at 12:33