This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

Bevy Jam 5, Radiance Cascades, and Calculators in many ui kits

2024-07-22

Bevy Jam 5 is underway! If you haven't joined in yet you still have a whole week so head on over to Itch.io and join the jam.

We've got a whole bunch to cover this week including some exciting crate releases that, if you ask me, were motivated by Bevy Jam 5, and a number of full open source games and releases.

We'll start off as usual covering some project ongoings and merges before getting deeper into the ecosystem and even seeing a 3D editor for Mario Kart Wii tracks.

Observers

Observers are brand new in Bevy 0.14 but their implementation in that release is considered the "first" implementation. With that in mind we're already starting to see Observers evolve further with Event Bubbling, a new OnReplaced event and allowing Observer systems to have outputs;

If you're still looking for a Hooks and Observers overview, check out this video which is mentioned later in this issue.

Unofficial Bevy Meetup 5

Bevy Meetup #5 was livestreamed just before Bevy Jam #5 with two talks.

Calculating UI Toolkits

calculator demos

There are many implementations of UI toolkit in progress these days, which means picking one could be a decision on your list. Over the last week a number of different toolkit authors have built out Calculator examples.

The first calculator example is here in the #ui channel in the Bevy Discord, and there's some good discussion from framework authors detailing the different approaches and priorities of crates like sickle_ui and quill.

Radiance Cascades

radiance cascades

Radiance Cascades are an interesting global illumination technique that have been gaining interest over the last few weeks after a YouTube video was released talking about them.

While the video was recent, the paper (YouTube link) was released almost a year ago which has resulted in useful visualizations of the technique, fancy demos, and articles having been written about it. There's a lot of information about them these days.

bevy_flatland_radiance_cascades and bevy_radiance_cascades are a couple of recent implementations in Bevy.

While there have been other research-level efforts over the last year such as bevy_ridiculous_ssgi, 3d Radiance Cascades don't seem to work out as well as 2d, but the technique is great for 2d.

wgpu goes major

release notes - reddit

wgpu got its first major release, starting with v22.0.0 which follows on from the previous 0.21.0. This is notably not a "stable 1.0 release" but reflects the fact that wgpu has been used in production by many projects including Bevy, and powers the implementation of the WebGPU API in Servo, Firefox, and JavaScript for Deno.

It is a well-known fact that WGPU has been used for applications and platforms already in production for years, at this point. We are often concerned with tracking breaking changes, and affecting these consumers' ability to ship. By releasing our first major version, we publicly acknowledge that this is the case.

Naming closure systems

14369 introduces a new API to enable renaming closure-based systems, which allows them to show up in tooling as named item rather than ::{closure}. This will show most often in tools like bevy_mod_debugdump and tracing.

app
    .add_systems(Startup, IntoSystem::into_system(|name: SystemName| {
        println!("System name: {}", name.name().to_owned());
    }).with_name("print_test_system"));

Isometries

#14269 introduces the concept of Isometry types into the bevy_math. Isometries represent rigid motion in two and three dimensions such as translation and rotation but not reflection. If you want to learn more about them, check out the follow up PR with adds some more examples to what can feel like a very abstract concept.

One common operation is to compute an isometry representing the relative positions of two objects for things like intersection tests. This can be done with an inverse transformation:

use bevy_math::{Isometry2d, Rot2, Vec2};

let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0));
let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0));

// Compute the relative position and orientation between the two shapes
let relative_iso = circle_iso.inverse() * rectangle_iso;

// Or alternatively, to skip an extra rotation operation:
let relative_iso = circle_iso.inverse_mul(rectangle_iso);

Cyclic Splines

cyclic splines

14106 introduced a new trait CyclicCubicGenerator to power the generation of cyclic curves through control points. This trait is implemented for a number of different types including CubicHermite, CubicCardinalSpline, CubicBSpline, and LinearSpline.

plugin_group! macro

14339 introduced a new plugin_group! macro which is a more restrictive version of building a custom PluginGroup but provides some nice wins in terms of keeping documentation up to date. This is the same trait that DefaultPlugins and MinimalPlugins implement.

