This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

Ludum Dare, Nannou, and esp32s

2024-04-22

A whole host of exciting developments this week including a bunch of Ludum Dare entries, progress on Nannou's Bevy rewrite, and Bevy running on an ESP32 microcontroller.

There are a bunch of games written in Bevy that were submitted to Ludum Dare 55. Game jams are always a great show so we cover those that promoted their games in the showcases this week.

Nannou, the Rust creative-coding framework is making great progress on their Bevy plugin rework. We dive into some of the recent work in the relevant showcase later in this issue.

Unofficial Bevy Meetup #3

The third unofficial Bevy meetup kicked off with two new talks.

The first was presented by Julian who spoke about Animating 3d Characters with Bevy. Julian also streams their Bevy game development on YouTube.

The second was Niklas Eicker, who maintains crates such as bevy_asset_loader, talking about what they've learned maintaining bevy_game_template.

The archived livestream is available on YouTube.

Bevy Coordinates

Bevy's camera coordinate system is "right-handed, y-up" which is compared to the wider ecosystem well in the Bevy Cheatbook page on Bevy's Coordinate System. Now the official camera3d docs and the generate_custom_mesh example include more information about the coordinate system.

We got a new double-ended arrow Gizmo

Dir3

Bevy uses glam's Vec3 extensively but one thing that the type Vec3 can not tell us is whether or not a value is normalized (normalized means the length of the Vec3 is 1). Normalized vectors are required for some operations, so functions accepting a Vec3 that also require a normalized Vec3 create a potential footgun.

Dir3 is a new type likely coming in Bevy 0.14 that represents a normalized Vec3. It can do this by only exposing constructors to create values of the Dir3 type. Once we have a Dir3 we know its a normalized Vec3, so we can use a Dir3 as the argument to functions that require a normalized Vec3, such as Transform::rotate_axis and Transform::rotate_local_axis.

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.

sun gizmo

Directional light gizmo

showcase

A gizmo for directional lights with mouse drag control support.

GLOW

GLOW - Now on Steam

showcase

This week we get a Steam release for GLOW, a physics-based arcade game where you have to avoid colliders.

Path of Summoner

Path of Summoner - Ludum Dare

showcase

In Path of Summoner, you take the role of a summoner tasked with saving the world from dangerous monsters. Within your dungeon, you possess a summoning circle, where you can combine ingredients to summon minions. These summoned creatures will aid you in combat. However, if they all die, monsters will get you.

Playable on Itch.io

Bevy on an ESP32 car robot

Bevy on an ESP32

showcase

This YouTube video show off running Bevy on an ESP32 microcontroller. Specifically the ESP32-S3-WROOM-1-N16R8 in coordination with a behavioral crate called beet.

Source is available on GitHub

continuous collision detectioncontinuous collision detection

WIP Continuous Collision Detection

showcase

Continuous Collision Detection is a problem domain that addresses potential tunneling in physics simulations. Tunneling is loosely speaking when an object is moving so fast that its discrete steps miss collisions on its path that would've otherwise occurred.

This implementation is similar to Jolt's CCD, performing time-of-impact queries from the previous position to determine whether collisions were missed, and if so, moving the bodies back to the time of impact.

nannou meshinline shader demopost processing

Nannou and Bevy

showcase

Nannou, the Rust creative coding framework, is replacing their backend with Bevy and making great progress. These demos show off some of what is and what will be possible.

For me, the biggest takeaway from this showcase is that Nannou and Bevy are coexisting well and the future seems very bright.

The discord thread contains a lot more information and some extra screenshots that show off what code could look like, including defining noise and post-processing shaders inline.

particle editor

Bevy Enoki Particle Web Editor

showcase

This web-based particle editor is great for playing with values that can feed back into bevy_enoki. You can export and import your ron settings, upload textures and write a fragment shader live.

composable animations

Animations with Combinators

showcase

An experiment to build animations through using composable combinators. Code is posted in the Discord thread

many entities

3k skinned meshes

showcase

3k entities, playing skinned animations, all doing astar pathfinding, and plenty of FPS headroom left over

wave function collapse

Wave Function Collapse with Voxels

showcase

A 2d prototype for a future 3d implementation of wave function collapse as part of a smooth voxel game.

Start cubestop cube

bevy_minibuffer commands

showcase

Combine bevy_minibuffer and bevy_defer to start, stop, and set the speed for a cube using commands.

/// Stop the cube spinning. No input.
fn stop(mut query: Query<&mut Rotatable>) {
    let mut r = query.single_mut();
    r.speed = 0.0;
}

/// Set the speed of the spinning cube with input.
fn speed(
    mut minibuffer: Minibuffer,
    query: Query<Entity, With<Rotatable>>,
) -> impl Future<Output = Result<(), Error>> {
    let id = query.single();
    async move {
        let speed = minibuffer
            .prompt(Number::new("speed:"))
            .await?;
        let world = world();
        world
            .entity(id)
            .component::<Rotatable>()
            .set(move |r| r.speed = speed)
            .await?;
        Ok(())
    }
}
pathfinding example

Compass Map Editor Game Pathfinding

showcase

The people behind the Compass Map Editor are working on a game using their editor and have taken advantage of the pathfinding crate in this demo.

Infinite Ponginfinite pong big

Infinite Pong

showcase

This demo is an "infinite" version of pong that plays itself. It explores the ability of bevy_ecs_tilemap to individually address tile entities, and takes advantage of bevy_xpbd_2d for colliders, collision layers, and ball movement.

