This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

Bevy 0.13.2, Curves, Gizmos, and Games

2024-04-08

Bevy 0.13.2 is out with some bugfixes for the 0.13 release cycle. The full milestone is available on GitHub.

bevy_math got a new Tetrahedron primitive and the Annulus added last week got its meshing implemetation which means it can be added to the 2d shapes example.

The close_on_esc system, which is a helper utility Bevy offers to allow closing the application when Escape is pressed, was moved into the growing set of features in bevy_dev_tools.

system stepping is no longer a default feature and requires being enabled to make use of it.

Bevy gained some more random sampling capabilities, including the ability to generate random directions and quaternions. This builds on the rand crate's traits.

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.

rustroneer

Rustroneer

showcase

Rustroneer is a 2D procedural planet generator that generates a circle with surface deformation for terrain, then uses cellular automata to create caves in side. After that connects caves using a minimum spanning tree. The mesh is generated with marching squares and can be deformed at runtime.

The author's plan is to keep adding until it feels like a living planet.

compass map editor game

Demo of Compass Map Editor

showcase

The Compass Map Editor gets a new proof-of-concept game including a client/server architecture. This demo shows off a ward system where players have a limited view that can be expanded at runtime.

Bevy developer console

Bevy developer console

showcase

bevy_minibuffer is a work-in-progress developer console ui that allows asking questions of a user and even supplying autocomplete.

async fn ask_name(
    mut minibuffer: Minibuffer,
) -> Result<(), Error> {
    let first_name = minibuffer
        .prompt(asky::Text::new(
            "What's your first name?",
        ))
        .await?;
    let last_name = minibuffer
        .prompt(asky::Text::new(
            "What's your last name?",
        ))
        .await?;
    minibuffer
        .prompt(Message::new(format!(
            "Hello, {first_name} {last_name}!"
        )))
        .await?;
    Ok(())
}
monster ai

Monster AI

showcase

This demo shows off a component-based monster AI that chooses which ability to deploy based on distance to the player. Far away you'll see a fireball and close up you'll get a melee attack.

Architect of Ruin

Architect of Ruin Task system

showcase

A number of different systems come together in this showcase to power logistics and tasks. Tasks can have dependencies, systems can be stateful, and any gameplay code can request a delivery.

Architect of Ruin's website is deadmoney.gg

Defend your Eggs!

Defend your Eggs!

showcase

Play as the red block, protecting blue blocks from the green blocks. Green blocks are collected into a chained-spring-like snake using bevy_rapier physics.

Available to play on Itch.io.

sparse-voxel-oct-tree stress test

sparse-voxel-oct-tree stress test

showcase

Every 0.3 seconds this showcase is adding/overwriting 20,000 voxels at random locations, attempting to remove 100,000 voxels at random locations, and re-meshing it in an async-compute-thread.

3d shooter with minecraft skin

3d shooter

showcase

After working mostly on libraries this year (such as lunex), this showcase shows off the author's initial work on a 3d shooter. There's a first person controller and an extended player model. One aspect of this showcase that I love a lot is the ability to use your existing Minecraft skin as a texture.

There were a couple of interesting updates during the week, including weapon sway and a movement state machine

Also notable is How I Design Awesome Gun Sounds which is cited as inspiration.

bevy_xpbd sandbox

bevy_xpbd physics sandbox

showcase

bevy_xpbd is transitioning away from xpbd and thus a new solver is being worked on. This sandbox includes a whole host of different debug information and examples to test the new solver. The ui is all bevy_ui with some custom widgets and some of the tooling could be useful to include in the future bevy_xpbd, so dependencies are minimal. Source code is not yet available but likely will be.

purple room

Audio Playground: Steam Audio

showcase

This demo is spatial audio based, so definitely go check out the source video. It includes audio reflections, materials, and Bevy mesh to Steam Audio mesh conversion, with instancing support.

voxel treehouse

Voxel Scenes

showcase

These voxel scenes are raytraced in a wgsl shader. The code has support for importing .vox (magicavoxel) and .laz (laser scan / point cloud) files. The author's intent seems to be to open source some or all of the code in the future.

Whack a Bevy

Whack-a-Bevy

showcase

