From ac7a9d55fd839d2b6f06085007161f09c2b35f49 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 7 Sep 2025 04:12:31 +0300 Subject: [PATCH 1/3] Add `bevy_transform_interpolation` to the README.md --- README.md | 1 + bevy_replicon_example_backend/examples/authoritative_rts.rs | 5 +++++ src/lib.rs | 5 +++++ 3 files changed, 11 insertions(+) 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..a7792219 100644 --- a/bevy_replicon_example_backend/examples/authoritative_rts.rs +++ b/bevy_replicon_example_backend/examples/authoritative_rts.rs @@ -9,6 +9,11 @@ //! 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. +//! See [`bevy_transform_interpolation`](https://github.com/Jondolf/bevy_transform_interpolation) 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 From b51ddecbf26a2e843c1f7f150da7274711b43eec Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 7 Sep 2025 04:21:57 +0300 Subject: [PATCH 2/3] Reference the README.md --- bevy_replicon_example_backend/examples/authoritative_rts.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bevy_replicon_example_backend/examples/authoritative_rts.rs b/bevy_replicon_example_backend/examples/authoritative_rts.rs index a7792219..52d8defd 100644 --- a/bevy_replicon_example_backend/examples/authoritative_rts.rs +++ b/bevy_replicon_example_backend/examples/authoritative_rts.rs @@ -13,7 +13,8 @@ //! 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. -//! See [`bevy_transform_interpolation`](https://github.com/Jondolf/bevy_transform_interpolation) +//! 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, From 967888f7922fd2f1834cb47da2e2587399afd8ff Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 7 Sep 2025 12:07:01 +0300 Subject: [PATCH 3/3] Mention change detection --- bevy_replicon_example_backend/examples/authoritative_rts.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bevy_replicon_example_backend/examples/authoritative_rts.rs b/bevy_replicon_example_backend/examples/authoritative_rts.rs index 52d8defd..bfbe6380 100644 --- a/bevy_replicon_example_backend/examples/authoritative_rts.rs +++ b/bevy_replicon_example_backend/examples/authoritative_rts.rs @@ -13,7 +13,9 @@ //! 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. -//! See the [interpolation and/or rollback](https://github.com/simgine/bevy_replicon?tab=readme-ov-file#interpolation-andor-rollback) +//! 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::{