Right now I only have a few files in my game that get loaded at runtime. But that number will probably increase as I progress with it, so I though of implementing a system that reads game data (like models, textures, sounds, etc.) from archive files (like zip) since that would be faster than loading many small files residing individually on disk.
Thing is, while it is very easy to create such an archive, I have no clue on how to get my engine to load specific files from it or (more importantly) how to know where a file is.
Currently I pass in file locations as a path relative to the game folder, using the FileSystemContentResolver class to get my content manager to actually find and load the file. File paths are both hardcoded in the source and specified in .ini files
For example:
[Ship]
...
model = Content\Ships\someship.3df
Now, the content manager has an IContentResolver interface which FileSystemContentResolver implements, and it is set up so it will use all registered content resolvers to find a given file.
So, how would I go ahead to:
1. Tell the content manager/resolver which file to look for in which archive (or just try all there are)
2. Have the content resolver assert that the file actually exists in this/any archive
3. Load the file from archive, while preferable keeping the archive open for future file loading.
Preferable using C# framework built-in functionality