Most games come with their own resources (models, textures, etc.) packaged in special files (for example, .pk3 files in Quake 3, for example). Apparently, these files are somehow "mounted" and used as if they were separate file systems.
I would like to know how this is achieved. The only strategy that I have encountered so far is to place information about the size of the offset in the file header, and then map the memory to the file and access the resources as if they were independent write-protected memory blocks.
I would like to know if my strategy is viable and if there are better alternatives.
Thank!
user500944
source
share