Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to bevy 0.7 #27

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Next

1. Updated all crates to rust 2021 edition. [#27](https://github.com/ErnWong/crystalorb/pull/27)
2. Updated `crystalorb-bevy-networking-turbulence` plugin crate to bevy 0.6. [#26](https://github.com/ErnWong/crystalorb/issues/26) [#27](https://github.com/ErnWong/crystalorb/pull/27)

## v0.3.0

### Breaking Changes
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.3.0"
authors = ["Ernest Wong <sudo@ernestwong.nz>"]
categories = ["games", "simulation"]
description = "Network-agnostic, high-level game networking library"
edition = "2018"
edition = "2021"
keywords = ["netcode"]
license = "Apache-2.0"
readme = "README.markdown"
Expand All @@ -27,6 +27,7 @@ crystalorb-mock-network = {path = "./crates/crystalorb-mock-network"}
crystalorb-demo = {path = "./examples/demo"}

[workspace]
resolver = "2"
members = [
"examples/demo",
"crates/crystalorb-mock-network",
Expand Down
12 changes: 6 additions & 6 deletions crates/crystalorb-bevy-networking-turbulence/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.3.0"
authors = ["Ernest Wong <sudo@ernestwong.nz>"]
categories = ["games", "simulation"]
description = "bevy_networking_turbulence integration for CrystalOrb"
edition = "2018"
edition = "2021"
keywords = ["netcode"]
license = "Apache-2.0"
readme = "README.markdown"
Expand All @@ -16,14 +16,14 @@ use-udp = ["bevy_networking_turbulence/use-udp"]
use-webrtc = ["bevy_networking_turbulence/use-webrtc"]

[dependencies]
bevy_app = "0.5"
bevy_ecs = "0.5"
bevy_core = "0.5"
bevy_networking_turbulence = {version = "0.3.0", default-features = false}
bevy_app = "0.6"
bevy_ecs = "0.6"
bevy_core = "0.6"
bevy_networking_turbulence = {version = "0.4.1", default-features = false}
crystalorb = {version = "0.3.0", path="../../"}
serde = {version = "1.0.118", features = ["derive"]}
turbulence = "0.3"

[dev-dependencies]
bevy = {version = "0.5", default-features = false}
bevy = {version = "0.6", default-features = false}
crystalorb-demo = {path = "../../examples/demo"}
8 changes: 4 additions & 4 deletions crates/crystalorb-bevy-networking-turbulence/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct PlayerInputState {
jump: bool,
}

fn player_input(
fn player_input_system(
mut state: Local<PlayerInputState>,
input: Res<Input<KeyCode>>,
mut client: ResMut<Client<DemoWorld>>,
Expand All @@ -71,7 +71,7 @@ fn player_input(
}

fn main() {
App::build()
App::new()
// You can optionally override some message channel settings
// There is `CommandChannelSettings`, `SnapshotChannelSettings`, and `ClockSyncChannelSettings`
// Make sure you apply the same settings for both client and server.
Expand Down Expand Up @@ -99,7 +99,7 @@ fn main() {
))
.add_plugins(DefaultPlugins)
.add_plugin(CrystalOrbClientPlugin::<DemoWorld>::new(Config::default()))
.add_system(player_input.system())
.add_system(player_input_system)
.run();
}
```
Expand All @@ -122,7 +122,7 @@ use crystalorb_bevy_networking_turbulence::{
use std::time::Duration;

fn main() {
App::build()
App::new()
// You can optionally override some message channel settings
// There is `CommandChannelSettings`, `SnapshotChannelSettings`, and `ClockSyncChannelSettings`
// Make sure you apply the same settings for both client and server.
Expand Down
6 changes: 3 additions & 3 deletions crates/crystalorb-bevy-networking-turbulence/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![feature(generic_associated_types)]
#![doc = include_str!("../README.markdown")]

use bevy_app::{AppBuilder, EventReader, EventWriter, Plugin};
use bevy_app::{App, EventReader, EventWriter, Plugin};
use bevy_core::Time;
use bevy_ecs::prelude::*;
use bevy_networking_turbulence::{
Expand Down Expand Up @@ -242,7 +242,7 @@ impl<WorldType: World> CrystalOrbServerPlugin<WorldType> {
}

impl<WorldType: World> Plugin for CrystalOrbServerPlugin<WorldType> {
fn build(&self, app: &mut AppBuilder) {
fn build(&self, app: &mut App) {
app.add_plugin(NetworkingPlugin::default())
.insert_resource(Server::<WorldType>::new(self.config.clone(), 0.0))
.init_resource::<CommandChannelSettings>()
Expand Down Expand Up @@ -313,7 +313,7 @@ impl<WorldType: World> CrystalOrbClientPlugin<WorldType> {
}

impl<WorldType: World> Plugin for CrystalOrbClientPlugin<WorldType> {
fn build(&self, app: &mut AppBuilder) {
fn build(&self, app: &mut App) {
app.add_plugin(NetworkingPlugin::default())
.insert_resource(Client::<WorldType>::new(self.config.clone()))
.init_resource::<CommandChannelSettings>()
Expand Down
2 changes: 1 addition & 1 deletion crates/crystalorb-mock-network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.3.0"
authors = ["Ernest Wong <sudo@ernestwong.nz>"]
categories = ["games", "simulation"]
description = "Mock, offline, in-memory transport layer for CrystalOrb"
edition = "2018"
edition = "2021"
keywords = ["netcode"]
license = "Apache-2.0"
readme = "README.markdown"
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.3.0"
authors = ["Ernest Wong <sudo@ernestwong.nz>"]
categories = ["games", "simulation"]
description = "Visual and interactive demo for CrystalOrb using the Rapier physics engine"
edition = "2018"
edition = "2021"
keywords = ["netcode"]
license = "Apache-2.0"
readme = "README.markdown"
Expand Down