Im writing a small text based mmorpg and its going pretty good. Luckily im not stuck at the moment but I was told something a while ago and am now contemplating using it within the game. A friend suggested I should use zlib to compress my tcp packets both from the server and the clients and simply uncompress them each end as it could increase performance.
Heres my question.. Has anyone else tried this method to speed up traffic using tcp? I need to try and figure out if there will be any performance gain from having to compress and un-compress the other end rather than just sending data as normal. It might be a bit of an overkill aswell for a game which maybe only 20 people will be playing at once. I dont have any encryption at the moment with my data I simply sending ID numbers along with a number of different parameters. My data packets are not huge aswell they are in fact quite small. Perhaps the max size will be the odd packet of 1-2kb.
If anyone has any thoughts or experience in this matter I would appreciate hearing them.
Thanks in advance.