Skip to content

Commit 7f49623

Browse files
committed
Merge remote-tracking branch 'origin/master' into bevy-0.16-dev
2 parents 73b47c3 + 1e42c4f commit 7f49623

9 files changed

Lines changed: 27 additions & 20 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/checkout@v4
2424

2525
- name: Check typos
26-
uses: crate-ci/typos@v1.30.2
26+
uses: crate-ci/typos@v1.31.1
2727

2828
format:
2929
name: Format

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.32.1] - 2025-04-05
11+
12+
### Changed
13+
14+
- Publicize `ClientTicks` component and its `update_tick` method.
15+
1016
## [0.32.0] - 2025-03-24
1117

1218
### Added
@@ -762,7 +768,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
762768

763769
Initial release after separation from [Project Harmonia](https://github.com/projectharmonia/project_harmonia).
764770

765-
[unreleased]: https://github.com/projectharmonia/bevy_replicon/compare/v0.32.0...HEAD
771+
[unreleased]: https://github.com/projectharmonia/bevy_replicon/compare/v0.32.1...HEAD
772+
[0.32.0]: https://github.com/projectharmonia/bevy_replicon/compare/v0.32.0...v0.32.1
766773
[0.32.0]: https://github.com/projectharmonia/bevy_replicon/compare/v0.31.1...v0.32.0
767774
[0.31.1]: https://github.com/projectharmonia/bevy_replicon/compare/v0.31.0...v0.31.1
768775
[0.31.0]: https://github.com/projectharmonia/bevy_replicon/compare/v0.30.1...v0.31.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
"koe <ukoe@protonmail.com>",
77
]
88
edition = "2024"
9-
description = "High level networking for the Bevy game engine"
9+
description = "A server-authoritative replication crate for Bevy"
1010
readme = "README.md"
1111
repository = "https://github.com/projectharmonia/bevy_replicon"
1212
keywords = [

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![license](https://img.shields.io/crates/l/bevy_replicon)](#license)
66
[![codecov](https://codecov.io/gh/projectharmonia/bevy_replicon/graph/badge.svg?token=N1G28NQB1L)](https://codecov.io/gh/projectharmonia/bevy_replicon)
77

8-
Server-authoritative networking crate for the [Bevy game engine](https://bevyengine.org).
8+
A server-authoritative replication crate for [Bevy](https://bevyengine.org).
99

1010
If you are new to networking, see [glossary](https://gist.github.com/maniwani/f92cc5d827b00163f5846ea7dcb90d44) and
1111
[What kind of networking should X game use?](https://github.com/bevyengine/bevy/discussions/8675).
@@ -15,26 +15,29 @@ If you are new to networking, see [glossary](https://gist.github.com/maniwani/f9
1515
- Automatic world replication.
1616
- Remote events and triggers.
1717
- Control over client visibility of entities and events.
18-
- Abstracts game logic to support singleplayer, client, dedicated server, and listen server configurations simultaneously.
19-
- Works with `no_std`.
20-
- No builtin I/O, can be used with any messaging library. See [messaging backends](#messaging-backends) for already available integrations.
2118
- Replication into scene to save server state.
2219
- Customizable serialization and deserialization even for types that don't implement `serde` traits (like `Box<dyn Reflect>`).
23-
- Extensible architecture. See [ecosystem](#ecosystem).
20+
- Abstracts game logic to support singleplayer, client, dedicated server, and listen server configurations simultaneously.
21+
- No builtin I/O, can be used with any messaging library. See [messaging backends](#messaging-backends) for already available integrations.
22+
- Heavily optimized.
23+
- Works with `no_std`.
24+
- Hackable. See [ecosystem](#ecosystem).
2425

2526
## Getting Started
2627

2728
Check out the [quick start guide](https://docs.rs/bevy_replicon).
2829

2930
For examples navigate to the [`bevy_replicon_example_backend`](bevy_replicon_example_backend) (because you need I/O in order to run them).
3031

32+
You can also:
33+
- Watch [my talk at Bevy Meetup #9](https://www.youtube.com/watch?v=aDsVFmXD2cc)
34+
- Read [this great article](https://www.hankruiger.com/posts/adding-networked-multiplayer-to-my-game-with-bevy-replicon) *(not mine)*
35+
3136
Have any questions? Feel free to ask in the dedicated [`bevy_replicon` channel](https://discord.com/channels/691052431525675048/1090432346907492443) in Bevy's Discord server.
3237

3338
## Ecosystem
3439

35-
We have a growing ecosystem of crates that can be integrated with Replicon or built on top of it.
36-
Networking is quite complex, and maintaining everything in a single crate would be a nightmare.
37-
So we are trying to provide an extensible core and encourage users to build their own abstractions as separate crates.
40+
Depending on your game, you may need additional features. We provide an API that allows external crates to integrate with Replicon or to be built on top of it.
3841

3942
> [!WARNING]
4043
> Ensure that your `bevy_replicon` version is compatible with the used crate according to semantic versioning.

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
Server-authoritative networking crate for the [Bevy game engine](https://bevyengine.org).
2+
A server-authoritative replication crate for [Bevy](https://bevyengine.org).
33
44
# Quick start
55
@@ -48,7 +48,7 @@ or use backend-provided events if you need the disconnect reason.
4848
## Replication
4949
5050
It's a process of exchanging data in order to keep the world in sync. Replicon
51-
provides a high-level API to automate this process.
51+
provides a high-level API to automate server-authoritative replication.
5252
5353
Replication happens only from server to clients. It's necessary to prevent cheating.
5454
If you need to send information from clients to the server, use

src/shared/backend/replicon_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl RepliconClient {
121121
pub fn set_status(&mut self, status: RepliconClientStatus) {
122122
debug!("changing `RepliconClient` status to `{status:?}`");
123123

124-
if self.is_connected() && !matches!(status, RepliconClientStatus::Connected { .. }) {
124+
if self.is_connected() && !matches!(status, RepliconClientStatus::Connected) {
125125
for channel_messages in &mut self.received_messages {
126126
channel_messages.clear();
127127
}

src/shared/postcard_utils.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,6 @@ impl<'a, T: Buf> DeFlavor<'a> for BufFlavor<'a, T> {
162162
type Source = &'a [u8];
163163

164164
fn pop(&mut self) -> postcard::Result<u8> {
165-
if self.buf.remaining() == 0 {
166-
panic!("asdf");
167-
}
168165
self.buf
169166
.try_get_u8()
170167
.map_err(|_| postcard::Error::DeserializeUnexpectedEnd)

src/shared/replication.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub(crate) mod client_ticks;
1+
pub mod client_ticks;
22
pub mod command_markers;
33
pub mod deferred_entity;
44
pub(crate) mod mutate_index;

src/shared/replication/client_ticks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::shared::replicon_tick::RepliconTick;
1212

1313
/// Tracks replication ticks for a client.
1414
#[derive(Component, Default)]
15-
pub(crate) struct ClientTicks {
15+
pub struct ClientTicks {
1616
/// Lowest tick for use in change detection for each entity.
1717
mutation_ticks: EntityHashMap<Tick>,
1818

@@ -40,7 +40,7 @@ impl ClientTicks {
4040

4141
/// Returns the last tick in which a replicated entity had an insertion, removal, or gained/lost a component from the
4242
/// perspective of the client.
43-
pub(crate) fn update_tick(&self) -> RepliconTick {
43+
pub fn update_tick(&self) -> RepliconTick {
4444
self.update_tick
4545
}
4646

0 commit comments

Comments
 (0)