PDA

View Full Version : Kivi networking update 4


Shadow
03-12-2009, 11:11 AM
Let's see, last time I updated the progress of the networking stuff I was working on compressing the messages down to something reasonable and I had it down to ~6000 bytes per message. Since then I have compressed this down quite a bit. I twittered a lot of this, but the path seems kind of interesting to me, so I thought I would group all of the steps here.

1) starting message length - 8102 bytes
2) basic bit packing of core types - 6104 bytes
3) player delta compression - 4809 bytes
4) game delta compression - 4742 bytes
5) entity delta compression - 737 bytes
6) pack entnum & network object type to needed bits - 529 bytes
7) if entity hasn't changed only send 1 bit for change list - 248 bytes
8) arrays now use less bits for length (usually) - 233 bytes
9) when not needed no longer write change list size - 224 bytes
10) now change bits are compressed using a tree - 175 bytes
11) lowered entity send distance from 600 to 500 - 108 bytes
12) list of entities to delete and send nothing for unchanged entities - 59 bytes
13) packed a few more message specific stuff - 53 bytes

For the moment at least, I'm happy with the message sizes so I have moved on to reliability. I made commands guaranteed a while back, but now I can specify specific fields that can be guaranteed. Also all of the game setup messages have acks and will resend if any of them are lost.

That's actually most of what I need for reliability. Now I have a ton of little things to clear up and I need to figure out what to do about internet matchmaking.