This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

Motion Blur, Visualizations, and beautiful renders

2024-04-29

This week in Bevy we've got new Motion Blur bundles, a few interesting new examples, and some great looking games and visualizations.

Especially exciting this week is that the Bevy Foundation has reached an exciting milestone in enabling Alice to start full-time on May 1st. This is not the end of the road in funding, rather it is the beginning of the beginning of the short-term plans outlined in the Foundation announcement and is a good sign for the beginning of what I hope is a substantial future for Bevy, in my opinion.

If you want to see Bevy succeed, like I do, and can afford to: You can donate to Bevy today.

Per-object Motion Blur

motion blur

New support for per-object motion blur was added to the core 3d pipeline. This is a post-process effect that uses the depth and motion vector buffers and can be enabled by adding the MotionBlurBundle to a camera entity.

There's also a brand new example showcasing the new motion blur effect, added in the same PR.

New Animation example

left and right sprites How do you run animations in response to user input?

This new example, shows off a number of useful Bevy and Rust features including single-use Timers, generics in systems, spritesheet animation with texture atlases, and run conditions for systems that run in response to user input.

.add_systems(
    Update,
    (
        // press the right arrow key to animate the right sprite
        trigger_animation::<RightSprite>.run_if(
            input_just_pressed(KeyCode::ArrowRight),
        ),
        // press the left arrow key to animate the left sprite
        trigger_animation::<LeftSprite>.run_if(
            input_just_pressed(KeyCode::ArrowLeft),
        ),
    ),
)

Gizmos

Gizmos now work in FixedUpdate as you would have expected. This marks a change away from being a purely immediate mode implementation, although now Gizmos will work as expected even in schedules that don't run every frame and can be implemented for custom Schedules.

gizmos.arrow_2d(
    Vec2::ZERO,
    Vec2::from_angle(sin / -10. + PI / 2.) * 50.,
    YELLOW,
);

Documentation Improvements

Documentation rendering can be affected by seemingly innocuous code, such as this PR which brings the expected documentation from the bevy_reflect standalone crate into bevy::reflect's documentation. The (internal, not user-facing) module exports changed from

pub mod foo {
    pub use bevy_foo::*;
}

to

pub use bevy_foo as foo;

AppExit

AppExit is now more specific about the exit reason, which means it is now an enum.

pub enum AppExit {
    /// [`App`] exited without any problems.
    Success,
    /// The [`App`] experienced an unhandleable error.
    /// Holds the exit code we expect our app to return.
    Error(NonZeroU8),
}

Meshlets

meshlets

The experimental Meshlets feature got a new, basic level of detail system this week. Level of detail refers to the ability to render more or less detail in objects that are closer or further away. There's some really useful comments and references on the PR, so check it out if you're interested in diving deeper into the work here.

Grid Tracks

vmin and vmax

GridTrack and RepeatedGridTrack gained the ability to be defined in viewport-based dimensions: VMin, VMax, Vh, and Vw. These define sizes as percentages of the viewport in different ways.

Misc

  • An example for ButtonInput with KeyCode, MouseButton, and GamepadButton, including multi-key combinations.
  • EventReader now supports parallel iteration using EventReader::par_read()
  • mutable AnimationClip functions were exposed allowing Bevy to modify AnimationClips via code.

Alice's Weekly 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.

terrain generationterrain generation code

Tile Grammar

showcase

A tile grammar for terrain generation. The grammar is generated from an input, in this case "grammar_tiles" in the image. You can see the output tilemap on the bottom of the photo and the result of the terrain generation in the image.

lobbies!

Runtime Lightyear Networking

showcase

A work-in-progress of a networking example with lightyear where the client and server configurations (i.e. the network topology) can be freely modified at runtime. A dedicated server that maintains a list of lobbies; clients can join lobbies and start a game.

flight sim

Flight Sim

showcase

The beginnings of a Flight Simulation with rapier_3d using realistic forces.

The Discord thread for this one includes a few people building Flight Sim tech, including a link to some resources such as this video.

rc car

Mixed Reality RC Cars

showcase

This showcase uses Bevy and a Quest 3 to control a RC car for the author's master thesis.

docs

Documenting Bevy Apps

showcase

This repo hacks together a rustdoc json interpretation that shows documentation about more Bevy-app specific implementation details, such as Components and where they're used. The author is looking for feedback on if others find this visualization useful, so be sure to let them know if you're interested.

Example output

94%hello, bevy

ttf to mesh

showcase

A. demo of some world-space ttf & svg rendering: turning ttf's and svg's into a mesh, and rendering it using the normal pipeline.

bump maps

Bump mapping terrain

showcase

A bump mapping demo for bevy-mesh-terrain integration

bevy_reactor nodes and pipes

bevy_reactor nodes and pipes

showcase

