For games where data throughput and size is an issue, what do most people use for compression? Is it generally worthwhile using different strategies for say floating point data versus other stuff, or do most just compress everything with something like zlib and call it a day?
The specific case I have is an mmo client/server. I'm working on the scale of say something like Guild wars II or Eve online as far as requirements. Right now I'm able to track several thousand objects on the server side and do efficient neighbor queries on them, it's bandwidth that's becoming an issue. Sending the coordinates of 1000 players to the client is a lot of data, and that's just movement, I haven't even gotten into combat and other stuff that will bump it up even more.
So far this is what I'm doing to optimize location tracking:
- Use integers instead of floats. I don't generally need the precision for x,y movement coords.
- Send local grid coordinates not world coordinates.
- base 62 encoding of string id's
- don't send data if it hasn't changed since last update
- partial coordinates. Only send coordinate values that have changed by a certain threshold. So a client might get a vector with x being empty, which means use the last known value.
If anyone has ideas on best compression algorithms, or other tricks to keep bandwidth usage down, let me know!
Chris