XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

How much does compression help

Last post 6/28/2009 5:37 PM by mpipe. 3 replies.
  • 6/28/2009 8:28 AM

    How much does compression help

    I was looking at the forum and saw the 150 MB restriction and was wondering how much uncompressed data you could fit in a compressed 150 MB? ANyone got any idea?
  • 6/28/2009 12:58 PM In reply to

    Re: How much does compression help

    It depends entirely on what content you have.

    Textures and images can compress very well if you use JPEG and DXT compression.
    Data files vary wildly. If they're your own then you can compress them yourself by using a binary format and optimizing it. In some cases it might be even more efficient to use some kind of RL compression.
    XML takes up loads of space, unless you read and write it to compress it. XNA 3.1 now has automatic XNB serialization which makes the process very easy. However, it is still less efficient than using your own binary format, so carefully weigh the costs and benefits of using either method.
    Sounds and music probably take up the most. They are huge. You can compress them, but as with any compression, quality will suffer because of it.

    But in reality it shouldn't be a problem unless you're doing Kodu or maybe GTA: XBLIG Edition. Most games on there aren't even close to the limit.
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 6/28/2009 4:48 PM In reply to

    Re: How much does compression help

    That totally depends on what the data is.

    Note that there are three levels of compression:

    1) Data format compression. This means using DXT1 or DXT5 texture format instead of Color, for example, or writing a content processor that stores Position data as Half3 instead of Vector3, and Normal as Ubyte4N. This makes your data smaller by quantizing it, and accepting some precision trade-offs.

    2) Content file compression. When you build a release mode game, the .XNB files will by default be compressed using a zip-like algorithm. This can achieve good compression on some data, such as textures that have large areas of the same color, for example.

    3) CCGAME package compression. When all the data is combined into the CCGAME for distribution, the CCGAME file is compressed itself. If all your data is already XNB compressed, this will not gain much, but the EXE/DLL files will likely win from this. Also, data that is not XNB data (either your own custom data, or things like XACT wave banks) may gain, depending on the contents.

    The only way to find out how much it helps in a particular situation is to try it and measure it.

    Jon Watte, Direct3D MVP
    Tweets, occasionally
    kW X-port 3ds Max .X exporter
    kW Animation source code
  • 6/28/2009 5:37 PM In reply to

    Re: How much does compression help

    try working within the limit and see how creative you can be.
Page 1 of 1 (4 items) Previous Next