Nodes and pipes rendered with the help of bevy_reactor, a fine-grained reactivity crate for Bevy. The data in the nodes is fake, but the controls are real. The splines between the nodes are being drawn with a custom shader that computes SDFs for quadratic curves and stores the control points in a storage buffer.

visualization of streams

Rust Stream API visualized and exposed

showcase

This is a post and a set of visualizations built in Bevy explaining the Rust Stream API.

vr climbing

VR Climbing Game

showcase

Prismic is a federated and open source social VR sandbox and this is a climbing game demo using its scripting system. Best seen in video form or played, so check it out in the thread.

meshlets!

Meshlets optimizations!

showcase

This is a screenshot from the in-progress meshlets feature with an important new optimization. Now getting 170 FPS (up from ~45), for rendering this scene with (not necessarily visible) ~144k * ~3100 = ~446_400_000 (446 million) triangles.

lightsclose upmore lights

Bevy is looking beautiful today

showcase

An EnvironmentMapLight, Skybox, and point lights stuck inside balls makes up this demo. Oh, also the 3.57M triangle gun mesh. Shadow casting is off and there are 14 lights.

The demo also makes use of assets from the bevy_dev crate.

design tooling

Design editor powered by Bevy, SVG and React

showcase

This web app is communicating between the frontend and the "backend" (Bevy) layer via events (wasm bindgen).

voxels chunks

Voxels Rewrite

showcase

This showcase is almost an entire rewrite of the system used before to store chunks, generate chunks, and the entity system, to be much more modular than what is was before. This image here (and the video in the thread) is a test to make sure the chunk data is correct, and it is!

slime aoeshrine updatehoming projectileshit feedback

Dekirisu's Animal-Crossing Inspired Game

showcase

A number of different updates were posted for this game this week on Mastodon including

all meshes scenepixelized scenelarge pixelized scene

Pixelization with a toon shader

showcase

This demo contains a pixelization effect on the camera achieved through scaling up a low-res render as well as a toon shader with colors that are converted to lch before being quantized so the lightness between different hues matches. The toon shader includes normal-based and depth-based outlines.

to build a homeTo Build a Home

To Build a Home - Steam Page

showcase

A mix of the Sims and Dwarf Fortress, so you choose your own adventure, To Build a Home gets a new house, new objects and sprites, and a new character model in this showcase this week. There's a Steam Page up so go wishlist it if you're into this kind of game.

sdf model

SDF Modeling Results

showcase

This model was made using SDF modeling software built on top of Bevy. It was colored using Paint3D on Windows.

voronoi minesweeperhex grid minesweeper

Voronoi Minesweeper

showcase

This demo showcases the classic game Minesweeper on a Voronoi grid... and potentially other grid types in the future.

quantizer

Quantizer

showcase

A very visual quantizer. Audio is pretty required for this one, so be sure to click through and check it out. Source is available on GitHub

raytracing

Raytracing

showcase

This initial raytracing demo has a very cool debug statistics overlay powered by Apple's Metal Performance HUD.

make the hero

Make the Hero

showcase

This game was previously features as a demo for bevy_flurx and has received some great improvements to the readability of the gameplay. Merge tiles to construct the number, then move on to the next level.

morton intervals

Morton Intervals

showcase

This is a visualization of an algorithm for morton range tests. The visualization is an interesting case of not much research material being available so the visualization was needed to verify that the behavior made sense.

The goal is to publish this as an alternative to bevy_spatial, a crate for tracking entities in spatial indices.

bingobingo!

Multiplayer Bingo!

showcase

This is a Bingo game built in 3-days using a server-client model and the QUIC protocol. The networking implementation is provided by bevy_quinnet.

asteroids!

Asteroids!

showcase

An implementation of the classic Asteroids game using gizmos for visuals.

Source is available on GitHub and the game is playable on itch.io

Crates

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

rustunit

bevy_ios_notifications 0.1 release

crate_release

Rust crate and Swift package to easily integrate iOS's native Notification API into a Bevy application.

bevy-input-sequence v0.4.0

crate_release

bevy-input-sequence recognizes input sequences from keyboard and gamepad. In 0.4 you can now run one-shot systems in response to an input sequence and there are now more examples.

bevy_rts_camera

bevy_rts_camera 0.5.0

crate_release

bevy_rts_camera added ability to pan the camera by 'grabbing' the ground the dragging in this release

bevy_aesprite_ultra

crate_release

A new Aseprite binary loader for bevy! Featuring hot reloading from binary files for animations.,compatibility with bevy_ui, and support for one shot animations by providing events, when animations finish or loop.

command.spawn(AsepriteAnimationBundle{
    aseprite: server.load("player.aseprite"),
    animation: Animation::default()
            .with_tag("walk-right")
    .. default()
});

Devlogs

vlog style updates from long-term projects

GLOW devlog

Making of GLOW and its release on Steam

devlog

A video covering the author's first game released to Steam: GLOW.

Educational

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

One-Shot Systems

educational

Learn a bit about using one-shot systems in this video.

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