Skip to content

Releases: simgine/bevy_replicon

Bevy Replicon 0.31.1

15 Mar 10:44
a12f730

Choose a tag to compare

Fixed

  • Bump the bevy dependency to 0.15.3 since we use some fields that were made public in a patch release.

Bevy Replicon 0.31.0

13 Mar 16:12
921032e

Choose a tag to compare

Added

  • Derive Debug for FnsId.
  • Derive Deref and DerefMut to underlying event in ToClients and FromClient.
  • Derive PartialEq for RepliconClientStatus.
  • SerializeCtx::type_registry and WriteCtx::type_registry to replicate components with reflection.

Changed

  • Connected clients are now represented as entities with ConnectedClient components. Backends are responsible for spawning and despawning entities with this component. ClientId is accessible from ConnectedClient::id in case you need an identifier that is persistent across reconnects.
  • Statistics for connected clients now accessible via ClientStats component.
  • Replicated entities now represented by connected clients with ReplicatedClient component.
  • To access visibility, use ClientVisibility component on replicated entities.
  • ServerEntityMap resource now a component on replicated entities. It now accepts entity to entity mappings directly instead of ClientId to ClientMapping.
  • Replace statistic methods on RepliconClient with RepliconClient::stats() method that returns ClientStats struct.
  • Move VisibilityPolicy to server module.
  • Move ClientId to connected_client module and remove from prelude.
  • Use TestClientEntity instead of ClientId resource on clients in ServerTestAppExt to identify client entity.
  • Rename FromClient::client_id into FromClient::client_entity.
  • Rename registry in all event contexts into type_registry.
  • Replace bincode with postcard. It has more suitable variable integer encoding and potentially unlocks no_std support. If you use custom ser/de functions, replace DefaultOptions::new().serialize_into(message, event) with postcard_utils::to_extend_mut(event, message) and DefaultOptions::new().deserialize_from(cursor) with postcard_utils::from_buf(message).
  • All serde methods now use postcard::Result instead of bincode::Result.
  • All deserialization methods now accept Bytes instead of std::io::Cursor because deserialization from std::io::Read requires a temporary buffer. Bytes already provide cursor-like functionality. The crate now re-exported under bevy_replicon::bytes.
  • Use varint for RepliconTick because postcard provides more efficient encoding for it.
  • Improve panic message for non-registered functions.
  • Allow update messages with mappings-only to map non-replicated entities.
  • Log bytes count on receive.

Fixed

  • Local re-trigger for listen server mode.

Removed

  • ClientId from prelude. Most operations now done using Entity as identifier. But it could be useful
  • StartReplication trigger. Just insert ReplicatedClient to enable replication.
  • ConnectedClients and ReplicatedClients resources. Use components on connected clients instead.
  • ClientConnected and ClientDisconnected triggers. Just observe for Trigger<OnAdd, ConnectedClient> or Trigger<OnRemove, ConnectedClient>. To get disconnect reason, obtain it from the ued backend.
  • ServerSet::TriggerConnectionEvents variant. We no longer use events for connections.

Bevy Replicon 0.30.1

07 Feb 00:55
af91293

Choose a tag to compare

Fixed

  • Update ReplicatedClients immediately to let users set visibility on ClientConnected trigger.

Bevy Replicon 0.30.0

03 Feb 23:33
927a8bf

Choose a tag to compare

Added

  • Export core::entity_serde with custom serde functions for entity.

Changed

  • StartReplication is now a trigger-event.
  • ServerEvent now split into ClientConnected and ClientDisconnected that are trigger-events.
  • reason field in ClientDisconnected now stores DisconnectReason enum.
  • Event serialization functions now accept &mut Vec<u8> instead of &mut Cursor<Vec<u8>>.
  • RepliconChannels::create_server_channel and RepliconChannels::create_client_channel now accept impl Into<RepliconChannel> instead of just RepliconChannel.
  • Event reading and writing systems are no longer exclusive, thanks to system builders! However, to achieve this, we now set them up in Plugin::finish. So if you have tests for events, don't forget to call App::finish to configure the plugins properly.
  • Use debug! instead of trace! for events. They are not very verbose.
  • Rename ServerSet::SendEvents into ServerSet::TriggerConnectionEvents.
  • Rename core::event_registry into core::event.
  • Rename ClientEventsPlugin into ClientEventPlugin (singular).
  • Rename ServerEventsPlugin into ServerEventPlugin (singular).
  • Rename client::events into client::event (singular).
  • Rename server::events into server::event (singular).

