0
\$\begingroup\$

I am working on packaging my game resources into a single file. I have chosen the format but I don't know whether I should use compression or not. I understand the possible pros and cons:

  1. Compression means less installation time (happens rarely).
  2. Compression means less game size on the disc and during downloading process.
  3. Compression means the data should be extracted every time the game resource cache mechanism decides to cache some data in RAM from the archive.

Did I miss anything? What do other game developers usually do and why?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Depends entirely on a lot of details about your game. Not sure if this fits our format, but is great for discussion in the Game Development Chat. \$\endgroup\$
    – Almo
    Commented Sep 7, 2017 at 16:06
  • 1
    \$\begingroup\$ Note that decompressing on the fly can actually be faster than reading the data raw in some circumstances. Processors are so blazingly fast compared to storage drives (especially optical drives) that the time spent decompressing can be less than what you would have spent reading the extra uncompressed file size, if the data compresses well. But as Almo notes, this depends on your situation: what content you're accessing, in what format, from what storage media, on what device, and whether you have spare cycles to throw at the decompressor. Add these details to your question to narrow it down \$\endgroup\$
    – DMGregory
    Commented Sep 7, 2017 at 16:35

1 Answer 1

1
\$\begingroup\$

Why don't you grab the best part of both sides and compress files to download, then extract them on installation?

This way you will have less data to transfer during download (so faster download), some overhead on installation (theoretically, once?) and then better runtime performance.

\$\endgroup\$
2
  • \$\begingroup\$ I have thought about mixing two options. Could you also tell about compression at runtime, I doubt it is used by anyone but I am not a specialist to allege this. \$\endgroup\$
    – VP.
    Commented Sep 7, 2017 at 15:17
  • \$\begingroup\$ @VictorPolevoy I'm not experienced in the topic but I think it's pretty much like "why would you keep the file compressed during runtime if it's not mandatory?". It would OFC depend on the size of data, platform limitations, etc. So my answer is a thought for a case scenario without limitations/big size issues. Just think about what's the REAL performance impact and what's more important for your UX in case there is an actual impact, game installation/loading time or maybe a couple of frames? A post in the topic stackoverflow.com/questions/11257218/… \$\endgroup\$ Commented Sep 7, 2017 at 15:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .