From 60119363028a15985eb0534634da342cb3e15f64 Mon Sep 17 00:00:00 2001 From: Zicklag Date: Fri, 9 Dec 2022 16:49:16 -0600 Subject: [PATCH 1/2] fix(docs): Fix a Heading Level in Network Docs --- src/networking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.md b/src/networking.md index 8d75ec5962..d8ca13821d 100644 --- a/src/networking.md +++ b/src/networking.md @@ -151,7 +151,7 @@ game. We hope we can improve this: see [Future Changes](#future-changes). [ggpo]: https://www.ggpo.net/ -### Spawning Entities +#### Spawning Entities When spawning entities, we need to attach [`Rollback`][bevy_ggrs::Rollback] components to them, that contain a unique index identifying the entity across rollbacks and restores, which may modify the From 91292acae73b76f4b42fb7026ee54ae4a046a2d8 Mon Sep 17 00:00:00 2001 From: Zicklag Date: Fri, 9 Dec 2022 17:07:25 -0600 Subject: [PATCH 2/2] feat: Add Bevy Framepace Plugin This can reduce input-to-photon latency. --- Cargo.lock | 10 ++++++++++ Cargo.toml | 1 + src/main.rs | 1 + 3 files changed, 12 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 5ea33c1a6c..00a5c7a4b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -550,6 +550,15 @@ dependencies = [ "uuid", ] +[[package]] +name = "bevy_framepace" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327027bd161a95a03962d03ba4cf71013a8d2500bf288838f6046278806cb383" +dependencies = [ + "bevy", +] + [[package]] name = "bevy_ggrs" version = "0.10.0" @@ -2497,6 +2506,7 @@ dependencies = [ "bevy_ecs_tilemap", "bevy_egui", "bevy_fluent", + "bevy_framepace", "bevy_ggrs", "bevy_kira_audio", "bevy_prototype_lyon", diff --git a/Cargo.toml b/Cargo.toml index 104fae0c26..e369c01af5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ bevy_ecs_dynamic = { git = "https://github.com/jakobhellermann/bevy_ecs_dynamic" bevy_ecs_tilemap = { version = "0.7.0", features = ["atlas"] } bevy_egui = "0.16.1" bevy_fluent = "0.4.0" +bevy_framepace = "0.7" bevy_ggrs = { git = "https://github.com/zicklag/bevy_ggrs.git", branch = "jumpy" } bevy_kira_audio = { version = "0.12.0", features = ["ogg"], default-features = false } # bevy_mod_js_scripting = { git = "https://github.com/zicklag/bevy_mod_js_scripting.git", branch = "jumpy" } diff --git a/src/main.rs b/src/main.rs index 93677cb39a..c2cbd4a5d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -207,6 +207,7 @@ pub fn main() { .add_plugin(UiPlugin); app.add_plugin(bevy_tweening::TweeningPlugin) + .add_plugin(bevy_framepace::FramepacePlugin) .add_plugin(AudioPlugin) .add_plugin(UtilsPlugin) .add_plugin(MetadataPlugin)