diff --git a/README.md b/README.md index ec8b7ec6..35b8581c 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ Depending on your game, you may need additional features. We provide an API that #### Interpolation and/or rollback - [`bevy_rewind`](https://github.com/NiseVoid/bevy_rewind) - server-authoritative rollback inspired by Rocket League. +- [`bevy_transform_interpolation`](https://github.com/Jondolf/bevy_transform_interpolation) - render transforms smoothly for listen server or single player modes. Doesn't require special integration with Replicon. #### Visibility diff --git a/bevy_replicon_example_backend/examples/authoritative_rts.rs b/bevy_replicon_example_backend/examples/authoritative_rts.rs index 63ec1c5f..bfbe6380 100644 --- a/bevy_replicon_example_backend/examples/authoritative_rts.rs +++ b/bevy_replicon_example_backend/examples/authoritative_rts.rs @@ -9,6 +9,14 @@ //! In this example, clients don't predict or rollback. They simply wait for //! state updates from the server. It's a common strategy for RTS because the //! input delay won't be noticeable. +//! +//! The tick rate is 64 Hz (default in Bevy). You can lower it, but if you want +//! to render the movement smoothly in listen-server and single-player +//! modes, you need to apply transform interpolation between fixed updates. +//! In this case, you need to replicate a different component instead of [`Transform`], +//! because interpolation triggers change detection. See the +//! [interpolation and/or rollback](https://github.com/simgine/bevy_replicon?tab=readme-ov-file#interpolation-andor-rollback) +//! section for available solutions. use std::{ f32::consts::TAU, diff --git a/src/lib.rs b/src/lib.rs index b0e4d19c..c9c3d1fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -551,6 +551,11 @@ We don't have these features built-in, but we provide a low-level API to impleme Check the [corresponding section](https://github.com/simgine/bevy_replicon#interpolation-andor-rollback) in our README for existing implementations. +If you run at a low tick rate, you may also need to smooth transforms in listen server or single player modes. +This is different from client-side - it should happen between the previous and the current [`FixedMain`](bevy::app::FixedMain) +runs. See the [interpolation and/or rollback](https://github.com/simgine/bevy_replicon?tab=readme-ov-file#interpolation-andor-rollback) +section for available solutions. + #### Client markers To apply interpolation or store value history for client-side prediction, you need to override how components are