Source is available on GitHub and a video diving into the code is available on YouTube.

fighting stance

2d fighting game

showcase

The beginnings of a 2d fighting game with a 3d representation. The demo is a tool to edit the timeline of the animation playback position and location information assuming 60fps. The animations are currently from mixamo for prototyping purposes and will be changed out in future versions.

wizard bowswizard fireballs

Multiplayer Wizards

showcase

bevy_quinnet powers this multiplayer demo. It uses an authoritative server with client-side prediction to power wizards throwing fireballs and shooting bows back and forth.

bevy_cobweb_ui

sickle_ui and bevy_cobweb

showcase

This demo showcases in-progress work integrating sickle_ui and bevy_cobweb.

eternal battle in the hells

Eternal Battle in the Hells, or something

showcase

Eternal Battle in the Hells, or something is a ludum dare entry about drawing shapes.

You can view some of the gameplay on YouTube or play it for yourself on ldjam.com.

summoner chess

Summoner Chess - Ludum Dare

showcase

Summoner Chess is an auto-battler where you choose your pieces and then see how they perform.

Available to play on ldjam.com.

Necromatcher

Necromatcher - Ludum Dare

showcase

Another Ludum Dare entry. This one requires you to extend your pieces until they "match three" with the red souls on the board. When matching, you get additional souls to use which allows you to match further away on the board.

The author notes it may be better to play on itch.io rather than on ldjam.com.

skyboxesskybox

Automated HDRi from Blender into Bevy

showcase

These skyboxes are the result of an automatic direct hdr to skybox, specular, and diffuse map pipeline. This results in being able to grab any HDRi for Blender and use it in Bevy immediately.

It looks like the author is working on making it "bevy compatible" in the way it would need to be to be merged into Bevy itself, so we'll see where that goes in the future.

top down shooter bullet casings

Top down shooter bullet shells

showcase

This top down shooter added persistent bullet casings as well as some audio to go along with it.

logic gates

Logic Gate Simulation

showcase

Simulate logic gates with bevy_logic.

Crates

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

bevy ios review

bevy_ios_review first release

crate_release

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

  1. Add to XCode: Add SPM (Swift Package Manager) dependency
  2. Add Rust dependency
  3. Setup Plugin in your Bevy App
hdri

Bevy skybox cli

crate_release

We saw HDRI loading in the showcase this week, and in the crate releases we get the CLI tool to do it ourselves and an example project showing how to do it.

bevy ios alerts

bevy_ios_alerts first release

crate_release

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

  1. Add to XCode: Add SPM (Swift Package Manager) dependency
  2. Add Rust dependency
  3. Setup Plugin in your Bevy App
bevy magicfx

bevy_magic_fx

crate_release

bevy_magic_fx enables defining mesh-based VFX in RON files and loading them into bevy. It can support scrolling texture animation (waterfall) and frame-based animation (explosion) now.

leafwing_manifest first release

crate_release

Does asset management have you tangled in knots? Do you wish there was a clear, robust way you could structure your game data? Wish you knew how to design content formats that you can just hand off to your game designers to populate?

/// A manifest is a map between name-derive `Id<Self>` 
/// keys and the `Self::Item` data you care about.
trait Manifest: Sized + Resource {
    /// The raw data type that is loaded from disk.
    type RawManifest: Asset + for<'de> Deserialize<'de>;

    /// The raw data type that is stored in the manifest.
    type RawItem;

    /// The type of the game object stored in the manifest.
    type Item;

    /// The error type that can occur when converting raw
    ///  manifests into a manifest.
    type ConversionError: Error;

    /// The format of the raw manifest on disk.
    const FORMAT: ManifestFormat;

    fn from_raw_manifest(
        raw_manifest: Self::RawManifest,
        _world: &mut World,
    ) -> Result<Self, Self::Err>;

    fn get(
        &self,
        id: Id<Self::Item>,
    ) -> Option<&Self::Item>;
}
koto

bevy_koto

crate_release

This crate allows you to use the Koto scripting language with Bevy. The release comes with a demo video.

bevy logic

bevy_logic first release

crate_release

Simulate logic gates and signals in bevy

  • A LogicGraph resource for sorting (potentially cyclic) logic gate circuits.
  • A separate LogicUpdate schedule with a fixed timestep that works just like FixedUpdate.
  • LogicGate trait queries.
  • World and Commands extensions for spawning and removing logic gates and child fans.
  • Events for synchronizing a LogicGraph simulation with user interactions.
  • Modular plugin design. Pick and choose the features you need.
bevy sun gizmo

bevy_sun_gizmo

crate_release

visualize and control the direction of directional lights, very similar to a tool found in Unreal Engine.

default-construtor first release

crate_release

Macros for creating pseudo-dsls that constructs structs through default construction and field conversion. Tries to make constructing nested bundles easier.

construct! {
    Student {
        name: "Timmy",
        age: 10,
        father: Parent {
            name: "Tommy",
            age: 42
        }
    }
}

expands to

Student {
    name: Into::into("Timmy"),
    age: Into::into(10),
    father: construct! {
        Parent {
            name: "Tommy",
            age: 42
        }
    }
    ..Default::default()
}
No devlogs this week

Educational

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

Bevy Talk

Bevy ECS - Post tool for data oriented applications

educational

Trent gave a talk at Rust Sydney on Bevy where they take a spreadsheet analogy approach to explaining Bevy's ECS.

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