Original Post
For a few weeks, I've been planning out a way to contain my data for a tile based game. I've decided that I'm going to design a world editor using Visual C++ that will create binary files to hold my data. One file I have in mind is a binary file that contains information about sprites. Here's a simplified version of how data would be stored: - Number of bitmaps for textures - Bitmap information (Filename for example) - Bitmap Width - Bitmap Height - Number of sprites - Texture coordinates for sprites - Repeat bitmaps and info as needed The only thing I don't like about it is the bitmap filenames. It would be a little more complicated to use resources that way, and it also depends on all the files being located in the right directories. My next idea is to stuff all the image and sprite information into one large binary file. I've seen this done for games such as Descent. If I do it this way, I can make this file a resource so all my information is right where the program expects it to be. To load bitmap data in whenever I want, I just need a variable that stores the offset in bytes that sends the file read pointer to the beginning to the bitmap information. Is this a good practical idea? As a bonus question, I'm using DirectX and want my textures to be in managed memory. I know I can do this easily with D3DXCreateTextureFromFileEX(), but that requires a filename to make a texture. I know I can copy image data to a surface and create a texture from that, but I don't see how I can put that into managed memory. Any ideas?