Jump to content
  • Advertisement

Archived

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

Jaxks

Compressing games´s data files

This topic is 6768 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´d wanna do my game datafiles(Sound,images & other gamedata) to it´s own files like Sound.lib or Main_character.img(All animations).I found to use Zlib or something else algorithim to uncompres and do own file format editor to do game files but when I decompres files should I extract they own dir like "cache" and remove files allways when user quits from game.I´m not yet learning file I/O very well so can someone tell is there funktion that removes files.And does someone know where the data is in professional games( Memory or harddisk)

Share this post


Link to post
Share on other sites
Advertisement
yes, if your using C use the function
remove(filename);
In professional games, the data is on the
HDD until the initialisation stage, which
is when precaching occurs and the needed
files are loaded into memory for fast
processing.

-Mezz

Share this post


Link to post
Share on other sites
As far as i know game data (img + snd) is stored in files(harddisk) but has to be loaded into RAM during the execution of the program. So while your program is not running all data is stored in the datafiles, when you start the program (and also while you use it) the datafiles are read into memory and the data can be used by the program.

Allegro offers an excellent grabber utility to compress datafiles, the bad thing is, it doesn''t support C++.

Share this post


Link to post
Share on other sites
So I have my sound data sound.lib.Can I extract data there
straight memory and use it.

Share this post


Link to post
Share on other sites
Yes. Don''t write it to the harddrive first, then load it back to the RAM again. That''s a big hog. Instead of writing from your memory buffers, when you decompress the file, to the hdd just write it to another chunk of memory - you''re soundbuffer or what so ever.



"I think, therefore I am...I think"

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!