Built in PostProcessing stack

chromatic aberration

#13695 introduces a new built-in postprocessing shader that's design to hold miscellaneous postprocessing effects. It then continues to start with chromatic aberration as the first effect. The effect is usable through adding ChromaticAberration to your camera.

The PR, as is usual with pcwalton's effects, is well documented, explained, and comes with a new usage example: post_processing. I highly suggest checking this PR out if you're interested in how Bevy's rendering systems work.

Localized Volumetric Fog

bunny fog

#14099

Currently, volumetric fog is global and affects the entire scene uniformly. This is inadequate for many use cases, such as local smoke effects. To address this problem, this commit introduces fog volumes, which are axis-aligned bounding boxes (AABBs) that specify fog parameters inside their boundaries. Such volumes can also specify a density texture, a 3D texture of voxels that specifies the density of the fog at each point.

A new example, fog_volumes, has been added. It demonstrates a single fog volume containing a voxelized representation of the Stanford bunny. The existing volumetric_fog example has been updated to use the new local volumetrics API.


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

Showcase

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

meshlets

Destructible Meshlets

showcase

This is sdf -> volumes -> surface_nets -> Mesh -> Meshlet

Which isn't quite the intended use case vision for Meshlets but is still very cool.

FPS

Source-inspired FPS

showcase

The start of a Source inspired FPS with more modern mechanics. So far view model animations along with player and gun state are implemented with more to come

quill

Quill/Vortex

showcase

Another Quill demo this week. This is the Vortex crate in the quill repo. The node graph is being used to generate WGSL source code for a custom shader.

There's plenty of discussion and demo code in the Discord thread as well

Radiance Cascades

bevy_radiance_cascades (wip)

showcase

This is an implementation of Radiance Cascades (which we cover in more depth in the overview this week). The discord thread contains a link to an extremely information year-long thread in the Graphics Programming Discord if you're interested in implementing Radiance Cascades yourself.

pack spawning

Pack spawning

showcase

Some work on pack spawning and "giblets".

In the thread on this one was a hidden gem of "pro tips on lighting":

  • Remove ambient light
  • Add environment map light
  • Add SSAO
  • Alternatively to the last two points, bake lightmaps.
sandbox support

Sandbox Support

showcase

Project Harmonia gained sandbox support amongst some refactoring efforts

kataster

Kataster

showcase

Kataster is a 2d space shooter that just upgraded to Bevy 0.14 and now uses features like state scoped entities and sub-states. Some crates used include avian2d, bevy_hanabi, and leafwing_input_manager

rpg

RPG

showcase

An Avian3d and Bevy 0.14 upgrade for this RPG.

Desktop Pet

Desktop Pet

showcase

A desktop pet in Bevy! This one is also open source so take a look and make your own!

custom character controller

Avian3d Custom Character Controller

showcase

This is a custom character controller built on top of Avian3d and its shape casting. This example is networked, server authoritative and currently running at 100ms ping with 2% packet loss.

procedural animation

WIP Procedural Animation crate

showcase

This is a work-in-progress crate for procedural animation using second order dynamics and inverse kinematics inspired by t3ssel8r.

level editorlevel editor
gizmos

3D editor for Mario Kart Wii tracks

showcase

Each course’s functional data is stored in a .kmp file, which is what the program edits. Each color represents a collision type such as road, off-road, etc. The gizmos are powered by transform-gizmo

vr windows

VR Window Manager

showcase

This is a VR window manager / desktop environment for windows.

electromagnetic wave simulatoruom

electromagnetic wave simulator

showcase

An electromagnetic wave simulator that was later updated to use uom for units.

to build a home cursor

To Build a Home: Custom Cursor

showcase

To Build a Home implemented a custom cursor that cursor changes into a hand when hovering over an object you can interact with. This work uses a UI image but there's also an open PR for custom cursor support in Bevy at a deeper level.

2d character2d attack

TheSeekerGame

showcase

This 2d action/adventure game is being built by a group of four as an open source project. Its described as a combination of hollow knight and risk of rain 1 and there's even documentation.

pong!

Pong in an hour!

showcase

