All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
ReplicationUserdataandUserdataReceivedto attach custom data to replication messages.DiffIndex::wrapping_cmpto compare indices.
- Removing
Replicatedfrom an entity now stops replication without despawning the entity on clients. Client-side despawns ofRemoteentities clean up theirServerEntityMapmappings. Despawning an entity still replicates as despawn. RepliconTickno longer implementsOrdorPartialOrd, because these traits require transitivity. Use thewrapping_cmpmethod instead, or helpers likeis_newerandis_older.- Replace
TrackAppExt::track_mutate_messagesfunction withServerPlugin::track_mutate_messagesfield. This setting no longer affects the protocol hash and can be set only on the server. ServerMutateTicksnow always present withClientPlugin.- Rename
DiffIndex::is_newer_thantoDiffIndex::is_newer.
0.41.1 - 2026-06-24
- Incorrect assertion during entity spawning.
0.41.0 - 2026-06-24
- Diff-based replication for components via
replicate_diff. AllExceptfilter scope andVisibilityScope::AllExceptas a counterpart toComponents. When aVisibilityFilterdenies visibility, every component except the listed ones is hidden. Useful for replicating a stripped-down entity (e.g. only its transform and light) to clients outside its full visibility range.ReplicationStorageresource for storing arbitrary serialization/deserialization state.SerializeCtx::entityandWriteCtx::entitywith the current entity.
- Update to Bevy 0.19.
DeferredEntity::flushnow consumes the entity.- Rename
scenemodule and feature intoworld_serialization. - Rename
DeferredChangesintoEntityScratch.
0.40.4 - 2026-06-16
DeferredEntity::get_components_mutandDeferredEntity::get_components_mut_uncheckedto get multiple components mutably.DeferredEntity::remove_with_requiresandremove_with_requireshelper to customize the removal replication.
- Visibility scope registration now allows up to
u32::BITSscopes instead of incorrectly panicking afteru8::BITSscopes. - Avoid potential UB from aliasing the world during entity spawning.
0.40.3 - 2026-06-02
ServerMutateTicks::last_confirmed_tickto check the most recently reported fully received mutation tick.
0.40.2 - 2026-05-23
- Don't schedule systems when no messages/events for them have been registered.
0.40.1 - 2026-05-17
SendModenow available frompreludeto simplify the migration.
0.40.0 - 2026-05-17
- Shared messages and events via
SharedMessageAppExtandSharedEventAppExt. Emitted asLocalOrRemote<M>on both the sender and the receiver to allow shared logic for client-side prediction. iter_receivedanditer_sentmethods onClientMessagesandServerMessagesto inspect inbound and outbound messages on a channel without consuming them.
ServerMessages::retain_sentis now public, allowing users to filter outbound messages before the backend drains them.VisibilityFiltertrait and related types moved to theshared::replication::visibilitymodule and no longer feature gated by theserverfeature.Replicatedis no longer automatically inserted on clients, onlyRemote.scene::replicate_intowill serialize all entities that have eitherRemoteorReplicated.- Rename
SendMode::BroadcastintoSendTargets::All - Rename
SendMode::BroadcastExceptintoSendTargets::AllExcept - Rename
SendMode::DirectintoSendTargets::Single - Rename
ToClients::modeintoToClients::targets
0.40.0 - 2026-04-26
- Don't panic when receiving acks from disconnected clients (backends might not discard messages immediately, allowing to react to them).
0.39.4 - 2026-04-08
- Deferred component insertions no longer cause undefined behavior.
0.39.3 - 2026-04-05
- Visibility is now properly updated when
VisibilityFilterandVisibilityFilter::ClientComponentare not the same type.
0.39.2 - 2026-04-01
- Entities spawned during component deserialization now also get the
Remotemarker.
0.39.1 - 2026-03-09
- Don't panic when despawning hierarchy with signatures.
0.39.0 - 2026-02-24
Remotecomponent that automatically inserted on entities spawned by replication.SendMode::SERVER_ONLYandSendMode::CLIENTS_ONLYconstants for convenience.command_fns::write_if_neqbuilt-in to avoid writing component if the value didn't change.DeferredEntity::world_mutto access world mutable during replication.
VisibilityFilternow allows expressing more complex rules:- A new
ClientComponentassociated type allows specifying a different component for client entities. UseSelfto preserve the previous behavior. - In
is_visible,selfnow refers to the entity component, and the client component is passed into the function. - The passed component is now wrapped in an
Optionto allow customizing behavior when the component on the client is missing. is_visiblenow accepts the client entity.
- A new
AuthorizedClientandConnectedClientnow immutable.ClientStatsnow represents only current client statistics. Use theConnectedClientStatscomponent for connected client statistics on the server.ConditionerConfignow represents configuration only for a connected client on the server. Use theGlobalConditionerConfigresource for global server or client configuration.ServerPlugin::tick_schedulenow wrapped in anOption. You can set it toNoneto trigger replication by manually incrementingServerTick.- Make
ClientMessages::received_countpublic. - Make
increment_tickpublic. - Rename
ComponentScopeintoSingleComponent. - Rename
command_markersmodule intoreceive_markers. - Rename
command_fnsmodule intoreceive_fns. - Rename
AppMarkerExt::set_command_fnsintoAppMarkerExt::set_receive_fns.
LinkConditionerPlugin. It was used to addConditionerConfigtoAppTypeRegistry, but it's now done automatically.
0.38.2 - 2026-01-22
- Ack cleanup and message timestamps are no longer affected by time dilation.
0.38.1 - 2026-01-19
- Overflow on reconnect when
client_diagnosticsfeature is enabled.
0.38.0 - 2026-01-17
- Update to Bevy 0.18.
0.37.2 - 2026-01-11
- Skip
TrackAppExt::track_mutate_messagesif it has already been called.
0.37.1 - 2025-12-14
- Ignore received replication for entities that was despawned by the client.
0.37.0 - 2025-12-03
- Component-based visibility API, which works similarly to layers in physics. See
AppVisibilityExtfor more details. EntityEventimpl forToClientsandFromClient.
ClientVisibilitycan still be used, but it is now a low-level layer that operates on bits. For most cases, it is better to use the new high-level API.- Include
TrackAppExt::track_mutate_messagesin the replication protocol, since it affects the serialization format. - Better memory reuse for client components.
- Avoid sending despawn for entities that weren't sent.
- Replication for rules with multiple components when their insertions were split across multiple ticks.
- Avoid panicking when
Signatureinserted during replication. - Send mappings only for entities with
Replicated. - After disconnecting, clients no longer resend buffered messages locally.
VisibilityPolicy. No longer needed because visibility is now ergonomically controlled by filters.ClientSystems::ResetEvents. Events now reset duringClientSystems::Resetlike everything else.
0.36.1 - 2025-10-11
- Check mutation ticks for overflow to avoid issues with long-running sessions.
- Log short type names.
0.36.0 - 2025-10-04
Debugderive forFromClient.
- Replication of entities spawned without components before connection.
- Rename
client_event_registrymodule intoregistry. - Replace "event" with "message" and "trigger" with "event" in types, methods and modules according to the new naming in Bevy.
- Split
RemoteMessageRegistry::*_channelmethods for messages and events into dedicated methods for each type.
trigger_*_targets. Targets in Bevy now stored inside events. When you move entities to your events, dont't forget to useregister_*_event_mappedin order to properly map them.
0.35.1 - 2025-10-03
- Log state changes.
0.35.0 - 2025-09-26
PriorityMapcomponent for authorized clients to control how often mutations are sent.Signaturecomponent to match entities between client and server using hashes.*_filteredmethods forAppRuleExtthat allow usingWith,WithoutandOrfilters to define replication rules.compact_entitywith functions forserdeto packEntitymore efficienly.postcard_utils::entity_to_extend_mutandpostcard_utils::entity_from_bufhelpers that usecompact_entity.AppRuleExt::replicate_bundle_withto customize the priority of the bundle.AppRuleExt::replicate_as*functions to convert the component into a different struct before serialization and after deserialiation.
- Rename
RepliconClientStatustoClientStateandRepliconServerStatustoServerState. They are now regular Bevy states. As result, we now requireStatesPluginto be added. It's present by default inDefaultPlugins, but withMinimalPluginsyou have to add it manually. - Replace
ServerPlugin::tick_policywithServerPlugin::tick_schedule, which specifies the schedule where the tick increments. By default, it'sFixedPostUpdate. You can control how often it runs withTime<Fixed>resource. If you want to mimicTickPolicy::EveryFrame, set the schedule toPostUpdate. - All contexts now store
AppTypeRegistryinstead ofTypeRegistry. To getTypeRegistry, callAppTypeRegistry::read. - All events now use
ClientIdwrapper instead ofEntity. AppTypeRegistrynow available on replication for observers.postcard_utilsnow a top-level module. Instead ofbevy_replicon::shared::postcard_utils, it's now justbevy_replicon::postcard_utils.- Rename
FromClient::client_entityintoFromClient::client_id. - Rename
DisconnectRequest::client_entityintoDisconnectRequest::client. - Rename
SendRateintoReplicationMode. TheEveryTickvariant was also renated intoOnChange. - Rename
ClientSetintoClientSystems. - Rename
ServerSetintoServerSystems. - Rename
ComponentRule::send_rateintoComponentRule::mode. - Rename
replicon_channelsmodule intochannels. - Rename
replication_rulesmodule intorules. - Rename
replication_registrymodule intoregistry. - Rename
IntoComponentRule::register_componenttoIntoComponentRule::into_ruleand move it to theshared::replication::rules::componentmodule. - Rename
NetworkStatstoClientStatsand move it fromshared::backend::connected_clienttoshared::backend. It's also now a separate resource fromRepliconClient. - Rename
RepliconClientintoClientMessages. It holds only messages now. - Rename
RepliconServerintoServerMessages. It holds only messages now. - Replace
IntoReplicationRulewithIntoComponentRules, which returns onlyVec<ComponentRule>. - Replace
ReplicationBundlewithBundleRules, which returns onlyVec<ComponentRule>and uses an associated constant to customize the priority. - Hide
ServerEntityMapmutation methods from public API. - Hide
BufferedMutationsfrom public API. - Hide
server::increment_tickfrom public API. ExampleClient::newnow acceptsimpl Into<SocketAddr>. This makes it easier for backend developers to port examples since they usually specify IP address.- Switch from the FNV hasher to xxh3. It's faster and produces high-quality hashes. The hasher is now also wrapped in deterministic-hash, which ensures consistent endianness and handles
usizeportably.
ClientEntityMap. Use the newly addedSignaturecomponent instead.VisibilityPolicy::All. UseVisibilityPolicy::Blacklistinstead, which is the default now. There are not performance difference when the list is empty.entity_serde::serialize_entityandentity_serde::deserialize_entity. Usepostcard_utils::entity_to_extend_mutandpostcard_utils::entity_from_bufrespectively; just swap the argument order.SERVER. UseClientId::Serverinstead.SendRate::Periodic. UsePriorityMapinstead.TickPolicy. Set the schedule directly toServerPlugin::tick_schedule.- All provided run conditions. Just use
in_stateorOnEnter/OnExitwithServerStateandClientStateinstead.server_or_singleplayeris justin_state(ClientState::Disconnected).
0.34.4 - 2025-07-29
- Make
DeferredEntity::new,DeferredEntity::flushandDeferredChangespublic.
0.34.3 - 2025-07-01
- Make
ProtocolHashdeterministic across platforms by usingfnvinstead offoldhash. - Reset
ServerMutateTickson disconnect. - Avoid calling
dropon uninitialized memory for components withBoxorArcduring buffered insertion.
0.34.1 - 2025-06-21
- Log replication errors instead of panicking. We use panics only for things that should never happen, but users could sometimes trigger them by messing with entities, so we now log these errors to simplify debugging in those cases.
- Spawn all allocated entities after processing each replicated entity.
0.34.0 - 2025-06-15
- Authorization system. By default we just verify compatibility between client and server, but it's customizable via
RepliconSharedPlugin::auth_method. - Configurable
SendRatefor deterministic replication. UseSendRate::Onceto send only the initial value, orSendRate::Periodicto only sync the state periodically. AppRuleExt::replicate_with_priorityto configure replication rule priority.DisconnectRequestevent to queue a disconnection for a specific client on the server.ServerTriggerAppExt::make_trigger_independent.
AppRuleExt::replicate_withnow acceptsIntoReplicationRuletrait that allows to define rules with multiple components.- Rename
GroupReplicationintoBundleReplication. - Rename
ReplicatedClientintoAuthorizedClient. - Rename
AppRuleExt::replicate_groupintoAppRuleExt::replicate_bundle. - Rename
replication_registry::despawn_recursiveintoreplication_registry::despawn. - Rename
shared::event::triggermodule intoshared::event::remote_targets. - Rename
ServerEventAppExt::make_independentintoServerEventAppExt::make_event_independent. It never worked for triggers. ReplicationRulenow storesVec<ComponentRule>instead ofVec<(ComponentId, FnsId)>RuleFnsnow available from prelude.- Initialize channels in
App::finishinstead ofStartup. It's called automatically onApp::run, but in tests you need to callApp::finishmanually. - Rules created with the same priority now evaluated in their creation order.
- Component removals and insertions for an entity are now buffered and applied as bundles to avoid triggering observers without all components being inserted or removed. This also significantly improves performance by avoiding extra archetype moves and lookups.
- The
Replicatedcomponent is no longer automatically inserted into non-replicated entities spawned from replicated components. - Replace
ServerEntityMap::get_by_*andServerEntityMap::remove_by_*with an entry-based API. UseServerEntityMap::server_entryorServerEntityMap::client_entryinstead. - Split
ReplicationChannelintoServerChannelandClientChannelfor clarity. - Don't register an additional unreliable client channel for replication. While the server requires two channels, the client only needs one.
- Print error instead of panic on mapping overwrite in
ServerEntityMap. - Making
tracelogging level less verbose and more informative.
WriteCtx::commands. You can now insert and remove components directly throughDeferredEntity.RepliconClient::receiveandRepliconServer::receiveare now private since they should only be called internally by Replicon.ServerPlugin::replicate_after_connect. UseRepliconSharedPlugin::auth_methodwithAuthMethod::Custominstead.- Deprecated methods.
0.33.0 - 2025-04-27
- Don't unwrap systems.
- Support for
no_std. - Relationships networking. Use
SyncRelatedAppExt::sync_related_entities<C>to ensure that entities related byCare replicated in sync. - Seamless support for immutable components. For these components, replication is always applied via insertion.
server_just_startedrun condition.
- Update to Bevy 0.16.
- All serde methods now use
bevy::ecs::error::Resultinstead ofpostcard::Resultfor more informative errors. AppRuleExt::replicate_mapped,RuleFns::default_mappedanddefault_deserialize_mappednow deprecated. Entities inside components now mapped automatically, use methods without_mappedprefixes.- Use an observer instead of a system to track despawns.
parent_syncmodule and corresponding feature. Just replicateChildOfdirectly.
0.32.2 - 2025-04-16
- Preserve removals before inserts
0.32.1 - 2025-04-05
- Publicize
ClientTickscomponent and itsupdate_tickmethod.
0.32.0 - 2025-03-24
RemoteEventRegistryto get channels for remote triggers and events.ConditionerConfigforbevy_replicon_example_backendto simulate various network conditions.
- Rename
ChannelKindinto justChannel. - Rename
channelsmodule intoreplicon_channels. - Rename
coremodule intosharedandRepliconCorePluginintoRepliconSharedPlugin. To avoid ambiguity with Rust'score, which will be used forno_stdsupport in the next release. - Move
replicon_server,replicon_client,connected_clientandreplicon_channelsunderbackendmodule to group all backend-related API. - All methods with
Into<Channel>now just acceptChannel. - Use
usizefor channel ID. Backends now decide how many channels user can create. - Don't insert
ClientVisibilityat all ifServerPlugin::visibility_policyis set toVisibilityPolicy::All. Previously all calls were just no-op.
RepliconChanneland all methods fromRepliconChannels, except channel getters. Now all channel configuration needs to be done on the backend side.
0.31.1 - 2025-03-15
- Rename
ClientIdintoNetworkIdand derive serde traits. - Move
ConnectedClient::idinto a separate optional component for backends that doesn't provide persistent identifiers.
- Bump the
bevydependency to 0.15.3 since we use some fields that were made public in a patch release.
ConnectedClient::new, you can now construct the struct directly.
0.31.0 - 2025-03-13
- Derive
DebugforFnsId. - Derive
DerefandDerefMutto underlying event inToClientsandFromClient. - Derive
PartialEqforRepliconClientStatus. SerializeCtx::type_registryandWriteCtx::type_registryto replicate components with reflection.
- 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 to identify which client belongs to which connection. - 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::statsmethod 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.
- Local re-trigger for listen server mode.
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.
0.30.1 - 2025-02-07
- Update
ReplicatedClientsimmediately to let users set visibility onClientConnectedtrigger. - Send and receive on packet split in the example backend.
0.30.0 - 2025-02-04
- Export
core::entity_serdewith custom serde functions for entity.
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).
ParentSync now correctly syncs the hierarchy if spawned before ClientSet::SyncHierarchy.
0.29.2 - 2025-01-06
- Use
FromReflectwhen replicating components into dynamic scenes.
0.29.1 - 2024-12-16
- Report bevy diagnostics correctly as a delta since last measurement collection.
0.29.0 - 2024-12-02
- RTT, bytes per second and packet loss information for
RepliconClientandConnectedClients. ClientSet::Diagnosticsfor systems that collect client diagnostics.
- Sending removals and despawns for hidden entities.
- 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.
FnsInfo, use(ComponentId, FnsId)instead.- Deprecated functions and structs from previous releases.
0.28.4 - 2024-10-15
ComponentIdto all component-related contexts.
- All custom functions now accept the newly added
DeferredEntityinstead ofEntityMut. This new entity type provides read-only access to the world.
- Synchronize server events with init messages properly when
ServerTickis not updated every app tick.
0.28.3 - 2024-09-13
- 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.
0.28.2 - 2024-09-09
- Make
ReplicatedClients::newpublic.
0.28.1 - 2024-09-04
- Client event buffering.
0.28.0 - 2024-09-03
ServerEventAppExt::make_independentto let events be triggered without waiting for replication on the same tick.ConnectedClients(the same name as the old resource that was renamed intoReplicatedClients) with client IDs for all connected clients (but may not be replicated yet).ServerPlugin::replicate_after_connectto enable replication right after connection (enabled by default, same as old behavior).
- Rename
connected_clientsintoreplicated_clients. - Rename
ConnectedClientstoReplicatedClients. - Rename
ConnectedClienttoReplicatedClient.
- Emit an error instead of panic on events deserialization on client.
- Buffering for events that have mapped entities.
0.27.0 - 2024-07-04
- Update to Bevy
0.14.0. - Move
bevy_replicon_renetto a dedicated repository. ServerEventsPluginandClientEventsPlugincan be disabled on client-only and server-only apps respectively.- Put
ClientDiagnosticsPluginunderclient_diagnosticsfeature (disabled by default) and make it part of theRepliconPluginsgroup. - Put
scenemodule underscenefeature (enabled by default). - Put
parent_syncmodule underparent_syncfeature (enabled by default). - Put
clientmodule underclientfeature (enabled by default). - Put
servermodule underserverfeature (enabled by default). TestFnsEntityExt::serializenow acceptsRepliconTickfor server tick instead of usingServerTickresource internally.- Move
replicon_client,server_entity_map,replicon_server,connected_clientsundercoremodule. These modules are needed for both client and server. - Move
VisibilityPolicytoconnected_clientsmodule. - Move
server::events::event_datamodule tocore::event_registry::server_event. - Move
client::events::event_datamodule tocore::event_registry::client_event. - Move
ClientEventAppExt,client::events::SerializeFn,client::events::DeserializeFn,default_serialize,default_serialize_mapped,default_deserializeandFromClienttocore::event_registry::client_event. - Move
ServerEventAppExt,server::events::SerializeFn,server::events::DeserializeFn,default_serialize,default_serialize_mapped,default_deserialize,ToClientsandSendModetocore::event_registry::server_event. - Speedup removals caching.
- Do not divide values per seconds by the number of messages for
ClientDiagnosticsPlugin.
0.26.3 - 2024-06-09
- Logging for sending and receiving messages.
- Do not send empty ack messages from client.
0.26.2 - 2024-06-05
Debug/Clonederives toServerEvent.Debug/Copy/Clonederives toTickPolicy.ClientSet::SyncHierarchyforParentSyncupdates.
0.26.1 - 2024-05-27
- Regression in server events reset logic.
0.26.0 - 2024-05-26
ClientEventsPluginandServerEventsPluginthat are required for events (available from theRepliconPluginsgroup). Can be disabled if you don't use them.
- Custom events are now registered with serialization and deserialization functions instead of systems. This makes the API more convenient since the purpose of custom systems was to customize serialization.
- All events are processed in one system instead of a separate system for each event. Bevy does a similar optimization for event updates. It won't be that noticeable since users register much fewer replicon events.
- Rename
ConnectedClient::change_tickintoConnectedClient::init_tick. - Rename
ConnectedClient::get_change_limitintoConnectedClient::get_change_tick. - Rename
ConfirmedintoConfirmHistory. - Rename
replicon_channelsmodule intochannels. - Rename
replication_fnsandReplicationFnsintoreplication_registryandReplicationRegistry. - Rename "packets" into "messages" in client diagnostics.
bevy_replicon_renetnow properly setsRepliconClientStatus::ConnectingwhenRenetClientis connecting.
0.25.3 - 2024-05-24
- Fix replication with a removal at the same tick.
0.25.2 - 2024-05-18
- Fix replicating previously spawned entities to a newly connected client with visibility policy different from
VisibilityPolicy::All.
0.25.1 - 2024-05-16
- Fix possible overflow in
Confirmed::contains_any.
0.25.0 - 2024-05-11
AppMarkerExtto customize how components will be written based on markers present without overriding deserialization functions. Now third-party prediction crates could be integrated much easier.AppRuleExt::replicate_groupandGroupRegistrationtrait to register and customize component groups. A group will be replicated only if all its components present on an entity.ServerSet::StoreHierarchyfor systems that store hierarchy changes inParentSync.- More tracing.
Debugimpl forRepliconClientStatus.
SerializeFnnow accepts regularCinstead ofPtr.DeserializeFnnow does only deserialization and returnsC. Use the newly added marker-based API if you want to customize how component will be written. See docs forAppMarkerExtfor details.- Rename
AppReplicationExtintoAppRuleExt. AppRuleExt::replicate_withnow acceptsRuleFnsstruct with functions. You no longer can customize removals this way, use the mentioned marker-based API instead.- Writing to entities on client now done via
EntityMutandCommandsinstead ofEntityWorldMut. It was needed to support the mentioned in-place deserialization and will possibly allow batching insertions in the future (for details see bevyengine/bevy#10154). - Return iterator from
RepliconClient::receiveinstead of popping the last message. If you usedwhileloop with it before, replace it withfor. - Use new
ServerInitTickresource on client instead ofRepliconTick. If you usedServerEventAppExt::add_server_event_with, useServerInitTickinstead ofRepliconTickin your receive function. - Use new
ServerTickresource on server instead ofRepliconTick. - Replace
ServerEntityTickswithConfirmedcomponent. The component now also stores whether the last 64 ticks were received. - Now serialization/deserialization, removal, despawn and writing functions accept context to access additional information.
- Move
replicon_tickmodule underservermodule since now it's used only on server. - Move
Replicationtocoremodule. - Move all functions-related logic from
ReplicationRulesinto a newReplicationFnsand hideReplicationRulesfrom public API. - Move
despawn_recursiveintoreplication_fnsmodule. - Rename
serialize_componentintodefault_serializeand move intorule_fnsmodule. - Rename
deserialize_componentintodefault_deserializeand move intorule_fnsmodule. - Rename
deserialize_mapped_componentintodefault_deserialize_mappedand move intorule_fnsmodule. - Rename
remove_componentintodefault_removeand move intocommand_fnsmodule.
dont_replicatemodule. Use the newly addedAppRuleExt::replicate_groupor newtypes.
- Reversed order of the received messages from
RepliconClient.
0.24.1 - 2024-03-07
- Fix compilation issue when multiple
PartialEqimpls are present forusize.
0.24.0 - 2024-03-06
- Provide
ServerTestAppExtextension trait for exchanging messaging between apps in tests.
- Rename
ReplicationintoReplicated. Old name is still available via deprecated alias. - Abstract out all I/O and
renetdependency. We will continue to provide first-party integration with renet viabevy_replion_renet. But users can write their integration with other messaging libraries. So now users need to additionally add messaging-related plugin. In case ofbevy_replion_renetit'sRepliconRenetPlugins. - Replace usage of
RenetServerandRenetClientwith ourRepliconServerandRepliconClientrespectively. Use types fromrenet(or other library) only when you need to connect / disconnect or write some library-specific logic. In other cases prefer using the newly provided types to make your code messaging-library independent. Unlike the old types from renet, these resources are always present in the world. So instead of usingresource_(exists/added/removed)for network-related conditions, use special conditions provided incommon_conditionsmodule. - Move
has_authoritytocommon_conditionsmodule. - Replace conditions from
renetwith ours, seecommon_conditionsmodule. Available inprelude. - Replace usage of
ClientIdfromrenetwith our own with the same name. In user code only the one frombevy_repliconshould be used. - Replace
SERVER_IDconstant withClientId::SERVER. - Replace use of
RenetConnectionStatuswith ourRepliconClientStatus. - Replace
ServerEventfromrenetwith our own with the same name. In user code only the one frombevy_repliconshould be used. - Rename
replicon_coremodule intocore. - Rename
EventTypeintoChannelKindand move intocoremodule. - Replace usage of renet's
SendTypewith ourRepliconChannel. - Rename
NetworkChannelsintoRepliconChannelsand move intoreplicon_channelsmodule. - Rename
ReplicationChannel::ReliableandReplicationChannel::UnreliableintoReplicationChannel::InitandReplicationChannel::Updaterespectively. - Channel creation methods in
RepliconChannelsnow acceptRepliconChannelwith full channel configuration. - Make
default_max_bytesfield inRepliconChannelspublic. - Move
RepliconChannels::get_server_configsandRepliconChannels::get_client_configsto create channels configs forrenetintoRenetChannelsExtextension trait provided bybevy_replion_renet. Make sure to import it to use these methods. - Move
ClientEntityMapandClientMappingtoclient_entity_mapsubmodule. - Rename
ReplicationPluginsintoRepliconPlugins. - Rename
ClientCacheintoConnectedClients. - Rename
ClientStateintoConnectedClient. - Replace
RepliconChannels::set_client_max_bytesandRepliconChannels::set_server_max_byteswithRepliconChannels::server_channel_mutandRepliconChannels::client_channel_mutrespectively with more rich configuration. - Move
ClientEventChanneltoclient_eventmodule. - Move
ServerEventChanneltoserver_eventmodule. ClientMapper,ServerEntityMap,BufferedUpdates,ReplicationRules,ReplicationChannel,ClientEventChannel,ServerEventChannel,ServerEventQueueandEventMapperare no longer inpreludemodule. Import them directly.
0.23.0 - 2024-02-22
- Common conditions now follow the new pattern without returning a closure.
MapperandMapNetworkEntitiesin favor ofEntityMapperandMapEntitiesintroduced in Bevy 0.13.0
- Make
scene::replicate_intoupdate previously added entities.
0.22.0 - 2024-02-17
- Change
ClientEventAppExt::add_mapped_client_eventto clone the events instead of draining them. This means that mapped client events must now implementClone
- Misuse of
Vec::reservethat would cause excess allocations.
0.21.2 - 2024-01-27
- Increase publicity of
ClientStateAPI.
0.21.1 - 2024-01-22
ClientCache::visibility_policyreturns the configured policy.
0.21.0 - 2024-01-22
- Control over client visibility of entities.
- Rename
ClientsInfointoClientCache. - Rename
ClientInfointoClientState. - Allow calling
dont_replicate::<T>with the insertion ofTinstead of afterReplicationinsertion. dont_replicate::<T>can panic only indebug_assertionsis enabled.
0.20.0 - 2024-01-13
- API for custom server messages now uses
server_event::serialize_withandserver_event::deserialize_with. For more details see the example in the docs. - Speedup serialization for multiple clients by reusing already serialized components and entities.
- Hide extra functionality from
ServerEventQueue. - Move server event reset system to new set
ClientSet::ResetEventsinPreUpdate. - Make
NetworkChannelschannel-creation methods public (create_client_channelandcreate_server_channel). - Implement
EqandPartialEqonEventType.
LastChangeTickresource,ClientsInfoshould be used instead.
- Don't panic when handling client acks if the ack references a despawned entity.
0.19.0 - 2024-01-07
renet_serdefeature which reexportsserdefeature frombevy_renet.ClientSet::Resetwhich can be disabled by external users.ServerEntityMap::remove_by_clientfor manual client cleanup.BufferedUpdates,ServerEntityTicksto public API.
- Move the client reset system to
PreUpdateto let clients react more promptly to resets. - Replace
Ignored<T>withCommandDontReplicateExt::dont_replicate. Replicationentities with no replicated components will now be spawned on the client anyway.
0.18.2 - 2023-12-27
- Fix missing removals and despawns caused by events cleanup.
0.18.1 - 2023-12-21
- Cache replicated archetypes for faster iteration.
- Fix crash caused by registering the same type for client and server events.
- Fix replication for entities when
Replicationcomponent is added after spawn.
0.18.0 - 2023-12-19
- Send all component mappings, inserts, removals and despawns over reliable channel in form of deltas and component updates over unreliable channel packed by packet size. This significantly reduces the possibility of packet loss.
- Replace
REPLICATION_CHANNEL_IDwithReplicationChannelenum. The previous constant corresponded to the unreliable channel. - Server events use tick with the last change instead of waiting for replication message without changes.
- Include despawns before removals to optimize space for case where despawns are presents and removals aren't.
TickPolicy::EveryFrameandTickPolicy::MaxTickRatenow increment tick only ifRenetServerexists.ServerSet::Sendnow always runs. Replication sending system still runs onRepliconTickchange.ClientMappingno longer containstickfield.- Use
EntityHashMapinstead ofHashMapwith entities as keys. - Use
Cursor<&[u8]>instead ofCursor<Bytes>. - Replace
LastRepliconTickwithRepliconTickon client. - Move
ClientMapperandServerEntityMaptoclient_mappersubmodule. - Rename
replicate_into_sceneintoreplicate_intoand move it toscenemodule. - Derive
DebugforReplicationandIgnored<T>.
AckedTicksresource.TicksMapresource.
- Fix missing reset of
RepliconTickon server disconnect. - Fix replication of removals that happened after replication on the same frame.
0.17.0 - 2023-11-13
- Tracing for replication messages.
Debugderive forLastRepliconTick.
- Update to Bevy 0.12.
0.16.0 - 2023-10-30
- API to configure max channel usage bytes in
NetworkChannels.
- Rename
SendPolicyintoEventType. - Rename
NetworkChannels::server_channelsintoNetworkChannels::get_server_configs. - Rename
NetworkChannels::client_channelsintoNetworkChannels::get_client_configs.
0.15.1 - 2023-10-22
- Register
Replicationtype and add#[reflect(Component)].
0.15.0 - 2023-10-21
network_event::server_event::sendhelper for server events in custom sending functions.- Optional
ClientDiagnosticsPlugin, which writes diagnostics every second. Reflectderive forReplication.
- Optimize despawn tracking.
- Hide
idfield inEventChanneland addCloneandCopyimpls for it. - Remove special functions for reflect events and advise users to write them manually instead. Reflect events are easier now because sometimes you can directly use reflect serializers from Bevy instead of manually writing serde traits.
- Do no trigger server events before world update arrival.
Debugrequirement for events.
0.14.0 - 2023-10-05
- The ability to pre-spawn entities on client.
- Rename
NetworkEntityMaptoServerEntityMap.
0.13.0 - 2023-10-04
- The ability to set custom despawn and component removal functions.
TickPolicy::EveryFrameto updateRepliconTickevery frame.
- Use more compact varint encoding for entities.
- Now all replication functions accept
RepliconTick. - Rename
NetworkTickintoRepliconTickand move it intoservermodule. - Rename
LastTickintoLastRepliconTick.
derive_moredependency.
- Fix the entire world was always sent instead of changes.
- Fix crash with several entities spawned and updated.
0.12.0 - 2023-10-01
- High-level API to extract replicated entities into
DynamicScene.
- Hide
ReplicationRulesfrom public API. - Move logic related to replication rules to
replicon_core::replication_rulesmodule.
0.11.0 - 2023-09-25
- Serialize all components and events using varint.
- Serialize entities in optimal way by writing its index and generation as separate varints.
- Hide
ReplicationId,ReplicationInfoand related methods fromReplicationRulesfrom public API. - Rename
ReplicationRules::replication_idintoReplicationRules::replication_marker_id. - Use serialization buffer cache per client for replication.
- Correctly handle old values on packet reordering.
- Bevy's
Tickwas replaced with dedicated typeNetworkTickthat increments on server update, so it can be used to provide information about time.AckedTickwas replaced withServerTicksthat also contains mappings fromNetworkTickto Bevy'sTickand currentNetworkTick. - Functions in
AppReplicationExt::replicate_withnow accept bytes cursor for memory reuse and return serialization errors. - Rename
ReplicationCoreintoRepliconCorewith its module for clarity. MapNetworkEntitiesnow accepts genericMapperand doesn't have error handling and deserialiation functions now acceptNetworkEntityMap. This allowed us to lazily map entities on client without extra allocation.- Make
LastTickpublic.
0.10.0 - 2023-09-13
MapEventEntitieswas renamed intoMapNetworkEntitiesand now used for both components and events. Built-inMapEntitiestrait from Bevy is not suited for network case for now.AppReplicationExt::not_replicate_withwas replaced with component markerIgnored<T>.- Reflection was replaced with plain serialization. Now components need to implement serde traits and no longer need any reflection. This reduced reduced message sizes a lot. Because of this mapped components now need to be registered with
AppReplicationExt::replicate_mapped. - Derive
CloneandCopyforReplication. - Make
ServerPluginfields private and addServerPlugin::new. - Make
AckedTickspublic. - Make
NetworkEntityMappublic.
0.9.1 - 2023-08-05
- Fix event cleanup.
0.9.0 - 2023-08-01
ClientSetnow available fromprelude.
- Move
has_authoritytoservermodule.
0.8.0 - 2023-07-28
- Put systems in
PreUpdateandPostUpdateto avoid one frame delay. - Reorganize
ServerSetand move client-related systems toClientSet.
0.7.1 - 2023-07-20
- Re-export
transportmodule frombevy_renet.
0.7.0 - 2023-07-20
- Update to
bevy0.11. - Mappable network events now need to implement
MapEventEntitiesinstead ofMapEntities.
ClientStateandServerState, use conditions frombevy_renetandresource_added/resource_exists/resource_removed.ServerSet::Authority, usehas_authorityinstead.
0.6.1 - 2023-07-09
- Update
ParentSyncinCoreSet::PostUpdateto avoid one frame delay.
0.6.0 - 2023-07-08
SendPolicyadded to API of event-creation for user control of delivery guarantee (reliability and ordering).
ParentSyncno longer accepts parent entity and just synchronizes hierarchy automatically if present.
0.5.0 - 2023-06-26
ServerSet::ReceiveEventandServerSet::SendEventfor more fine-grained control of scheduling for event handling.
- Update server to use
TickPolicyinstead of requiring a tick rate.
- Unspecified system ordering could cause tick acks to be ordered on the wrong side of world diff handling.
- Crash after adding events without
ServerPluginorClientPlugin.
0.4.0 - 2023-05-26
- Swap
registryandeventarguments inBuildEventSerializerfor consistency withReflectSerializer. - Update to
bevy_renet0.0.12.
0.3.0 - 2023-04-15
- Support for sending events that contains
Box<dyn Reflect>via custom serialization implementation.
- Accept receiving system in
add_client_event_withand sending system inadd_server_event_with. - Make
EventChannel<T>public.
0.2.3 - 2023-04-09
- Panic that could occur when deleting
RenetServerorRenetClientresources.
0.2.2 - 2023-04-05
- Do not panic if an entity was already despawned on client.
0.2.1 - 2023-04-02
- Incorrect last tick detection.
0.2.0 - 2023-04-01
- Use
#[reflect(MapEntities)]from Bevy 0.10.1 instead of custom#[reflect(MapEntity)].
- Tick checks after overflow.
0.1.0 - 2023-03-28
Initial release after separation from Project Harmonia.