Jump to content
  • Advertisement
Sign in to follow this  
lioil

Compression tools

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

What compression library are you used to compress your game? Any compression code good for in-game data compression? Is this a common way to save online traffic? Thank you so much for your kindly help in advance.

Share this post


Link to post
Share on other sites
Advertisement
What kind of "online traffic" savings are you talking about? People downloading the game data, or people playing a network game? These are two very different problems.

Share this post


Link to post
Share on other sites

What compression library are you used to compress your game? Any compression code good for in-game data compression? Is this a common way to save online traffic? Thank you so much for your kindly help in advance.


I'm not a game programmer but I like the library here -- http://quicklz.com . The price is based on the size of your company. Over the years I've seen many silly ways to price things. It's nice to come across a product where the pricing makes sense.

Brian Wood
Ebenezer Enterprises
http://webEbenezer.net

Share this post


Link to post
Share on other sites

What compression library are you used to compress your game? Any compression code good for in-game data compression? Is this a common way to save online traffic? Thank you so much for your kindly help in advance.



For live game update data, the best compression is to not send anything! Use the right networking model. Send commands instead of state. Send nothing (and interpolate) instead of commands.


Then, make sure you're not using a protocol with lots of overhead (such as remoting, or XMLRPC, etc), but instead an efficient protocol that understands that both ends are tightly integrated and already know how to frame/de-frame packets.


Finally, for bulk transfer, use something like 7-zip for things that can be pre-compressed (installers, level files, meshes, etc), and use gzip/deflate for anything that's "real-time" (typically used by web servers for compressing outgoing HTML etc).

Share this post


Link to post
Share on other sites
Thank you so much for all your replies. I am actually looking for a compression code in two ways, which can enhance network efficiency.

Share this post


Link to post
Share on other sites

[quote name='lioil' timestamp='1316479247' post='4863614']
What compression library are you used to compress your game? Any compression code good for in-game data compression? Is this a common way to save online traffic? Thank you so much for your kindly help in advance.



For live game update data, the best compression is to not send anything! Use the right networking model. Send commands instead of state. Send nothing (and interpolate) instead of commands.


Then, make sure you're not using a protocol with lots of overhead (such as remoting, or XMLRPC, etc), but instead an efficient protocol that understands that both ends are tightly integrated and already know how to frame/de-frame packets.


Finally, for bulk transfer, use something like 7-zip for things that can be pre-compressed (installers, level files, meshes, etc), and use gzip/deflate for anything that's "real-time" (typically used by web servers for compressing outgoing HTML etc).
[/quote]

Very nice and detailed explains. Thank you.


Share this post


Link to post
Share on other sites
For game on low-power devices, such as cellphones, i recommend LZ4.
It's free, it is BSD, you can embed it into your application without any restriction :
http://code.google.com/p/lz4/

There are 2 compressors version,
one is very fast, so you can use it for any "real-time" traffic scenario
one is very strong (LZ4-HC), so you can compress your typical game resource "offline", and just decode them at run time.
The decoder is the same for both, and incredibly fast. So fast that it's cheaper and faster to decode compressed data from flash memory than uncompressed one :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!