I have been reading 'Game Coding Complete', and the design of the resource cache seems to load the entire resource into a block of memory. This is fine, but then when using the resource you are also creating another object (texture or game node for example) using the same data from the memory stream.
Isn't this duplicating the data meaning you have two sets of mostly the same information? It doesn't seem very efficient. Ok, I understand that for textures it can sit in video memory, but that may not be true for other resources. Is there a reason why the resource manager shouldn't directly create the texture/mesh object etc?
Also, assuming you have a lot of game objects (for example nodes in a scene graph), do these objects also need their own cache and temporary file area? Especially if you are dealing with an open-environment game like an MMORPG.
Thanks for any clarification!
Isn't this duplicating the data meaning you have two sets of mostly the same information? It doesn't seem very efficient. Ok, I understand that for textures it can sit in video memory, but that may not be true for other resources. Is there a reason why the resource manager shouldn't directly create the texture/mesh object etc?
Also, assuming you have a lot of game objects (for example nodes in a scene graph), do these objects also need their own cache and temporary file area? Especially if you are dealing with an open-environment game like an MMORPG.
Thanks for any clarification!