Sign in to follow this  
Nick T

ZIP Resource Management Question

Recommended Posts

I have a question regarding resource management with zip files and C++. Currently I am using a ZLib derived zip compression/decompression library. I am using it as the base for the resource management code in my own engine. So far everything has gone fairly smoothly. However, I am stuck in regards to how and when to call the decompression functions. I am implementing clip-mapping, meaning that the terrain textures will be somewhat large in size. So loading everything at run time would just be too costly. But at the same time, making a new call to open the zip file every time a block of resources is needed sounds like it'd be equally as costly. I do realize that a 3D game now is going to be costly regardless, it is the nature of the beast now-days. But I'd like to make it efficient as possible, considering I am going to have to be streaming a lot of data (clip-maps and some other stuff).

I thought about developing a "Required Resource Table" where a file stores the needed information for a level (a BSP map). The resource manager would load all of the data from the table when the level/world loads. It would still require loading the zip files, but any data not needed could be unloaded after the world load process. Although that is fine for static resources, it leaves much to be desired for streaming content.

For content that requires streaming, although it may increase file count (not something I am worried about at this moment in time), having the textures which will be clip-mapped as ZLib compressed single files may be the ticket.

Any thoughts and advice on this would be greatly appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this