Transfering Lots of data quickly in a net game

Blitz3D Forums/Blitz3D Programming/Transfering Lots of data quickly in a net game

Put all your update into a single packet so you can send it all in one go. ( This is probably obviously, but I do recall a certain MMORPG expert who was sending everything one byte at a time in his "optimized networking engine" so it's worth stating the obvious, just in case. )

Yes, you might find that once you've got your packet of data that compressing it, sending it and decompressing it again is faster. Or you might not. You'll have to experiment with that to see if and how much it helps. For BlitzMax this is easy, but I haven't done B3D in a long time. I'm sure somewhere around here there's a function or a library which can compress a bank, an array or a string or something in memory.

But don't rely on compression. Make sure you pack your data as well as you can even before compression, you may even find it means you don't need to use compression. Just think about each byte and whether it's being used to the fullest. Normally I wouldn't suggest optimizing things like booleans, but for networking, I just might consider packing eight booleans into a byte.