So, I have reached another problem while trying to implement my client-server communication. From everything I've read there are three main ways to minimize packet size:
- Only send what has changed to the client (Delta Compression)
- Only send what gameobjects are relevant to the client (Relevancy)
- With large packets, zip/compress them (L4Z?) [Not key for this question]
I have already implemented a delta compression scheme throughout my codebase using dirty bits and some interfaces. It's not as easy to use as I'd like, but it is decent and it works. Now I need to figure out how to add relevancy. I can certainly determine relevancy for each GameObject, but keeping track of all these deltas and which client has received them I think could get inefficient and complicated.
I considered having Players keep a NetworkComponent that tried to keep track of sending and maintaining what hasn't been sent, but I feel that could get complicated.
Advice on how to implement or improve either of these?