Sign in to follow this  

Compressing data in a project

This topic is 3485 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

This might be the wrong place to post this so I apologize. I'm kind of a newb when it comes to this sort of thing, but I understand that there is importance in compressing pictures/music in a game project so that others simply can't take the files and view them easily. I guess my question is simply, how would I go about doing this, and what are some common methods. Perhaps something as simple as pointing me in the right direction would work. I just don't know where to start :/

Share this post


Link to post
Share on other sites
Quote:
Original post by Arbel
I'm kind of a newb when it comes to this sort of thing, but I understand that there is importance in compressing pictures/music in a game project so that others simply can't take the files and view them easily.
The importance of compressing game content is so the game takes up less space. Keeping others from viewing your textures is both impossible and unnecessary.

Share this post


Link to post
Share on other sites
I suppose that is true, but at the same time I don't see any game projects where there is a mass jpeg folder of every game image or mass mp3 folder of all the games music. I usually see unknown files types etc. Is that solely done to save on size?

Or maybe I'm just confusing compression with something else...Like I see most games nowadays where you open up the folder and its all in one data file so you can't just directly access the resources. Maybe compressed was the wrong choice of word?

[Edited by - Arbel on May 26, 2008 10:22:24 PM]

Share this post


Link to post
Share on other sites
You're confussiong compression with simple packing. Those files are just a bunch of mp3s and whatnot smushed together. The game knows where in the master file to find each file it contains. The final master file itself might be compressed, but its to save space, as mentioned above, not to hide the contents.

Even for games like wow, people can bust these files open, and check out whats inside, you cant really do to much to stop it from happening.

Share this post


Link to post
Share on other sites
Thank you Tstrimp, that's exactly what I was looking for. Here's the link if anyone is interested(http://www.gamedev.net/reference/programming/features/pak/)

Feel free to close this topic as well.

Share this post


Link to post
Share on other sites
Quote:
Original post by Arbel
I suppose that is true, but at the same time I don't see any game projects where there is a mass jpeg folder of every game image or mass mp3 folder of all the games music. I usually see unknown files types etc. Is that solely done to save on size?

Or maybe I'm just confusing compression with something else...Like I see most games nowadays where you open up the folder and its all in one data file so you can't just directly access the resources. Maybe compressed was the wrong choice of word?


You want to avoid having multiple small files since:
1) no matter how small the file is it will always occupy atleast one block on the harddrive.

2) the OS will do its best to keep a single file stored in one large continuous block on the disc so that it can be read quickly, it will always be slower to read in multiple smaller files. (not only due to them being spread out physically, but also due to OS overhead with opening and closing files)

Share this post


Link to post
Share on other sites

This topic is 3485 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.

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