How far could you get on a Pong implementation in an hour? Here's one person's attempt.

el mono

El Mono Steam Release

showcase

This project was originally an effort to go through the entire dev cycle to see how viable bevy is for more sustained projects. Due to the state it was able to achieve, it was released on Steam.

The game uses bevy_steamworks and vanilla bevy_ui.

Crates

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

Beet 0.0.3

crate_release

Beet is a behavior library that uses entities to represent nodes in behavior graphs, connecting them with the the Parent/Children relationship we all know and love.

Previously change detection was used for control flow, replacing this with observers allows for instant graph traversal and solves what was the biggest painpoint in the library.

bevy_ecs_tiled

crate_release

bevy_ecs_tiled is a Tiled integration built on top of bevy_ecs_tilemap. It already has support for infinite maps, TSX files, and unloading/reloading maps.

Bevy Lunex 0.2.2

crate_release

bevy_lunex is a path based retained layout engine for Bevy entities, built around vanilla Bevy ECS and is the ui crate behind the Bevypunk example.

0.2.2 adds free cursor movement support for Gamepads.

Bevy_Fabulous 0.1.1

crate_release

Bevy fabulous aims to provide a framework for encapsulating and coupling a loaded GLTF to it's gameplay components without using heavy tooling, or opinionated plugins.

Bevy Easy Compute 0.14

crate_release

bevy_easy_compute is an updated version of the older bevy_app_compute project, aiming to make it easier to write and run compute shaders in Bevy apps.

Bevy Caravan v0.1.0

crate_release

This is a procedural macro designed to make expressing query.get statements easier.

ref_caravan!(entity :: query = bindings);

would expand into

let Ok(bindings) = query.get(entity) else { continue; };

bevy_ecs_tilemap 0.14

crate_release

bevy_ecs_tilemap is an ECS driven tilemap rendering library. It’s designed to be fast and highly customizable. Each tile is considered a unique entity and all tiles are stored in the game world.

As is typical, the examples directory contains demos for square and hex grids, isometric levels, proof-of-concept ldtk and tiled levels (although you may prefer bevy_ecs_ldtk or bevy_ecs_tiled which build on top of tilemap), chunking, custom materials, and more.

Version 0.14 brings it up to date with Bevy 0.14, which we normally wouldn't cover, except this is notable because there wasn't a 0.13 release to crates.io.

bevy_picking_tilemap

crate_release

A bevy_mod_picking backend for bevy_ecs_tilemap

bevy_ecs_ldtk

crate_release

For those who don't know, LDtk is a modern, user-friendly 2d level editor for tilemap based games: https://ldtk.io/

bevy_ecs_ldtk is an ecs-friendly LDtk plugin for bevy. Check out the README to learn more or start with the book

sickle_ui

sickle_ui

crate_release

sickle_ui is a widget library built on top of bevy's internal bevy_ui.

bevy_keith

bevy_keith

crate_release

With a shiny new tiled SDF renderer, this 2D graphics library offers an immediate-mode style API to draw highly dynamic texts and shapes in a single (or so) draw call, with built-in support for anti-aliasing and high DPI rendering (native physical resolution).

bevy_cobweb_ui v0.1.0

crate_release

Newly released UI crate layered on sickle_ui. Adds reactivity helpers using bevy_cobweb and an asset-driven workflow with advanced localization support.

bevy_octopus v0.3.0

crate_release

A Low-level ECS-driven network plugin for Bevy. Support tcp udp websocket and json bincode auto transformer

bevy_rectray v0.1.0

crate_release

A minimal 2d layout system (that works in 3d!) for bevy.

No devlogs this week

Educational

Tutorials, deep dives, and other information on developing Bevy applications, games, and plugins

zero to pong 2

Advancing Pong Part A: With Physics Using Bevy Rapier

educational

Part two of "Zero to Pong", which introduces Bevy Rapier to the project.

hooks and observers

Component Hooks and Observers in Bevy 0.14

educational

A Component Hooks and Observers video for anyone who hasn't had the time to dig into them yet. It covers basic to intermediate usage as well as a bonus section on the recently merged bubbling events.

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