Spooky Jam, Game Boy Jam, and 501c3 status
2024-09-30
The Bevy Spooky Jam is an unofficial Bevy game jam for the spooky season! It starts on October 4th and runs until October 21st. Bevy Spooky Jam is a casual game jam that the creator would like to turn into a monthly game jam if there's enough interest.
We also see a number of game-boy game jam submissions this week and a release of a new navigation mesh crate.
The Bevy Foundation is now a 501(c)(3) Public Charity!
501c3
The Bevy Foundation's Federal 501(c)(3) status in the US was announced this week, which means donations are income-tax-exempt for the Foundation, tax-deductible for donators in the US, and employer donation-matching programs become applicable. Check to see if your employer will match your donation!
Bevy Remote Protocol
As part of the ongoing Editor work, the Bevy Remote Protocol landed for the first time in #14880. The Bevy Remote Protocol, or BRP, provides a JSON rpc-style interface for querying running games. This currently allows you to query for entities with specific components and more including:
- querying components, returning entities and components that match
- spawning new entities with components
- destroying an entity
- inserting or removing components from an entity
- reparenting entities
Required Components
The Required Components feature enables requiring certain components to also be added when adding specific other components.
#14964 migrates bevy_transform
while #15474 migrates Visibility
.
This means that previously where you would spawn a Bundle:
commands.spawn(TransformBundle::IDENTITY)
You now only need to add the Transform
component, and required components like GlobalTransform
will be automatically added.
commands.spawn(Transform::IDENTITY)
There's a long list of Required Components refactors like this that are still being debated or implemented, so expect more of this kind of refactor when 0.15 comes around. Notably the concept of Bundles is not going away and these refactors are mostly about porting engine-level code.
Generic Animation
#15282 introduces the ability for AnimationClip
s to animate arbitrary properties.
An example AnimatableProperty
implementation for the font size of a text section is included in the PR description:
#[derive(Reflect)]
struct FontSizeProperty;
impl AnimatableProperty for FontSizeProperty {
type Component = Text;
type Property = f32;
fn get_mut(component: &mut Self::Component) -> Option<&mut Self::Property> {
Some(&mut component.sections.get_mut(0)?.style.font_size)
}
}
run_system
In #14920 a new run_system_cached
API allows the running of systems (like one-shot systems) without first creating/saving the SystemId, providing some nice ergonomic improvements.
Function Reflection
While #13152 added function reflection, it didn't really make functions reflectable. Instead, it made it so that they can be called with reflected arguments and return reflected data. But functions themselves cannot be reflected.
#15205 enables DynamicFunction
to actually be reflected.
disqualified
The disqualified
was initiated by a community member and the crate was transferred into the Bevy maintainership this week. It was used in Bevy in #15372.
Lazily shortens a "fully qualified" type name to remove all module paths. The short name of a type is its full name as returned by [
core::any::type_name
], but with the prefix of all paths removed. For example, the short name ofalloc::vec::Vec<core::option::Option<u32>>
would beVec<Option<u32>>
. Shortening is performed lazily without allocation.
bevy_ui scrolling
#15291 implements scrolling for bevy_ui! The implementation uses a new ScrollPosition
component.
System input references
#15184 introduces the ability to create systems that take references as input. This means that when piping or running systems, you can now use exclusive or shared references, as seen here.
let mut world = World::new();
let mut value = 2;
// Currently possible:
fn square(In(input): In<usize>) -> usize {
input * input
}
value = world.run_system_once_with(value, square);
// Now possible:
fn square_mut(InMut(input): InMut<usize>) {
*input *= *input;
}
world.run_system_once_with(&mut value, square_mut);
// Or:
fn square_ref(InRef(input): InRef<usize>) -> usize {
*input * *input
}
value = world.run_system_once_with(&value, square_ref);
Non-consuming trigger functions on World
#14894 introduces the ability to trigger observers for a specific event while also reacting to the changes the observer makes to the event. This involves passing an exclusive reference to the Event as an argument in the new World::trigger_ref
function, which will then run observers watching that event before returning to the code location that called trigger_ref
and allowing it to use the modified event data.
This is an established pattern in applications like the Paper Minecraft server, where a listener can modify event data.
Notably this is a function on World
, not Commands
.
QuerySingle
#15476 adds a new SystemParam
currently called Single
(but called QuerySingle
in this PR), which is valid if exactly 1 matching entity exists. A variant, written as Option<Single<D, F>>
, is valid if 0 or 1 matching entities exists.
A new example, ecs/fallible_params
, shows off the new functionality.
fn move_pointer(
// `Single` ensures the system runs ONLY when exactly one matching entity exists.
mut player: Single<(&mut Transform, &Player)>,
// `Option<Single>` ensures that the system runs ONLY when zero or one matching entity exists.
enemy: Option<Single<&Transform, (With<Enemy>, Without<Player>)>>,
time: Res<Time>,
) {
...
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.
From oxidized_navigation to vleue_navigator
showcase
Project Harmonia migrated npc navigation from oxidized_navigation to vleue_navigator this week, which also means a switch from the classic A* to Polyanya
Architect of Ruin Character Editor
showcase
The developers of Architect of Ruin are using this egui-based character editor to bring all the spine skeleton, attachment sprites, equipment, and color palettes together to test random character generation. They've already used it to build some new races out, including Hobbits and Dwarves.
Sweet Escape
showcase
Sweet Escape is a GBJAM12 entry which means game-boy style graphics and an old-school vibe.
You can also view the game in a video on YouTube
Redeath
showcase
Redeath is a platformer on the side of Celeste made for GBJam12. Its a game with an interesting mechanic and a great gameboy-like aesthetic.
Endeavor
showcase
Endeavor is a 3D Space Adventure where you can Explore, Gather, Build and Battle your way through the unknown frontiers of deep space. The first free playtest of Endeavor is scheduled for October 14, 2024! This game started life in Bevy 0.12 in 20213 before upgrading to 0.13 and 0.14.
Mercator early access
showcase
Mercator is a shopkeeping game where you craft items with workers, haggle for profit, and move goods via sail (and eventually wheel) across Asia (and eventually Africa and Europe) in the third century AD. The developer is looking for early access testers, so contact them in the Discord thread if you're interested.
Crates
New releases to crates.io and substantial updates to existing projects
vleue_navigator
crate_release
vleue_navigator is a navmesh crate that can integrate with Bevy and/or Avian to produce dynamic navigation meshes.
Features
- live navmesh updates with obstacles from Bevy's AABB, Bevy's primitive shapes, avian2d obstacles, avian3d obstacles
- easy to add new obstacles types with a trait to implement
- layers that are connected and can be updated independently
- layers that can overlap
- agent radius
bevy_submerge_ui 0.1.0
crate_release
bevy_submerge_ui is a ui plugin with tailwind like capabilities for bevy.
Features
- Nested UI components: Create hierarchical UI layouts with ease by referencing components by ID, without the need for complex child nesting.
- Tailwind-like styling: Apply styles directly in a familiar, space-separated format for quick UI customization.
- Scalable design: Designed for both small and large projects, allowing for modular and customizable UI layouts.
- Custom utilities: Submerge comes with some custom styling utilities like predefined colors, text sizes, border radius, all based on tailwind css presets.
Educational
Tutorials, deep dives, and other information on developing Bevy applications, games, and plugins
Low poly "heightmap" based terrain generation
educational
Low poly "heightmap" based terrain generation from plane meshes. Covers using noise to modify vertex positions, vertex colors, and updating normals.
bevy_reflect: Add `Function` trait authored by MrGVSV
Spirv passthrough main (adopted, part deux) authored by richchurcher
feature gate picking backends authored by BenjaminBrienen
split `bevy_reflect::derive::utilities` into proper modules authored by BenjaminBrienen
Add sprite and mesh alteration examples authored by richchurcher
Use crate: `disqualified` authored by BenjaminBrienen
bevy_reflect: Add dynamic type data access and iteration to `TypeRegistration` authored by MrGVSV
bevy_reflect: Replace "value" terminology with "opaque" authored by MrGVSV
Fix system param warnings on systems that cannot run anyways authored by MiniaczQ
Visibility range takes the model aabb into acount authored by JoNil
bevy_reflect: Update `EulerRot` to match `glam` 0.29 authored by MrGVSV
Add cached `run_system` API authored by benfrankel
Update ``glam`` to 0.29, ``encase`` to 0.10. authored by targrub
Allow animation clips to animate arbitrary properties. authored by pcwalton
Log monitor and window information at startup in bevy_winit authored by BenjaminBrienen
Bubbling observers traversal should use query data authored by BenjaminBrienen
Initial implementation of the Bevy Remote Protocol (Adopted) authored by mweatherley
Support systems that take references as input authored by ItsDoot
Zero fontsize panic workaround authored by UkoeHB
Add the ability to control font smoothing authored by coreh
`Reflect` for `TextureFormat` authored by clarfonthey
`impl_reflect!` for EulerRot instead of treating it as an opaque value authored by aecsocket
bevy_reflect: Add `ReflectRef`/`ReflectMut`/`ReflectOwned` convenience casting methods authored by MrGVSV
bevy_reflect: Automatic arg count validation authored by MrGVSV
UI Scrolling authored by Piefayth
Add World::trigger_ref and World::trigger_targets_ref authored by ItsDoot
Reduce runtime panics through `SystemParam` validation authored by MiniaczQ
bevy_ecs: flush entities after running observers and hooks in despawn authored by jrobsonchase
Fix untyped asset loads after #14808. authored by pcwalton
Fix horizontal scrolling in scroll example for macOS authored by Piefayth
Fix for SceneEntityMapper + hooks panic authored by jrobsonchase
Follow up to cached `run_system` authored by SkiFire13
Simpler lint fixes: makes `ci lints` work but disables a lint for now authored by clarfonthey
fix observer docs authored by fernanlukban
Fix action.yml syntax authored by BenjaminBrienen
List components for QueryEntityError::QueryDoesNotMatch authored by SpecificProtagonist
feature gate `use bevy_animation` in `bevy_gltf` authored by atornity
Better info message authored by BenjaminBrienen
Rename init_component & friends authored by hooded-shrimp
use precomputed border values authored by ickshonpe
Fix out of date template and grammar authored by BenjaminBrienen
Modify `derive_label` to support `no_std` environments authored by bushrat011899
Implement gamepads as entities authored by s-puig
Rename UiPickingBackend to UiPickingBackendPlugin authored by moOsama76
Reduce memory usage in component fetches and change detection filters authored by ItsDoot
Include AnimationTarget directly in the animation query rather than reading it through the EntityMut authored by chescock
Migrate visibility to required components authored by Jondolf
Migrate `bevy_transform` to required components authored by ecoskey
Refactor BRP to allow for 3rd-party transports authored by LiamGallagher737
Add `core` and `alloc` over `std` Lints authored by bushrat011899
Allow registering of resources via ReflectResource / ReflectComponent authored by pablo-lua
`QuerySingle` family of system params authored by MiniaczQ
bump async-channel to 2.3.0 authored by mockersf
Improve unclear docs about spawn(_batch) and ParallelCommands authored by Dokkae6949
Remove `Return::Unit` variant authored by hooded-shrimp
Fix `ReflectKind` description wording authored by JohnTheCoolingFan
Simplify `AnimatableProperty::Property` trait bounds authored by chompaa
Use `try_insert` in `on_remove_cursor_icon` authored by akimakinai
Make `CosmicFontSystem` and `SwashCache` pub resources. authored by tychedelia
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
[DRAFT] `no_std` Option for `bevy_tasks` authored by bushrat011899
Implement volumetric fog support for both point lights and spotlights authored by Soulghost
Asset locking authored by andriyDev
Clarify `Transform` and `GlobalTransform` documentation (adopted) authored by richchurcher
Rendertarget cmp (adopted) authored by richchurcher
Let query items borrow from query state to avoid needing to clone authored by chescock
Add `to_rectangle`, `area` and `perimeter` methods to `Capsule2d` authored by 13ros27
Documentation for variadics authored by BenjaminBrienen
Add Hidden to CursorIcon and CursorSource enums authored by fernanlukban
Change RawHandleWrapper so that we can create it authored by Jakkestt
Small addition to `World::flush_commands` explaining how `spawn` will cause it to panic. authored by 13ros27
Make `drain` take a mutable borrow instead of `Box<Self>` for reflected `Map`, `List`, and `Set`. authored by andriyDev
Curve-based animation authored by mweatherley
improve doc check authored by BenjaminBrienen
Add generic "relations" iteration to `bevy_hierarchy` authored by jrobsonchase
Add `VisitEntities` for generic and reflectable Entity iteration authored by jrobsonchase
Change ReflectMapEntities to operate on components before insertion authored by jrobsonchase
Gpu readback authored by tychedelia
Add initial APIs for getting world and commands for child_builders authored by fernanlukban
Remove render_resource_wrapper authored by bes
Clip to the UI node's content box authored by ickshonpe
Clarify purpose of shader_instancing example authored by IceSentry
Runtime required components authored by Jondolf
Rename BorderRect to Insets and move to bevy_math authored by rudderbucky
Minor fixes for `bevy_utils` in `no_std` authored by bushrat011899
Add `no_std` support to `bevy_tasks` authored by bushrat011899
Basic integration of cubic spline curves with the Curve API authored by mweatherley
Retained `LineGizmo`s WIP authored by tim-blackbird
WGSL Format CI authored by BenjaminBrienen
bevy_reflect: Generic parameter info authored by MrGVSV
Remove `labeled_assets` from `LoadedAsset` and `ErasedLoadedAsset` authored by andriyDev
Add try_despawn methods to World/Commands authored by rudderbucky
bevy_reflect: Add `ReflectDeserializerProcessor` authored by aecsocket
Implemented Resource for () authored by pablo-lua
Implement sprite animations authored by s-puig
Remove the `meta` field from `LoadedAsset` and `ErasedLoadedAsset`. authored by andriyDev
`QueryNonEmpty` system param authored by MiniaczQ
Migrate bevy_sprite to required components authored by ecoskey
Make `SampleCurve`/`UnevenSampleCurve` succeed at reflection authored by mweatherley
Better warnings about invalid parameters authored by MiniaczQ
Add `register_resource_with_descriptor` authored by chompaa
bevy_asset: Improve `NestedLoader` API authored by aecsocket
Issues Opened this week
Add CursorIcon::Hidden authored by viridia
Implement KeyboardFocus resource and focus keyboard events authored by viridia
`run_system_cached` API will reject systems created by `pipe` and `map` authored by benfrankel
Allow plugins to define component requirements authored by Jondolf
Improve diagnostics for or interdict the panic "font size cannot be 0" authored by brandon-reinhart
Texture atlases should use atlas layouts, not atlas indices authored by alice-i-cecile
TAA code contains an uncached query for 3D cameras authored by alice-i-cecile
simple_picking.rs example doesn't print click event authored by lloydparlee
`DirectNestedLoader::load` sometimes uses asset type's default loader instead of inspecting path authored by nightkr
Transmission / opacity should affect shadow strength authored by djkato
Colored glass should cast colored shadows authored by djkato
`missing-metadata` workflow fails and posts a misleading comment if `Cargo` itself breaks authored by clarfonthey
Respect `SystemParam::validate_param` for observers and other non-executor system runners authored by MiniaczQ
`NonEmptyEventReader` system parameter authored by MiniaczQ
Logging for system parameter validation should be configurable authored by alice-i-cecile
Add docs to `RawHandleWrapper::_window` field authored by alice-i-cecile
Add `world` and `world_mut` methods to `WorldChildBuilder` authored by benfrankel
Render/Light layers data in shader example authored by Bcompartment
`cargo run -p ci` doesn't handle doc tests properly authored by alice-i-cecile
Subassets of subassets do not work. authored by andriyDev
Follow up on Retained Rendering authored by Trashtalk217
UI Grid Placement Styles should hold the calculated values during runtime. authored by Atlas16A
use more levels of spans than always info authored by mockersf
Allow use of systems for custom time handling authored by maniwani
The underlying API or device in use does not support enough features to be a fully compliant implementation of WebGPU. authored by mzdk100
CI should check for properly formatted wgsl authored by BenjaminBrienen
Add `init_resource_with_descriptor` authored by MichalGniadek
Make the use case for configuring `TimeUpdateStrategy` and `Time<Real>` more clear authored by BenjaminBrienen
move `BorderRect` into `bevy_math` authored by ickshonpe
Tracking Issue: MVP `no_std` Bevy authored by bushrat011899
multiples camera with RenderLayers doesn't work with Msaa::Off authored by mirsella
Remove `LoadedAsset::meta` authored by andriyDev
Support same-state transitions out of the box via new schedules authored by benfrankel
Provide an API to read/write `Image` pixels with borrows. authored by andriyDev
Improved UI overflow API authored by ickshonpe
regression in GLTF Scene loading authored by eidloi
Border / raidus doesn't respect full Node size. authored by eidloi
Bevy 3D graphics show blank authored by collin80
animation triggers/events authored by atornity
Optimize `validate_param` authored by MiniaczQ