Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions bevy_replicon_example_backend/examples/authoritative_rts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down