This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

0.14.2, Compute Shaders, and Simulations

2024-09-09

0.14.2 is out! Including fixed for UI elements, gizmos, hue mixing, and more. See the full list over on GitHub.

Animations also get a boost this week with Animation Masks, a major part of a highly desired feature. We also see progress in the curves and picking working groups as well as some 0.14.2 UI fixes! And while we won't cover performance this week in depth, don't forget about #14673 which opportunistically used dense iteration for a 3.5x speedup in hybrid parallel iteration.

There are a number of compute shader showcases this week, including shallow water, particle life, and Nannou's new compute abstractions.

Animation Masks

animation masking

The lack of masking bones is one of the most commonly requested missing features in the AnimationGraph implementation in 0.14. As of #15013 support for mask groups has been implemented, which allows toggling animation effects on and off for specific groups of bones.

Note that additive blending of animations is not included in this PR, although it is intended to come next. Additive blending is the feature that would allow for a humanoid walking animation that affected the legs, and a punching animation that affected the upper body, to blend together and apply at 100% for their respectively masked affected parts.

You can check out the new animation_masks example to see it in action.

ShaderStorageBuffer

storage buffers

#14663 adds a fantastic new feature to allow creating a storage buffer without needing to access the RenderDevice. This is useful for sharing the same buffers between compute and material shaders and fixes a cowpath where previously it was easier to do it in a less optimal way.

Check out the new shader/storage_buffer example which shows how to take advantage of the new ShaderStorageBuffer asset.

System Ordering Ambiguities

Remove all existing system order ambiguities in DefaultPlugins.

Systems run in parallel, but their order isn't always deterministic. The nondeterministic_system_order example already shows this, #13950 adds ambiguity_detection tests in CI, and #15031 removes all system order ambiguities from DefaultPlugins, resulting in fewer bugs and cleaner diagnostic output

UI Fixes

A number of UI fixes were merged, especially around slicing. Some of these are in 0.14.2.

bevy_mod_picking the upstreamening

Picking event ordering

Ignore clicks on uinodes outside of rounded corners

Curve Crew

#14976 introduces new color interpolation techniques using the new Curve functionality to power a ColorCurve. This allows interpolating between multiple colors and using the fancy new curve apis.

let gradient = ColorGradient::new([
  basic::RED,
  basic::LIME,
  basic::BLUE
]).expect("non-empty");
let curve = gradient.to_curve();
let brighter_curve = curve.map(|c| c.mix(&basic::WHITE, 0.5));

Showcase

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

marching cubes

Marching cubes

showcase

This implementation of marching cubes is implemented on the CPU and swaps out the mesh and collision entirely. It's usually ~1-2ms to recompute the mesh of this size (32x32x32)

broken glass

Destructible Glass

showcase

Prototype destructible glass in bevy. Next up: implementing recursion (being able to break already broken glass).

meshlets

Meshlet screenspace-derived tangents

showcase

Showing of the work in #15084 (which is a Draft PR), this is tangents derived from screen space derivatives as part of meshlets' visbuffer resolve instead of precalculating and storing in a vertex buffer saving 16 bytes per vertex!

particlesparticles

Bevy + Nannou Compute Shaders

showcase

This demo shows off newly added support for compute shaders to Nannou. This is a particle system written in a 200 line sketch.

The sketch is really interesting and includes a compute shader abstraction that is somewhat similar to Bevy's Material.

sand simulationsand simulation

Sand Simulation

showcase

A Particle-component and Entity based sand simulation.

typing game

typing+mining prototype

showcase

early progress on a new type-to-mine game. Type words to mine blocks and make it to the flag.

The camera shake is powered by bevy_camera_shake

grass

Grass, trees, and flowers

showcase

work in progress rendering grass, trees, and flowers.

weapon switchingweapon switching

Weapon Switching

showcase

Switching weapons has been added to this pokemon-like game. Poke balls will be thrown with the left hand.

particle lifeparticle lifeparticle life

Particle Life

showcase

Particle Life is a color based particle simulation: a color may either attract, repel or be neutral towards each of the other colors. However, this relation is asymmetric, so for example blue may attract red, but red may be neutral or repel blue. 60fps with 300k particles, 20k bounds and 300 max distance.

Source is available on GitHub and a video is available on YouTube

car controller

Vehicle Joints

showcase

Progress on a vehicle physics implementation using Rapier. The code is originally from the vehicle_joints3 example from the rapier repository.

killer queen

Killer Queen

showcase

A fast-paced, 4-10 player, local multiplayer, arcade-like 2d platformer inspired by the addictive arcade game Killer Queen

techy cards

Bevy-themed Physical Card Game

showcase

A Bevy-themed physical card game!

The goal of the game is to combine 3 types of cards in a short session, to get the most points:

  • Members: "relevant" actors from bevy ecosystem
  • Crates: bevy-relevant dependencies
  • Techniques: whatever makes a project work

Development of the project will be open sourced, and physical packs might happen one day.

shallow watershallow water

Shallow Water Simulation

showcase

A port of spherical shallow water simulation to compute shaders with Bevy. High resolution working just fine at 60fps

vleue_navigator

Pathfinding in "3d"

showcase

work-in-progress pathfinding in 3d (while sticking to a surface, not full 3d pathfinding). This works by building a navmesh with different layers, and each layer can have it's own cost of traversal, and can be one way or traversable only on specific conditions

Crates

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

bevy_simplenet v0.13.0

crate_release

bevy_simplenet is a networking crate based on websockets. Supports native and WASM clients.

  • Added AuthToken for client authentication. This was the last big missing feature.
  • Added ability to construct servers with a pre-defined axum router.
  • Removed nightly dependency.

Bevy Replicon 0.28.1

crate_release

bevy_replicon is a crate for server-authoritative networking.

0.28.1 adds:

  • 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.
  • Entity mapping when a client event is buffering is fixed.

The full changelog is available on GitHub

bevy_easy_configbevy_easy_config

bevy_easy_config v0.2.0

crate_release

bevy_easy_config allows you to automatically load structs at startup, from the asset folder, by simply deriving the proper traits, and adding it with the bevy easy config plugin. Now the struct is available from anywhere in your code as a resource, and it even hot reloads!

spritesheet

bevy_spritesheet_animation 0.4.2

crate_release

bevy_spritesheet_animation is a Bevy plugin for animating sprites that are backed by spritesheets

0.4.2 adds:

  • 3D sprites are now supported (both static and animated) 🎉
  • Sprite playback can now be manually controlled if needed (eg. "go to frame 3", "reset that animation", ...)
  • The high-level API has been made simpler and more concise so that it's a breeze to configure animations
  • Various optimizations have sped up playback by a factor of about 3
transition

bevy_2d_menu_mask_transition

crate_release

bevy_2d_menu_mask_transition release is a plugin for creating smooth menu transitions with customizable masks.

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