Archived

This topic is now archived and is closed to further replies.

packaging your data files?

This topic is 5374 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a bunch of resource files, pictures, etc, and I really don''t want to let "regular" users mess them up (replacing them with their own pictures, modifying scripts, etc). So, I am thinking about packaging all the files into one big data file (probably in zip format). But then I wonder, how am I going to load these files into my games?? Do I extract them to a temp directory, load them, and then delete them when they are no longer needed? Do I read them directly from that gigantic data file? What do you think is the best solution?
Current project: 2D in Direct3D engine.
% completed: ~20%

Share this post


Link to post
Share on other sites
That''s what I did. I used zLib and did exactly what you did. I don''t know how to load the game data directly from the zip though...



- Rob Loach
Current Project: Upgrade to .NET and DirectX 9
Percent Complete: X%

Share this post


Link to post
Share on other sites
Load your files directly from memory.
Most resources (like textures and such) are copied into memory buffers during the loading process anyway.

If you use memory mapped archive files you can get a considerable speed-up in loading, too.

Share this post


Link to post
Share on other sites