This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

Async Assets, Mesh Picking, and The Bevy Linter

2024-10-21

The first release candidate gets closer this week as it seems like the Required Components migrations are nearing their completion and various bug fixes have made their way in.

The 0.15 milestone can be viewed on GitHub and includes work like an upgrade to wgpu 23 some of which will happen over the course of the release candidates.

In the meantime we've got plenty of PRs to cover and community showcases to explore.

Async Assets

Bevy's asset system is async by nature but is most often used in sync contexts, such as in a Bevy system. #15913 adds a method for asynchronously waiting for an asset to load. This makes it easier to use in contexts that integrate well with async, like in Bevy's async tasks. The new method AssetServer::wait_for_asset returns a future that suspends until the asset associated with a given Handle either finishes loading or fails to load.

Required Components

In #15898 bevy_ui was ported to Required Components and in #15975 the Style fields were merged into Node, paving the way for future improvements in bevy_ui's approach to styles.

SpatialBundle deprecation

SpatialBundle has been deprecated in #15830 as part of the Required Components work and usages have been replaced with the Transform and Visibility components, which both bring along their required components.

before

commands.spawn(SpatialBundle::default());

after

commands.spawn((Transform::default(), Visibility::default());

Observers

#15811 introduces the Trigger::components method, which allows observers to know which components trigger them.

Batch insert

#15702 introduces a few new APIs for inserting a batch of new entities.

  • World::insert_batch
  • World::insert_batch_if_new
  • World::try_insert_batch
  • World::try_insert_batch_if_new
  • Commands::insert_batch
  • Commands::insert_batch_if_new
  • Commands::try_insert_batch
  • Commands::try_insert_batch_if_new
use bevy_ecs::{entity::Entity, world::World, component::Component};
#[derive(Component)]
struct A(&'static str);
#[derive(Component, PartialEq, Debug)]
struct B(f32);

let mut world = World::new();
let entity_a = world.spawn_empty().id();
let entity_b = world.spawn_empty().id();
world.insert_batch([
    (entity_a, (A("a"), B(0.0))),
    (entity_b, (A("b"), B(1.0))),
]);

assert_eq!(world.get::<B>(entity_a), Some(&B(0.0)));

Curves

What are curves? well now there is documentation so you too can find out what they are and how to use them.

Picking

The new bevy_picking crate already supports UI and Sprite picking and #15800 brings mesh picking to the supported backends. This also brings support for performing ray casts on meshes.

The Bevy Linter

The bevy_cli working group has been developing a linter specifically for Bevy programs. As of this issue, the 5th lint has been created: A lint that warns against components, resources, and events that do not implement Reflect, which is functionality used by a variety of programs including bevy_inspector_egui.


Alice's Merge Train is a maintainer-level view into active PRs, both those that are merging and those that need work.

Showcase

Bevy work from the #showcase channel in Discord and around the internet. Use hashtag #bevyengine.

robot armrobot arm

Inverse Kinematics

showcase

An implementation of Inverse Kinematics for a robotics arm simulator.

molecular visualization

Molecular visualizer PoC

showcase

A molecular visualizer proof of concept. It visualizes linear alkanes specifically, that is chains of carbons with hydrogens.

hexagon landscape

Hexagon landscape

showcase

Hex terrain generated where the hex corner height is based on the average of the neighboring three cells of the corner with a twist.

wasabi-16

WASABI-16

showcase

WASABI-16 is a Bevy/Wasm-based fantasy console that can load cartridges. There have been a number of different updates including controller input and various color palette improvements.

chain lights

Breaking lamp chains

showcase

This game uses bevy_ecs and Radiance Cascades to implement breaking lamp chains.

settletopiasettletopia

Settletopia

showcase

Settletopia is a multiplayer open-world settlement/kingdom building game.

jarl

hit-flash explosions

showcase

When testing new hit-flash shader turns into madness

bevy no_std

Bevy no_std

showcase

Loading a PNG sprite and bouncing it around with velocity modified using the arrow keys. Running on UEFI with no operating system via QEMU.

uiui

Lists of Items

showcase

A set of UI screens showing lists of items with filters.

decalsdecals

Decal and particle effects

showcase

A supercut showcasing newly implemented decal and particle effects. The video includes a commissioned soundtrack so definitely check out the audio!

tracingtracing end

Velyst

showcase

A tracing animation using Velyst, an Interactive Typst content creator using Vello and Bevy. Reminiscent of a "Hold to interact" pattern.

pvp boxing

PvP boxing

showcase

The first player vs player fight in this boxing game. The physics are handled by PhysX.

rpg character creator

RPG style character customizer

showcase

An RPG style in-game character customizer.

chrome-like dev tools

Chrome-like UI devtools

showcase

A take on Chrome inspired dev tools using egui.

vulkan rtx bevy

Vulkan RTX backend for Bevy

showcase

A work-in-progress Vulkan RTX backend for bevy. The plan is for it to be a configurable test bed for raytracing demos and research.

Crates

New releases to crates.io and substantial updates to existing projects

voxy

Voxy

crate_release

A new voxel engine for Bevy with high performance meshing. You can now easily load in .vox files with lighting and emissive materials

space_editor

space_editor 0.6

crate_release

space_editor is a editor for scenes and prefabs for bevy engine. It allows you to create/modify/save/load levels and prefabs in a GUI based way. space_editor 0.6 brings Bevy 0.14 support, a new pretty ui, and more.

bevy_ui_inspector

crate_release

the initial version of a chrome devtools like inspector for bevy ui.

No devlogs this week
No Educational this week
Pull Requests Merged This Week
Contributing

Want to contribute to Bevy?

Here you can find two types of potential contribution: Pull Requests that might need review and Issues that might need to be worked on.

How do I contribute?

Pull Requests Opened this week

Issues Opened this week