Releases: projectharmonia/bevy_replicon
Releases · projectharmonia/bevy_replicon
Bevy Replicon 0.25.1
Fixed
- Fix possible overflow in
Confirmed::contains_any
.
Bevy Replicon 0.25.0
Added
AppMarkerExt
to 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_group
andGroupRegistration
trait to register and customize component groups. A group will be replicated only if all its components present on an entity.ServerSet::StoreHierarchy
for systems that store hierarchy changes inParentSync
.- More tracing.
Debug
impl forRepliconClientStatus
.
Fixed
- Reversed order of the received messages from
RepliconClient
.
Changed
SerializeFn
now accepts regularC
instead ofPtr
.DeserializeFn
now does only deserialization and returnsC
. Use the newly added marker-based API if you want to customize how component will be written. See docs forAppMarkerExt
for details.- Rename
AppReplicationExt
intoAppRuleExt
. AppRuleExt::replicate_with
now acceptsRuleFns
struct 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
EntityMut
andCommands
instead 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::receive
instead of popping the last message. If you usedwhile
loop with it before, replace it withfor
. - Use new
ServerInitTick
resource on client instead ofRepliconTick
. If you usedServerEventAppExt::add_server_event_with
, useServerInitTick
instead ofRepliconTick
in your receive function. - Use new
ServerTick
resource on server instead ofRepliconTick
. - Replace
ServerEntityTicks
withConfirmed
component. 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_tick
module underserver
module since now it's used only on server. - Move
Replication
tocore
module. - Move all functions-related logic from
ReplicationRules
into a newReplicationFns
and hideReplicationRules
from public API. - Move
despawn_recursive
intoreplication_fns
module. - Rename
serialize_component
intodefault_serialize
and move intorule_fns
module. - Rename
deserialize_component
intodefault_deserialize
and move intorule_fns
module. - Rename
deserialize_mapped_component
intodefault_deserialize_mapped
and move intorule_fns
module. - Rename
remove_component
intodefault_remove
and move intocommand_fns
module.
Removed
dont_replicate
module. Use the newly addedAppRuleExt::replicate_group
or newtypes.
Bevy Replicon 0.24.1
Fixed
- Fix compilation issue when multiple
PartialEq
impls are present forusize
.
Bevy Replicon 0.24.0
Added
- Provide
ServerTestAppExt
extension trait for exchanging messaging between apps in tests.
Changed
- Abstract out all I/O and
renet
dependency. 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_renet
it'sRepliconRenetPlugins
. - Replace usage of
RenetServer
andRenetClient
with ourRepliconServer
andRepliconClient
respectively. 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_conditions
module. - Move
has_authority
tocommon_conditions
module. - Replace conditions from
renet
with ours, seecommon_conditions
module. Available inprelude
. - Replace usage of
ClientId
fromrenet
with our own with the same name. In user code only the one frombevy_replicon
should be used. - Replace
SERVER_ID
constant withClientId::SERVER
. - Replace use of
RenetConnectionStatus
with ourRepliconClientStatus
. - Replace
ServerEvent
fromrenet
with our own with the same name. In user code only the one frombevy_replicon
should be used. - Rename
replicon_core
module intocore
. - Rename
EventType
intoChannelKind
and move intocore
module. - Replace usage of renet's
SendType
with ourRepliconChannel
. - Rename
NetworkChannels
intoRepliconChannels
and move intoreplicon_channels
module. - Rename
ReplicationChannel::Reliable
andReplicationChannel::Unreliable
intoReplicationChannel::Init
andReplicationChannel::Update
respectively. - Channel creation methods in
RepliconChannels
now acceptRepliconChannel
with full channel configuration. - Make
default_max_bytes
field inRepliconChannels
public. - Move
RepliconChannels::get_server_configs
andRepliconChannels::get_client_configs
to create channels configs forrenet
intoRenetChannelsExt
extension trait provided bybevy_replion_renet
. Make sure to import it to use these methods. - Rename
ReplicationPlugins
intoRepliconPlugins
. - Rename
ClientCache
intoConnectedClients
. - Rename
ClientState
intoConnectedClient
. - Replace
RepliconChannels::set_client_max_bytes
andRepliconChannels::set_server_max_bytes
withRepliconChannels::server_channel_mut
andRepliconChannels::client_channel_mut
respectively with more rich configuration. - Move
ClientEventChannel
toclient_event
module. - Move
ServerEventChannel
toserver_event
module. ClientMapper
,ServerEntityMap
,BufferedUpdates
,ServerEntityTicks
,ReplicationRules
,ReplicationChannel
,ClientEventChannel
,ServerEventChannel
,ServerEventQueue
andEventMapper
are no longer inprelude
module. Import them directly.
Bevy Replicon 0.23.0
Changed
- Common conditions now follow the new pattern without returning a closure.
Removed
Mapper
andMapNetworkEntities
in favor ofEntityMapper
andMapEntities
introduced in Bevy 0.13.0
Fixed
- Make
scene::replicate_into
update previously added entities.
Bevy Replicon 0.22.0
Changed
- Changed
ClientEventAppExt::add_mapped_client_event
to clone the events instead of draining them. This means that mapped client events must now implementClone
Fixed
- Misuse of
Vec::reserve
that would cause excess allocations.
Bevy Replicon 0.21.2
Changes
- Increased publicity of
ClientState
API.
Bevy Replicon 0.21.1
Added
ClientCache::visibility_policy()
returns the configured policy.
Bevy Replicon 0.21.0
Added
- Control over client visibility of entities.
Changed
- Rename
ClientsInfo
intoClientCache
. - Rename
ClientInfo
intoClientState
. - Allow calling
dont_replicate::<T>
with the insertion ofT
instead of afterReplication
insertion. dont_replicate::<T>
can panic only indebug_assertions
is enabled.
Bevy Replicon 0.20.0
Fixed
- Don't panic when handling client acks if the ack references a despawned entity.
Changed
- API for custom server messages now uses
server_event::serialize_with
andserver_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::ResetEvents
inPreUpdate
. - Make
NetworkChannels
channel-creation methods public (create_client_channel()
andcreate_server_channel()
). - Implement
Eq
andPartialEq
onEventType
.
Removed
LastChangeTick
resource,ClientsInfo
should be used instead.