Jump to content
  • Advertisement

Archived

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

Karl G

Delta gamestates

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

Edit: I can see that nobody really gets what I'm trying to say. I did some more research on delta gamestates and I found out how/what they do, but heres one simple question: How do you do delta "compression": How does it "compress" information? [edited by - Karl G on August 17, 2003 1:44:03 PM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Put all ur important data in a first buffer, store that buffer. On the next update compute a second buffer ( make sure same order, and context as the first). Take the difference byte wise between the 2 buffers, the difference is the delta buffer. This delta buffer has various properites, one of which is that if your data doesnt'' change much there will be alot of zeros in it.

Because of this, u can use a simple compression algoithim called Run Length Encoding to reduce the runs of zeros into a more compact form. The resulting buffer is then sent to the client. And all the operations are done in reverse to retrive the original 2nd buffer. This presumes the client has the first buffer already.

if you have access to a more advance compression lib, like zlib u can give it the delta buffer and it can compress it using huffman compression as well as RLE. The resutling compact buffer should be smaller than the RLE buffer alone, ofcourse this is a tradeoff between cpu vs speed.

-ddn

Share this post


Link to post
Share on other sites
Compression is a means by which we reduce the amount of information we need to store/transmit.

Once you have a data buffer, you can run an algorithm against it to compress it. Then at the other end, you run the reverse algorithm to de-compress it so that you have the original data. It is very important in this case to use a lossless compression so that you don''t lose any data.





"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan

Share this post


Link to post
Share on other sites
Then what happens when an ACK packet is lost from the client to the server? If I''m understanding correctly, that would throw off the entire system...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The scheme is very brittle if you constantly update the master buffer ( the buffer from which the delta are generated ) but usually the master buffer has a lifetime on the order of seconds and has resync protocols in place if it''s not recived in time.

Its a type of running compression.

-ddn

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!