Bevy Remote Protocol, TheLightmapper, and particles
2024-12-16
The Bevy Remote Protocol is still capturing the attention of anyone with an editor available. We've now seen neovim, emacs, egui, standalone, and VSCode based inspectors using the new Bevy Remote Protocol.
Meanwhile interesting lightmapping experiments are happening with TheLightmapper/Bevy workflows, picking through portals, and more.
A number of PRs made it in this week, including really interesting reflection, curve, and event source features.
SystemInput tuples
#16814 introduces the ability to accept arbitrary tuples of SystemInputs. While only 8-arity tuples are implemented in core, 9+ can be added in userland if necessary.
fn by_mut((InMut(a), In(b)): (InMut<usize>, In<usize>)) {
*a += b;
}
let mut world = World::new();
let mut by_mut = IntoSystem::into_system(by_mut);
by_mut.initialize(&mut world);
let mut a = 10;
let b = 5;
by_mut.run((&mut a, b), &mut world);
assert_eq!(*a, 15);
Event Source Location Tracking
#16778 adds core::panic::Location to EventId
which allows users to figure out where an event was sent from.
This functionality is behind the tracking_change_detection
feature.
fn apply_damage_to_health(
mut dmg_events: EventReader<DealDamage>,
) {
for (event, event_id) in dmg_events.read_with_id() {
info!(
"Applying {} damage, triggered by {}",
event.amount, event_id.caller
);
…
2024-12-12T01:21:50.126827Z INFO event: Applying 9 damage, triggered by examples/ecs/event.rs:47:16
bevy ui debug overlay
As of #16693 the bevy ui debug overlay is rendered by the ui renderer and lives behind the bevy_ui_debug
feature.
cargo run --example testbed_ui --features bevy_ui_debug
Derivative access patterns for curves
#16503 introduces the ability to access the derivatives of curves.
let points = [
vec2(-1.0, -20.0),
vec2(3.0, 2.0),
vec2(5.0, 3.0),
vec2(9.0, 8.0),
];
// A cubic spline curve that goes through `points`.
let curve = CubicCardinalSpline::new(0.3, points).to_curve().unwrap();
// Calling `with_derivative` causes derivative output to be included in the output of the curve API.
let curve_with_derivative = curve.with_derivative();
// A `Curve<f32>` that outputs the speed of the original.
let speed_curve = curve_with_derivative.map(|x| x.derivative.norm());
Make StandardMaterial bindless
#16644 takes advantage of the work in #16368 to enable using bindless textures in Bevy's StandardMaterial
bevy_reflect: Generic and Variadic Functions
#15074 introduces the ability to overload reflected functions. This adds support for generic functions:
let reflect_add = add::<i32>
.into_function()
.with_overload(add::<u32>)
.with_overload(add::<f32>);
as well as variadic functions
// Supports 1 to 4 arguments
let multiply_all = (|a: i32| a)
.into_function()
.with_overload(|a: i32, b: i32| a * b)
.with_overload(|a: i32, b: i32, c: i32| a * b * c)
.with_overload(|a: i32, b: i32, c: i32, d: i32| a * b * c * d);
Showcase
Bevy work from the #showcase channel in Discord and around the internet. Use hashtag #bevyengine.
Rustcraft 0.8
showcase
Rustcraft is a recreation of Minecraft using Bevy. Updates are in the changelog
The Lightmapper + Bevy
showcase
An architecture visualization demo using The Lightmapper along with light instructions for how to play with it yourself! Note that the instructions are not a tutorial and is only confirmed to work on Windows at the moment (Lightmapper One work is ongoing)
Crates
New releases to crates.io and substantial updates to existing projects
ramp_gen
crate_release
A utility to generate functions for rust and wgsl similar to Blender's "Color Ramp" node.
iyes_progress v0.13.1
crate_release
iyes_progress
is a crate to help you with creating loading screens where you might need to do arbitrary complex work, beyond just loading assets. It can keep track of everything for you and transition your state when all of your stuff reports completion.
This semver-compatible release adds a couple of new big features:
- "Progress as Entities". This is an additional/alternative way of tracking progress. You can add the new
ProgressEntity<S>
component to entities and store progress there. This progress will be summed up and counted alongside all progress reported via the other existing mechanisms (returned by systems, stored in manual entries, etc.). - Progress from background tasks/threads. Give them a
ProgressSender
and they can send their progress updates, whichiyes_progress
will apply to their respective progress tracker entries. Requires the"async"
cargo feature.
berdicles
crate_release
General purpose instancing and projectile system
0.3 brings a new ribbon shader, support for custom instance buffers, and more
bevy_vox_scene 0.17
crate_release
bevy_vox_scene is a plugin for loading Magica Voxel files directly in bevy as usable meshes.
0.17 brings support for importing Magica Voxel's cloud materials as fog volumes, using the new fog density image feature in bevy 0.15. This means that bevy_vox_scene now supports all of Magica Voxel's material types.
bevy_minibuffer
crate_release
A gamedev console in your application with support for tab completion, user prompts, command running, and more. Currently supports Bevy 0.14
Beet 0.0.4
crate_release
Similarly to how observers introduced entities as events, beet introduces entities as control flow.
Why its cool
- Its modular: instead of creating a new type for each state/behavior, add another child entity.
- Its paradigm agnostic: At its core Beet simply provides tools to describe whether a behavior entity is running, the rest is just various ways that behaviors can be connected
There is a Quickstart
Devlogs
vlog style updates from long-term projects
Educational
Tutorials, deep dives, and other information on developing Bevy applications, games, and plugins
Replace deperacted bundle mention in the comment authored by Mclilzee
:arrow_up: Upgrade typos and its configuration authored by homersimpsons
Rename `trigger.entity()` to `trigger.target()` authored by aevyrie
Add `World::try_resource_scope` authored by atornity
:pencil2: Fix typos across bevy authored by homersimpsons
Allow holes in the `MeshInputUniform` buffer. authored by pcwalton
Document why `MAX_JOINTS` and `MAX_MORPH_WEIGHTS` are set authored by BenjaminBrienen
Feature gate `is_polygon_simple` behind the `alloc` feature. authored by pcwalton
Link to required components docs in component type docs authored by Jondolf
Added stress test for large ecs worlds authored by Trashtalk217
Use multidraw for shadows when GPU culling is in use. authored by pcwalton
Make `StandardMaterial` bindless. authored by pcwalton
Batch skinned meshes on platforms where storage buffers are available. authored by pcwalton
one shot system cleanup authored by pemattern
Add RenderDiagnosticsPlugin to diagnostics example authored by JMS55
Update hashbrown to 0.15 authored by clarfonthey
Derivative access patterns for curves authored by mweatherley
Make benchmark setup consistent authored by BD103
Polygon simplicity authored by lynn-lumen
Fix crash when component parameters are invalid authored by purplg
box shadows comment fix authored by ickshonpe
Don't unconditionally create temporary render entities for visible objects. authored by pcwalton
BRP serialization tests authored by Leinnan
Rename `RayCastSettings` to `MeshRayCastSettings` authored by Jondolf
More complete documentation of valid query transmutes authored by chescock
Fix atan2 docs authored by dbeckwith
fix tiny copy-paste mistake in `bevy_text::font_atlas_set` authored by onkoe
Improve child_builder add_child documentation slightly authored by VictorElHajj
Rename Pointer<Down/Up> -> Pointer<Pressed/Released> in bevy_picking. authored by harun-ibram
bevy_reflect: Function Overloading (Generic & Variadic Functions) authored by MrGVSV
Rename `EntityCommands::clone` to `clone_and_spawn` authored by JaySpruce
Draw the UI debug overlay using the UI renderer authored by ickshonpe
Register type `BoxShadow` authored by jf908
rename enqueue_command to queue_command for consistency authored by spvky
fix doc links for PointerHits authored by spvky
Descriptive error message for circular required components recursion authored by SpecificProtagonist
Ignore the 'instant is unmaintained' advisory. authored by andriyDev
Support tuple structs in AnimatedField authored by yonzebu
Misc. docs and renames for niche ECS internals authored by JaySpruce
Remove the coordinate rounding from `extract_text_sections`. The coor… authored by ickshonpe
Event source location tracking authored by SpecificProtagonist
Improve `bevy_input_focus` authored by eckz
Remove TODO and add docs about limitations of `PlaybackMode::Once` authored by rparrett
Update the prepass shaders and fix the batching logic for bindless and multidraw. authored by pcwalton
`BorderRect` maintenance authored by ickshonpe
UI slice bug authored by romamik
Remove duplicated instruction line in `lighting` example authored by rparrett
Upgrade Taffy to 0.7 authored by nicoburns
box-shadow clipping fix authored by ickshonpe
Remove the `meta` field from `LoadedAsset` and `ErasedLoadedAsset`. authored by andriyDev
Reorder PickSet::Focus systems authored by UkoeHB
Make indirect drawing opt-out instead of opt-in, enabling multidraw by default. authored by pcwalton
Fix Clippy lints in benchmarks authored by BD103
BRP strict field in query authored by Leinnan
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.
Pull Requests Opened this week
Faster entity cloning authored by eugineerd
Use frostbite's specular sampling direction for environment map light authored by JMS55
Update clipping rects in `ui_layout_system` authored by ickshonpe
Making sure each plugin indicates its default group and feature when … authored by seivan
Add `no_std` support to `bevy_ecs` authored by bushrat011899
bevy_reflect: Add `reflect_fn!` macro authored by MrGVSV
Higher quality lightmap sampling authored by JMS55
Improve ComputedNode accessibility authored by UkoeHB
Use one `BevyManifest` instance in proc macros authored by raldone01
Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. authored by pcwalton
Introduce support for far culling when using `PerspectiveProjection` authored by ptsd
Add std derives to SystemParam types authored by spectria-limina
Replace FixedBitSet in Access and FilteredAccess with sorted vectors authored by Trashtalk217
Use explicitly added `ApplyDeferred` stages when computing automatically inserted sync points. authored by andriyDev
Support scale factor for image render targets authored by msvbg
Add `AssetChanged` query filter authored by tychedelia
Fix `compile_fail` compile fail authored by BD103
Fix registering all reflection types that are components as reflection components authored by anlumo
Allow `extract_meshes_for_gpu_building` and `extract_mesh_materials` to run in parallel. authored by pcwalton
Tab navigation framework for bevy_input_focus. authored by viridia
Add ability to mute audio sinks authored by mgi388
Made UIRect initialisation functions `const` authored by Kees-van-Beilen
Fix stale comment on `LoadContext::finish`. authored by andriyDev
Make `#[bindless]` in `ExtendedMaterial` actually enable bindless mode. authored by pcwalton
Add missing `#[reflect(Component, Default)]` to `SceneRoot` and `DynamicSceneRoot`. authored by pcwalton
Change `GpuImage::size` from `UVec2` to `Extent3d` authored by Noxmore
Remove the type parameter from `check_visibility`, and only invoke it once. authored by pcwalton
Issues Opened this week
Fallible systems need to report failures authored by alice-i-cecile
`Readback` only reads the first layer of 2D array images authored by EmbersArc
Reflect trait should not require Send + Sync bounds authored by alice-i-cecile
Parallax correct our cubemap reflections authored by pcwalton
RenderPlugin::build is unsound authored by spectria-limina
Required components should accept constant and enum values of the appropriate type authored by alice-i-cecile
Empty game (no logic) has 50% CPU usage and low FPS (40+ instead of 60) on iOS authored by wentao
Bevy UI nodes are always pixel-aligned and there is no way to disable it authored by MatrixDev
Make `extract_mesh_materials` and `MaterialBindGroupAllocator` public authored by jadedbay
Combine upscaling, rcas, and tonemapping passes into one "camera resolve" render node authored by JMS55
Add tools to avoid unnecessary AssetEvent::Modified events that lead to rendering performance costs authored by MatrixDev
PerspectiveProjection - Incorrect behaviour for `far` authored by ptsd
Registry Types schema endpoint in Bevy Remote Protocol authored by Leinnan
OpenRPC support in Bevy Remote Protocol authored by Leinnan
Record render diagnostics for all engine passes authored by JMS55
Add and use a `naga_oil` macro to abstract over material texture sampling shader code authored by alice-i-cecile
Comprehensive Source Tracking authored by NthTensor
Visual tearing with `ImageFilterMode::Nearest` authored by musjj
Crash in bevy_ui with specific node hierarchy authored by romamik
Bevy 0.14.2 android game with simple rendering logic crashes at start authored by wentao
`ShaderRef::Handle` missing does not generate warning. authored by mintlu8
Bevy on iOS is running into thread priority inversion issue authored by wentao
`Text2d` and `TextSpan` is not center-aligned when `JustifyText::Center` is specified. authored by Ramirisu
-[MTLDebugComputeCommandEncoder dispatchThreadgroups:threadsPerThreadgroup:]:1293: failed assertion authored by wentao
SSR reflections of SSR materials is black authored by aevyrie
Error in loading_screen.rs example authored by muttering-oldman
TextUiReader requires a parent Text to function, despite TextSpan docs authored by voximity
ndc_to_world seems to have wrong output range in documentation authored by jwir3
The headless_renderer example doesn't generate an image. authored by Gaeric
RenderAssetUsages Reflection Incomplete authored by anlumo
Do not test benchmarks in CI authored by BD103
`compile_fail_utils` no longer compiles authored by BD103
Add benchmarks and compile fail tests back to workspace authored by BD103
(Android) Crash when there's more than eight touches at once. authored by BUGO07
Nix packaging example does not exist anymore authored by Micaias32
Applying an Image to another Image authored by dmyyy
Ui Layout not updated when the window manager changes initial window size authored by Fice
`RequestRedraw` doesn't work as expected authored by lomirus