this post was submitted on 04 Feb 2025
1 points (100.0% liked)

Bevy

265 readers
11 users here now

A community for discussion around the bevy game engine! https://bevyengine.org/

founded 1 year ago
MODERATORS
 

It’s a crate for server-authoritative networking. We use it for Project Harmonia, but it's general-purpose.

Kinda our 30th anniversary 😅 This release introduces remote triggers. The API is similar to our networked events. Here’s a quick showcase for client triggers:

app.add_client_trigger::<DummyEvent>(ChannelKind::Ordered)
    .add_observer(receive_events)
    .add_systems(Update, send_events.run_if(client_connected));

fn send_events(mut commands: Commands) {
    commands.client_trigger(DummyEvent);
}

fn receive_events(trigger: Trigger<FromClient<DummyEvent>>) {
    info!("received event {:?} from {:?}", trigger.event, trigger.client_id);
}

Server triggers have a similar API. Targeting entities is also supported.

We now also provide an example backend and examples that directly from the bevy_replicon repo. The examples have also been re-written to take advantage of the latest Bevy and Replicon features.

📜Full changelog 📦bevy_replicon

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here