Releases: simgine/bevy_replicon
Releases · simgine/bevy_replicon
Bevy Replicon 0.31.1
Fixed
- Bump the
bevydependency to 0.15.3 since we use some fields that were made public in a patch release.
Bevy Replicon 0.31.0
Added
- Derive
DebugforFnsId. - Derive
DerefandDerefMutto underlying event inToClientsandFromClient. - Derive
PartialEqforRepliconClientStatus. SerializeCtx::type_registryandWriteCtx::type_registryto replicate components with reflection.
Changed
- Connected clients are now represented as entities with
ConnectedClientcomponents. Backends are responsible for spawning and despawning entities with this component.ClientIdis accessible fromConnectedClient::idin case you need an identifier that is persistent across reconnects. - Statistics for connected clients now accessible via
ClientStatscomponent. - Replicated entities now represented by connected clients with
ReplicatedClientcomponent. - To access visibility, use
ClientVisibilitycomponent on replicated entities. ServerEntityMapresource now a component on replicated entities. It now accepts entity to entity mappings directly instead ofClientIdtoClientMapping.- Replace statistic methods on
RepliconClientwithRepliconClient::stats()method that returnsClientStatsstruct. - Move
VisibilityPolicytoservermodule. - Move
ClientIdtoconnected_clientmodule and remove fromprelude. - Use
TestClientEntityinstead ofClientIdresource on clients inServerTestAppExtto identify client entity. - Rename
FromClient::client_idintoFromClient::client_entity. - Rename
registryin all event contexts intotype_registry. - Replace
bincodewithpostcard. It has more suitable variable integer encoding and potentially unlocksno_stdsupport. If you use custom ser/de functions, replaceDefaultOptions::new().serialize_into(message, event)withpostcard_utils::to_extend_mut(event, message)andDefaultOptions::new().deserialize_from(cursor)withpostcard_utils::from_buf(message). - All serde methods now use
postcard::Resultinstead ofbincode::Result. - All deserialization methods now accept
Bytesinstead ofstd::io::Cursorbecause deserialization fromstd::io::Readrequires a temporary buffer.Bytesalready provide cursor-like functionality. The crate now re-exported underbevy_replicon::bytes. - Use varint for
RepliconTickbecausepostcardprovides 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
ClientIdfromprelude. Most operations now done usingEntityas identifier. But it could be usefulStartReplicationtrigger. Just insertReplicatedClientto enable replication.ConnectedClientsandReplicatedClientsresources. Use components on connected clients instead.ClientConnectedandClientDisconnectedtriggers. Just observe forTrigger<OnAdd, ConnectedClient>orTrigger<OnRemove, ConnectedClient>. To get disconnect reason, obtain it from the ued backend.ServerSet::TriggerConnectionEventsvariant. We no longer use events for connections.
Bevy Replicon 0.30.1
Fixed
- Update
ReplicatedClientsimmediately to let users set visibility onClientConnectedtrigger.
Bevy Replicon 0.30.0
Added
- Export
core::entity_serdewith custom serde functions for entity.
Changed
StartReplicationis now a trigger-event.ServerEventnow split intoClientConnectedandClientDisconnectedthat are trigger-events.reasonfield inClientDisconnectednow storesDisconnectReasonenum.- Event serialization functions now accept
&mut Vec<u8>instead of&mut Cursor<Vec<u8>>. RepliconChannels::create_server_channelandRepliconChannels::create_client_channelnow acceptimpl Into<RepliconChannel>instead of justRepliconChannel.- 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 callApp::finishto configure the plugins properly. - Use
debug!instead oftrace!for events. They are not very verbose. - Rename
ServerSet::SendEventsintoServerSet::TriggerConnectionEvents. - Rename
core::event_registryintocore::event. - Rename
ClientEventsPluginintoClientEventPlugin(singular). - Rename
ServerEventsPluginintoServerEventPlugin(singular). - Rename
client::eventsintoclient::event(singular). - Rename
server::eventsintoserver::event(singular).
Fixed
ParentSync now correctly syncs the hierarchy if spawned before ClientSet::SyncHierarchy.
Bevy Replicon 0.29.2
Fixed
- Use
FromReflectwhen replicating components into dynamic scenes.
Bevy Replicon 0.29.1
Fixed
- Report bevy diagnostics correctly as a delta since last measurement collection.
Bevy Replicon 0.29.0
Added
- RTT, bytes per second and packet loss information for
RepliconClientandConnectedClients. ClientSet::Diagnosticsfor systems that collect client diagnostics.
Fixed
- Sending removals and despawns for hidden entities.
Changed
- Update to Bevy 0.15.
- Make
core::replication::replication_rules::ReplicationRulespublic. - Various optimizations for replication messages to use fewer bytes.
- Accept
Vec<u8>instead ofCursor<Vec<u8>>for serialization. ConnectedClientsnow storeConnectedClientinstead ofClientIdwith more information about the client.- All
TestFnsEntityExtnow acceptFnsId. - Move replication-related modules from
coremodule undercore::replication. - Move
Replicatedto thereplicationmodule. - Split the
ctxmodule and move event-related contexts undercore::events_registry::ctxand replication-related contexts undercore::replication_registry::ctx. - Separate paths from
diagnosticsmodule by/and their parent path nowclient/replicationinstead ofreplication/client. - Provide replication statistics by sum instead of per second and use
usizefor it. - Use fixed integer encoding for ticks for server events.
- Rename
ServerPlugin::change_timeoutintoServerPlugin::mutations_timeout. - Rename
ServerInitTickintoServerUpdateTick. - Rename
ReplicatedClient::init_tickintoReplicatedClient::change_tick. - Rename
ReplicatedClient::get_change_tickintoReplicatedClient::mutation_tick. - Rename
ReplicationChannel::InitintoReplicationChannel::Updates. - Rename
ReplicationChannel::UpdateintoReplicationChannel::Mutations. - Rename
ClientStatsintoClientReplicationStats. - Rename
ClientDiagnosticsPlugin::MESSAGESintoClientDiagnosticsPlugin::REPLICATION_MESSAGES. - Rename
ClientDiagnosticsPlugin::BYTESintoClientDiagnosticsPlugin::REPLICATION_BYTES. - Rename
ClientDiagnosticsPlugin::ENTITY_CHANGESintoClientDiagnosticsPlugin::ENTITIES_CHANGED. - Rename
ClientDiagnosticsPlugin::COMPONENT_CHANGESintoClientDiagnosticsPlugin::COMPONENTS_CHANGED.
Removed
FnsInfo, use(ComponentId, FnsId)instead.- Deprecated functions and structs from previous releases.
Bevy Replicon 0.28.4
Fixed
- Synchronize server events with init messages properly when
ServerTickis not updated every app tick.
Bevy Replicon 0.28.3
Changed
- Ignore replicated components that don't have type registration or missing
#[reflect(Component)]inscene::replicate_intoinstead of panicking. - Rename
has_authoritycondition intoserver_or_singleplayer. Old name still works, but marked as deprecated.
Bevy Replicon 0.28.2
Changed
- Make
ReplicatedClients::newpublic.