Currently server sends packet to each client each tick with those ushorts:
Count of commands, commands serialized length
Count of created entities, their serialized length
Count of removed entities, their serialized length
Count of changed components, their serialized length
Count of removed components, their serialized length
Meaning I send 20 bytes even when all of those counts is 0.
Will add bitmask as a first byte, that way when client will unpack packet - he will know what datatypes to look for.
In other words if there is nothing to send - we will send only 1 byte from server. (In turnbased games this is the most common case)
Currently server sends packet to each client each tick with those ushorts:
Meaning I send 20 bytes even when all of those counts is 0.
Will add bitmask as a first byte, that way when client will unpack packet - he will know what datatypes to look for. In other words if there is nothing to send - we will send only 1 byte from server. (In turnbased games this is the most common case)