Bevy

4 readers
1 users here now

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

founded 1 year ago
MODERATORS
1
 
 

A virtual meetup where we talk about Bevy :) This time I will be one of the speakers! Link to the blogpost with more details about the format.

Scheduled for March 6th 8 pm CET.

2
13
submitted 2 weeks ago* (last edited 2 weeks ago) by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

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

3
 
 

Refined the bindings menu for my game and ported it into a standalone example for bevy_enhanced_input.

Alice (the author of LWIM) and I quite like the main concepts of the crate, and weโ€™re planning to refine it further to create the ultimate input manager ๐Ÿ™‚

4
9
submitted 3 weeks ago* (last edited 3 weeks ago) by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

Thanks to ongoing work on no_std, people continue to try running Bevy on unusual platforms.

Today, @Mathspy from Discord managed to run it on the Playdate:

For what it's worth, Bevy's app, ECS, math, state work on the playdate with no patches
And Bevy's time works with a minor patch https://github.com/bevyengine/bevy/pull/17577

For rendering they're making playdate render calls in PostUpdate: https://github.com/Mathspy/bevydate/blob/1b4f02adcde079cf9757fd3c7d20331c9ab04513/src/lib.rs#L429-L441

5
 
 

Spend last week working on remote triggers for bevy_replicon.

Tried many approaches and finally satisfied with the implementation and public API.

Client triggers example:

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>>) {
    let FromClient { client_id, event } = trigger.event();
    info!("received event {event:?} from {client_id:?}");
}

Server triggers example:

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

fn send_events(mut commands: Commands) {
    commands.server_trigger(ToClients {
        mode: SendMode::Broadcast,
        event: DummyEvent,
    });
}

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

Observers are so nice, I use them in my game a lot and not having them networked was quite limiting.

After a review from second maintainer I will merge it and draft a new release ๐Ÿ™‚

6
9
submitted 3 weeks ago* (last edited 3 weeks ago) by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

Post from @bushRAT in Discord:

Thanks to the ever growing support for no_std in Bevy, I'm now able to use Bevy on the GameBoy Advance! Using the current main branch (which will be included for 0.16!) you can use a crate like agb (and some boilerplate I'm hiding) to write GameBoy Advance games almost as easily as you would for any other Bevy platform. Systems, plugins, resources, queries, the gamepad input API, it all just works. See the attached ROM if you have a GameBoy Advance emulator handy, but I recommend the MGBA emulator as it can also show debug logs (yes, even all the logging just works)

Links to GBA files:

If you have a real GBA or an FPGA console, the author will appreciate if you try :)

Repository: https://github.com/bushrat011899/bevy_agb_test

7
 
 

It's a crate for dynamic and contextual input mappings for Bevy, inspired by Unreal Engine Enhanced Input.

Actions now have a parameter that requires inputs to reset to zero before activation and continue consumption after context removal until they return to zero. This is very useful if you want to use the same input to toggle between contexts.

See the changelog for more details.

๐Ÿ“œFull changelog ๐Ÿ“ฆbevy_enhanced_input

8
8
submitted 1 month ago* (last edited 1 month ago) by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

It's a crate for dynamic and contextual input mappings for Bevy, inspired by Unreal Engine Enhanced Input.

It's a small release. I'm quite happy with the API, just wanted to make a few adjustments. Here are some highlights:

  • Replace SmoothDelta modifier with SmoothNudge. It uses StableInterpolate::smooth_nudge, which properly interpolates inputs across frames.
  • Remove InputContext::MODE. All contexts now work like InputContext::Exclusive (the default). If you want to share the same input across multiple entities, use a separate "controller" entity for a context and apply inputs to the desired entities. This approach is more efficient and explicit, so it's not worth having a special case in the crate for it.

See the changelog for more details.

๐Ÿ“œFull changelog ๐Ÿ“ฆbevy_enhanced_input

9
 
 

I'm developing a life simulation game with the working title Project Harmonia.

Over the last two weeks, I worked on walls. I needed precise placement for apartment building.

  • Added angle and length visualization.
  • Lengths and angles are now rounded (can be disabled by holding Alt).
  • Added ordinal angle snapping (can be enabled by holding Shift).
  • Simplified and optimized mesh generation.

I need a dashed gizmo style to make it look nicer. I opened an issue and it was implemented in less than 24 hours. Bevy development velocity is ๐Ÿคฏ

10
 
 

Iโ€™m working on a life simulation game with the working title Project Harmonia.

Finished adding undo/redo functionality for all game actions. All logic is also networked using bevy_replicon ๐Ÿ™‚

Next, Iโ€™m planning to work on house-building to create cities. I planning to implement apartment buildings first.

If you know any games where you can build apartments - let me know. Looking at prior art always helps!

11
5
submitted 2 months ago* (last edited 2 months ago) by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

When I migrated my game to bevy_enhanced_input, I added gamepad support. I figured itโ€™d be fun to see if the game could run on a device like this.

It's a pocketable handheld with SD865 running Android and only 960p display. But making it work was surprisingly easy - just needed to tweak Cargo.toml and my main function.

However, there's a catch: GilRs, the input library Bevy uses, doesnโ€™t support Android ๐Ÿ˜ข So, for now, I can only rely on touch controls, which Iโ€™ll properly support later.

Just wanted to tinker with it a little bit. Not very useful for the game at this stage, but since it's a hobby project, sometimes I just need to do something fun to stay motivated for bigger tasks.

