Skip to content

Reliable message preview 5

Pre-release
Pre-release
Compare
Choose a tag to compare
@gafferongames gafferongames released this 17 Jul 07:36

This release adds support for unreliable unordered message channels. You can select between CHANNEL_TYPE_RELIABLE_ORDERED (default) and CHANNEL_TYPE_UNRELIABLE_UNORDERED via the "type" parameter in ChannelConfig. See test_connection_unreliable_unordered_messages for an example of usage.

You can send both messages and blocks over an unreliable unordered channel, but blocks are serialized all at once rather than fragmented like they are in the reliable ordered channel. This is because unreliable unordered data is usually time critical so there is no point resending unacked fragments.

This is OK for small blocks right now, but large blocks that are too big to fit in the packet will be discarded. In the next release I will add support for packet fragmentation and reassembly, so you can bump up the maximum packet size to send large blocks unreliably, and packet fragmentation and reassembly will take care of fragmenting and reassembling any packets larger than MTU. This is a great strategy for large state update messages like snapshot deltas.