|
|
|
|
|
by Animats
1276 days ago
|
|
One tiny design error had huge implications. The UDP messages are multiple messages per packet with the form [msg_type variable_length_message]
There is no message length in the message. So, to parse the message stream, the receiver must know how to parse each message type in detail, and can't skip message types it doesn't understand. Thus, no new message types can be sent until everything that receives them has a parser for the new type. And, so, there have been no new message types since about 2016.Most game systems use [msg_type msg_length variable_length_message]
so you can introduce new messages and not break old receivers. |
|
It seems like there's an easy way to retrofit the protocol without breaking it for older clients (as long as older clients truncate packets once a message type is unknown). Put a new message type at the end of the packet, with a list of message start offsets in it. By including its own offset as the last element, the start of the list is easily found. The first message offset could be omitted, since it is implicitly zero.