12
 
 

Working on my game right now and making adjustments to the API along the way. This release allows attaching modifiers and conditions to sets and improves the ergonomics of the Negate modifier.

๐Ÿ“œFull changelog ๐Ÿ“ฆbevy_enhanced_input

13
 
 

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

This release, I focused on improving the API for potential rollback crates. We now have full world access in writing functions, a way to reliably check for update messages (optional and needs to be enabled by rollback crates since it costs a little more traffic), and events to react nicely to confirmed ticks.

Currently, there is only one crate in development by another developer that implements a Rocket League rollback style, which is great for physics-based games. But it would be useful to have a "classic" rollback crate, which is better suited for shooters, so maybe weโ€™ll see more rollback crates in the future!

I also improved the serialization. Replication messages are now more compact thanks to variable integer encoding, while still using a single buffer for performance.

๐Ÿ“œFull changelog ๐Ÿ“ฆbevy_replicon

14
 
 

It's a crate for dynamic and contextual input mappings for Bevy, inspired by Unreal Engine Enhanced Input.

Some highlights:

  • Action events now have statically known types (bool, f32, Vec2 or Vec3), depending on the action configuration.
  • Assigning inputs, modifiers, and conditions now works like Bevy systems: you can pass multiple items in tuples.
  • Binding presets now structs.
  • Many ergonomic improvements for passing input.

I didnโ€™t plan all of these, but a user suggested these ideas and contributed PRs for most of them! I couldn't resist ๐Ÿ˜…

Iโ€™ve drafted two releases:

  • 0.3.0 includes all the improvements.
  • 0.4.0 updates to Bevy 0.15.0.

This way, you can address the breaking changes in 0.3.0 before updating to Bevy 0.15.0, avoiding the need to handle everything at once.

๐Ÿ“œFull changelog ๐Ÿ“ฆbevy_enhanced_input

15
21
Bevy 0.15 (bevyengine.org)
submitted 2 months ago by Shatur@lemmy.ml to c/bevy@programming.dev
16
12
submitted 3 months ago* (last edited 3 months ago) by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

It's a crate for dynamic and contextual input mappings for Bevy, inspired by Unreal Engine Enhanced Input.

While porting my game, I made many improvements. Actually using the crate gave me a better perspective ๐Ÿ˜…

Here's a quick showcase from my game. Smooth movement now automatically done by built-in LerpDelta modifier.

Also notice how pressing Esc cancels object spawning first due to the context priority.

Pressed keys displayed via screenkey app.

๐Ÿ“œFull changelog ๐Ÿ“ฆbevy_enhanced_input

17
 
 

It's a crate for dynamic and contextual input mappings for Bevy, inspired by Unreal Engine Enhanced Input.

I really like the UE approach and decided to bring it to Bevy.

Despite being the first release, it's packed with features:

  • Map inputs from various sources (keyboard, gamepad, etc.) to gameplay actions like Jump, Move, or Attack.
  • Assign actions to different contexts like OnFoot or InCar, which are regular components.
  • Activate or deactivate contexts by simply adding or removing components.
  • Control how actions accumulate input from sources and consume it.
  • Layer multiple contexts on a single entity, controlled by priority.
  • Apply modifiers to inputs, such as dead zones, inversion, scaling, etc., or create custom modifiers by implementing a trait.
  • Assign conditions for how and when an action is triggered, like "hold", "tap", "chord", etc. You can also create custom conditions, such as "on the ground".
  • React on actions with observers.

I've implemented everything from UE and even added some extras. The crate also has ~90% test coverage.

๐Ÿ“ฆbevy_enhanced_replicon

18
19
 
 

I'm working on a life simulation game with the working title Project Harmonia and would like to share my progress.

I migrated navigation from oxidized_navigation to vleue_navigator.

It uses the novel Polyanya algorithm instead of the classical A*.

I faced a few issues during the migration, but the author helped me resolve them all. He even dumped the navmesh of the house I built in the game and created a test named after the project ๐Ÿ˜…

I also implemented skipping points that the agent has projected past to prevent jitter when multiple points are close to each other.

20
21
 
 

I working on a life simulation game with a working title Project Harmonia.

Iโ€™ve finally added the ability to edit and remove previously spawned walls, along with an undo/redo system.

Implementing the undo/redo was a bit challenging. If a command spawns or despawns an entity, it needs to be tracked to update the history with the correct ID. Additionally, since the game is networked, I had to introduce the concept of pending history commands. These commands are only added to the history after server confirmation.

22
23
 
 

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

Some highlights:

  • Added the ability to defer replication, which is useful for exchanging messages or downloading assets required by the server before replication starts.
  • If there is any spawning, despawning, removal, or insertion, client events wait for replication. However, with this release, it can be disabled per event.
  • Fixed entity mapping when a client event is buffering.

๐Ÿ“œFull changelog ๐Ÿ“ฆbevy_replicon

24
25
16
Initial roads support (files.mastodon.social)
submitted 6 months ago by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

I working on a life simulation game with a working title Project Harmonia.

Added initial editor for roads, reusing some logic from the walls implementation.

Currently, I'm using segments for road creation, but I plan to add Bezier curves to allow for curved walls and roads. Maybe I should use Bezier curves even for straight lines ๐Ÿค”

I also need to use a texture without road markings for connection islands and implement rounding for turns.

But wanted to share the current progress :)

view more: next โ€บ