Skip to content

Releases: projectharmonia/bevy_replicon

Bevy Replicon 0.25.1

15 May 21:06
e128056
Compare
Choose a tag to compare

Fixed

  • Fix possible overflow in Confirmed::contains_any.

Bevy Replicon 0.25.0

11 May 10:43
15ef77c
Compare
Choose a tag to compare

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 and GroupRegistration 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 in ParentSync.
  • More tracing.
  • Debug impl for RepliconClientStatus.

Fixed

  • Reversed order of the received messages from RepliconClient.

Changed

  • SerializeFn now accepts regular C instead of Ptr.
  • DeserializeFn now does only deserialization and returns C. Use the newly added marker-based API if you want to customize how component will be written. See docs for AppMarkerExt for details.
  • Rename AppReplicationExt into AppRuleExt.
  • AppRuleExt::replicate_with now accepts RuleFns 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 and Commands instead of EntityWorldMut. 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 used while loop with it before, replace it with for.
  • Use new ServerInitTick resource on client instead of RepliconTick. If you used ServerEventAppExt::add_server_event_with, use ServerInitTick instead of RepliconTick in your receive function.
  • Use new ServerTick resource on server instead of RepliconTick.
  • Replace ServerEntityTicks with Confirmed 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 under server module since now it's used only on server.
  • Move Replication to core module.
  • Move all functions-related logic from ReplicationRules into a new ReplicationFns and hide ReplicationRules from public API.
  • Move despawn_recursive into replication_fns module.
  • Rename serialize_component into default_serialize and move into rule_fns module.
  • Rename deserialize_component into default_deserialize and move into rule_fns module.
  • Rename deserialize_mapped_component into default_deserialize_mapped and move into rule_fns module.
  • Rename remove_component into default_remove and move into command_fns module.

Removed

  • dont_replicate module. Use the newly added AppRuleExt::replicate_group or newtypes.

Bevy Replicon 0.24.1

07 Mar 17:06
Compare
Choose a tag to compare

Fixed

  • Fix compilation issue when multiple PartialEq impls are present for usize.

Bevy Replicon 0.24.0

05 Mar 23:36
Compare
Choose a tag to compare

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 via bevy_replion_renet. But users can write their integration with other messaging libraries. So now users need to additionally add messaging-related plugin. In case of bevy_replion_renet it's RepliconRenetPlugins.
  • Replace usage of RenetServer and RenetClient with our RepliconServer and RepliconClient respectively. Use types from renet (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 using resource_(exists/added/removed) for network-related conditions, use special conditions provided in common_conditions module.
  • Move has_authority to common_conditions module.
  • Replace conditions from renet with ours, see common_conditions module. Available in prelude.
  • Replace usage of ClientId from renet with our own with the same name. In user code only the one from bevy_replicon should be used.
  • Replace SERVER_ID constant with ClientId::SERVER.
  • Replace use of RenetConnectionStatus with our RepliconClientStatus.
  • Replace ServerEvent from renet with our own with the same name. In user code only the one from bevy_replicon should be used.
  • Rename replicon_core module into core.
  • Rename EventType into ChannelKind and move into core module.
  • Replace usage of renet's SendType with our RepliconChannel.
  • Rename NetworkChannels into RepliconChannels and move into replicon_channels module.
  • Rename ReplicationChannel::Reliable and ReplicationChannel::Unreliable into ReplicationChannel::Init and ReplicationChannel::Update respectively.
  • Channel creation methods in RepliconChannels now accept RepliconChannel with full channel configuration.
  • Make default_max_bytes field in RepliconChannels public.
  • Move RepliconChannels::get_server_configs and RepliconChannels::get_client_configs to create channels configs for renet into RenetChannelsExt extension trait provided by bevy_replion_renet. Make sure to import it to use these methods.
  • Rename ReplicationPlugins into RepliconPlugins.
  • Rename ClientCache into ConnectedClients.
  • Rename ClientState into ConnectedClient.
  • Replace RepliconChannels::set_client_max_bytes and RepliconChannels::set_server_max_bytes with RepliconChannels::server_channel_mut and RepliconChannels::client_channel_mut respectively with more rich configuration.
  • Move ClientEventChannel to client_event module.
  • Move ServerEventChannel to server_event module.
  • ClientMapper, ServerEntityMap, BufferedUpdates, ServerEntityTicks, ReplicationRules, ReplicationChannel, ClientEventChannel, ServerEventChannel, ServerEventQueue and EventMapper are no longer in prelude module. Import them directly.

Bevy Replicon 0.23.0

22 Feb 16:16
Compare
Choose a tag to compare

Changed

  • Common conditions now follow the new pattern without returning a closure.

Removed

  • Mapper and MapNetworkEntities in favor of EntityMapper and MapEntities introduced in Bevy 0.13.0

Fixed

  • Make scene::replicate_into update previously added entities.

Bevy Replicon 0.22.0

16 Feb 22:27
Compare
Choose a tag to compare

Changed

  • Changed ClientEventAppExt::add_mapped_client_event to clone the events instead of draining them. This means that mapped client events must now implement Clone

Fixed

  • Misuse of Vec::reserve that would cause excess allocations.

Bevy Replicon 0.21.2

27 Jan 10:25
Compare
Choose a tag to compare

Changes

  • Increased publicity of ClientState API.

Bevy Replicon 0.21.1

22 Jan 20:33
Compare
Choose a tag to compare

Added

  • ClientCache::visibility_policy() returns the configured policy.

Bevy Replicon 0.21.0

22 Jan 18:30
Compare
Choose a tag to compare

Added

  • Control over client visibility of entities.

Changed

  • Rename ClientsInfo into ClientCache.
  • Rename ClientInfo into ClientState.
  • Allow calling dont_replicate::<T> with the insertion of T instead of after Replication insertion.
  • dont_replicate::<T> can panic only in debug_assertions is enabled.

Bevy Replicon 0.20.0

13 Jan 00:14
Compare
Choose a tag to compare

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 and server_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 in PreUpdate.
  • Make NetworkChannels channel-creation methods public (create_client_channel() and create_server_channel()).
  • Implement Eq and PartialEq on EventType.

Removed

  • LastChangeTick resource, ClientsInfo should be used instead.