Sign in to follow this  
homojedi

Delta encoding?

Recommended Posts

Hi all, i asked some questions about delta encoding(compression) a few weeks ago and got some response's that were quite helpful and even some example's to examine in my own time, however due to uni i have not had time to get round to it. I'm now writing a report on network resource techniques and ive covered dead reckoning, and am writing a bit about delta encoding, but am having trouble explaining it, cause i don't fully understand it. From my knowledge the server continually sends packets until it gets an ack from the client it then takes the latest state and the clients last acked state and compresses the difference between them and sends that to the client to decompress and use. I assume the client can use this data as a way to interpolate from its current state through the delta state received. which seemed fair enough, but then i thought. well why not just send the latest state and the client can use dead reckoning to interpolate from its current state to the one sent, rather than increasing the packet size sent with all this delta information.... So yeah there must be something im not getting about delta encoding that makes it anymore useful than dead reckoning, can you use them in conjunction with each other, or are they to be used exclusively? cheers

Share this post


Link to post
Share on other sites
Quote:
why not just send the latest state

Let's assume you transmit (x,y) coordinates of entities. Some of them move, some of them don't.

Transmitting the latest state might look like this:
(2342,1706) (2344, 1702) (2334, 1700) (2351, 1712) ... [100 more]

whereas deltas might look like this:
(0,0) (1,0) (0,2) (2,0) (0,0) (0,0) ... [100 more]

Obviously the latter can be compressed into considerably less using simple standard compression schemes.

Share this post


Link to post
Share on other sites
Quote:

Let's assume you transmit (x,y) coordinates of entities. Some of them move, some of them don't.

Transmitting the latest state might look like this:
(2342,1706) (2344, 1702) (2334, 1700) (2351, 1712) ... [100 more]

whereas deltas might look like this:
(0,0) (1,0) (0,2) (2,0) (0,0) (0,0) ... [100 more]

Obviously the latter can be compressed into considerably less using simple standard compression schemes.


Furthermore, you may not have to transmit the ones that didn't change, depending on the data-compression you wish to use on top (huffman, ect...).

Transmitting the latest state might look like this:
id(0), x(2342), y(1706)
id(1), x(2344), y(1702)
id(2), x(2334), y(1700)
id(3), x(2351), y(1712)
... [100 times].

whereas deltas might look like this:
id(2), x(+1), y(+3)
id(8), x(-1)
id(45), x(+2), y(-1)
id(87), y(+4)
[only 4 positions changed, and only partially].



Regarding the previous thread, the delta-encoding in the example I presented is lossless. The state you wish to send from the server will be received on the client with no loss of information, and will be exactly the same (bugs none withstanding!). It's a sort of 'reliable' delivery of the latest state of information you want to present to the client.

Share this post


Link to post
Share on other sites

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