Skip to content

0.0.12 - The big rewrite

Compare
Choose a tag to compare
@lucaspoffo lucaspoffo released this 19 May 22:40
· 73 commits to master since this release

This release comes with 3 major changes:

  • Rewrite of the reliability/fragmentation protocol, it should handle any bandwidth.
  • Split of renet and the transport layer. Now it's possible to use other transport protocols.
  • Configuration simplification

Most of the public API has stayed the same. With the split of the transport layer, you now need to create and update it separately from renet, but the setup is still very similar (renet comes with a default transport layer using renetcode). A lot of the work for this release was done in the internal fragmentation/reliability protocol, now it should handle any bandwidth. Also, you don't need a special configuration when sending bigger messages, the fragmentation is better and is done per message now.

Renet

Added ⭐

  • Added NetcodeServer and NetcodeClient all the network transport logic has been moved to these structs.
    • You can check the documentation, examples, or demos to see how these new structs are used.

Changed 🛠️

  • Replaced RenetConnectionConfig with ConnectionConfig, this new configuration has been greatly simplified. You only need to specify how many bytes you can use per update tick and the channels configuration (ChannelConfiguration).
  • Rework of ChannelConfiguration, only 3 fields now: channel_id, max_memory_usage_bytes, and send_type.
  • RenetServer::newand RenetClient::new now only has ConnectionConfig as argument.
  • Renamed RenetServer::is_client_connected to is_connected.
  • NetworkInfo has bytes_sent_per_second and bytes_received_per_second instead of sent_kbps and received_kbps.

Removed 🔥

  • Removed send_packets from RenetServer and RenetClient, this is now done by the transport layer.
  • Removed can_send_message, this could cause some bad practices of checking before sending messages. If you cannot send a message you should change the channels configurations.

Rechannel

Rechannel has been deprecrated, all its logic has been moved inside renet.

Bevy Renet

Added ⭐

  • Added new Plugins for the transport layer: NetcodeServerPlugin and NetcodeClientPlugin.
  • Client disconnects when the app closes.
  • Server disconnects all clients when the app closes.

Changed 🛠️

  • Removed the clear_events options, you can achieve the same functionality by adding the Events yourself before the Plugin.