Fixed

ParentSync now correctly syncs the hierarchy if spawned before ClientSet::SyncHierarchy.

Bevy Replicon 0.29.2

06 Jan 00:48
f1eee4f

Choose a tag to compare

Fixed

  • Use FromReflect when replicating components into dynamic scenes.

Bevy Replicon 0.29.1

16 Dec 16:36
9826d5d

Choose a tag to compare

Fixed

  • Report bevy diagnostics correctly as a delta since last measurement collection.

Bevy Replicon 0.29.0

02 Dec 00:44
4db3a33

Choose a tag to compare

Added

  • RTT, bytes per second and packet loss information for RepliconClient and ConnectedClients.
  • ClientSet::Diagnostics for systems that collect client diagnostics.

Fixed

  • Sending removals and despawns for hidden entities.

Changed

  • Update to Bevy 0.15.
  • Make core::replication::replication_rules::ReplicationRules public.
  • Various optimizations for replication messages to use fewer bytes.
  • Accept Vec<u8> instead of Cursor<Vec<u8>> for serialization.
  • ConnectedClients now store ConnectedClient instead of ClientId with more information about the client.
  • All TestFnsEntityExt now accept FnsId.
  • Move replication-related modules from core module under core::replication.
  • Move Replicated to the replication module.
  • Split the ctx module and move event-related contexts under core::events_registry::ctx and replication-related contexts under core::replication_registry::ctx.
  • Separate paths from diagnostics module by / and their parent path now client/replication instead of replication/client.
  • Provide replication statistics by sum instead of per second and use usize for it.
  • Use fixed integer encoding for ticks for server events.
  • Rename ServerPlugin::change_timeout into ServerPlugin::mutations_timeout.
  • Rename ServerInitTick into ServerUpdateTick.
  • Rename ReplicatedClient::init_tick into ReplicatedClient::change_tick.
  • Rename ReplicatedClient::get_change_tick into ReplicatedClient::mutation_tick.
  • Rename ReplicationChannel::Init into ReplicationChannel::Updates.
  • Rename ReplicationChannel::Update into ReplicationChannel::Mutations.
  • Rename ClientStats into ClientReplicationStats.
  • Rename ClientDiagnosticsPlugin::MESSAGES into ClientDiagnosticsPlugin::REPLICATION_MESSAGES.
  • Rename ClientDiagnosticsPlugin::BYTES into ClientDiagnosticsPlugin::REPLICATION_BYTES.
  • Rename ClientDiagnosticsPlugin::ENTITY_CHANGES into ClientDiagnosticsPlugin::ENTITIES_CHANGED.
  • Rename ClientDiagnosticsPlugin::COMPONENT_CHANGES into ClientDiagnosticsPlugin::COMPONENTS_CHANGED.

Removed

  • FnsInfo, use (ComponentId, FnsId) instead.
  • Deprecated functions and structs from previous releases.

Bevy Replicon 0.28.4

15 Oct 16:12
e27d05c

Choose a tag to compare

Fixed

  • Synchronize server events with init messages properly when ServerTick is not updated every app tick.

Bevy Replicon 0.28.3

13 Sep 20:55
87cb003

Choose a tag to compare

Changed

  • Ignore replicated components that don't have type registration or missing #[reflect(Component)] in scene::replicate_into instead of panicking.
  • Rename has_authority condition into server_or_singleplayer. Old name still works, but marked as deprecated.

Bevy Replicon 0.28.2

09 Sep 17:48
c740527

Choose a tag to compare

Changed

  • Make ReplicatedClients::new public.