Whack-a-Bevy is an online multiplayer Whac-a-mole game first created as a submission for the first Bevy game jam and has now been updated to work with Bevy 0.13. It is available to play online and the source is available on GitHub, including the network implementation.

bevy_mod_fornjot

Fornjot-in-Bevy

showcase

Fornjot is an early-stage CAD kernel, using boundary representation (b-rep), written in the Rust programming language.

bevy_mod_fornjot is an experiment to render meshes generated by Fornjot, in Bevy. Currently this comprises a single function that translates the coordinate system for each point and then uses Bevy's utilities to finish the mesh.

blurry background on ui panels

Blurry Background UI panels

showcase

This blurry background showcase supports bevy_ui and egui. Its open source, so take a look at the shader.rs file for a really great look at a fairly contained example of adding nodes to Bevy's RenderGraph. The code is available on GitHub

many snake games

Snake 5k

showcase

5,000 snake games running in the background with the top 18 snakes shown on screen. Each snake has a small neural network trying to survive and score points. The author intends to make the source available at some point in the future.

Crates

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

bevy_h264 first release

crate_release

bevy_h264 is a rudimentary video player for Bevy. It only plays h264 video streams and does not open media container files.

lightyear 0.13

crate_release

lightyear is a full-featured client-server networking library for Bevy.

The 0.13 release brings Steam socket support as a networking transport layer as well as a new "host server" mode which allows you to run the server and the client using the same Bevy App.

Full details are available in the release notes

bevy_tnua 0.16

crate_release

bevy_tnua is a floating character controller.

0.16 is mostly about supporting physics better by allowing tnua to run in a user-specified Schedule, and supporting bevy_xpbd's double precision mode.

bevy tween

bevy_tween 0.3.1

crate_release

bevy_tween (which is not the same as bevy_tweening) got a 0.3.1 release which includes some breaking changes. 0.3.1 ships tween events, configurable schedules, and the ability to use relative times when building tweens.

bevy_mod_scripting 0.6

crate_release

bevy_mod_scripting is a work-in-progress attempt to add scripting support to Bevy. Language support includes Lua, Teal, Rhai and Rune. Most notably in this release, a new architecture.md was created to make the crate easier to understand.

pixel fonts

extol_image_font first release

crate_release

extol_image_font allows rendering fonts that are stored as a single image (typically PNG), with each letter at a given location

commands.spawn((
    ImageBundle {
        style: Style {
            position_type: PositionType::Relative,
            ..default()
        },
        ..default()
    },
    ImageFontText::default()
        .text("Press SPACE to judge!")
        .font(assets.image_font.clone())
        .font_height(72.0),
));
3d gizmo in a cube

transform-gizmo first release

crate_release

transform-gizmo is a framework-agnostic 3d transformation gizmo. Bevy integration is provided by transform-gizmo-bevy. The crate enables the translation, rotation, and scaling of 3d objects.

Check it out in this web demo

bevy_lookup_curve

bevy_lookup_curve 0.2

crate_release

bevy_lookup_curve is a crate that enables the construction and usage of curves. Curves are useful for many things. For example if you want to move from position 0 to position 1 over 10 seconds, you can do that in 0.1 distance increments or you could go 0.2 distance over the first 5 seconds and 0.8 over the last 5 seconds. Curves let you define and look up how far along the path from 0 to 1 your movement should be at a specific time.

More details are available in the changelog and the examples are pretty critical to check out if you're going to make use of this crate at the moment. More docs and examples are coming in future.

LookupCurve::new(vec![
    Knot {
        position: Vec2::ZERO,
        interpolation: KnotInterpolation::Linear,
        ..Default::default()
    },
    Knot {
        position: Vec2::ONE,
        interpolation: KnotInterpolation::Linear,
        ..default()
    },
])
No devlogs this week

Educational

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

conway's game of life through time

Conway's Game of Life Through Time

educational

The author of this demo recreated Conway's Game of Life over time as a visualization. Each new generation is continually stacked on top of the previous one to show the evolution of the cellular automata through time. This is based on the same idea in a previous implementation [on Instagram](https://www.instagram.com/p/C2hoRnFsmQW/ from alecs.form

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