This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

Rumblings of 0.14, God Rays, and Depth of Field

2024-05-20

Bevy 0.14's release cycle is just getting started with the creation of the 0.14 release crew working group (discord link to working group). Alice talked a bit about the creation of the group and what its trying to do over on Mastodon).

There is now a milestone for the release that Alice covered in depth, so check it out if you're interested in what's left to do for 0.14.

In the meantime, here's what else has been happening this week.

Cone Meshing

cone mesh UVs

The Cone primitive got meshing support. Notably this includes UV coordinates that are polar, so textures are applied as if looking at the Cone from above.

Rounded Box Gizmo

rounded box gizmo

A new Gizmo was created for 2d and 3d rounded boxes. Both of which support modifying the corner/edge radius as well as the arc segments.

Depth of Field

depth of field

Depth-of-field (also known as that blurry effect cameras have when focusing) was added as a new post-processing effect. This includes two different kinds: hexagonal bokeh and Gaussian blur. The PR for this one is again, super informative so I highly suggest reading it.

To use depth of field, add DepthOfFieldSettings to an entity containing a Camera3d component.

God Rays (volumetric fog and lighting)

god rays

more rays

God rays (or light shafts) are best explained by the images above. This occurs when light shines through volumetric fog, which is exactly what #13057 implements.

This PR introduces two new components: VolumetricFog and VolumetricLight. VolumetricLight is applied to directional lights which allows them to interact with VolumetricFog.

Blender/Bevy Workflows

Work is continuing to enhance Blender-and-Bevy workflows in an as-yet-unamed crate. The current plugins are available on GitHub.


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

to build a home ui

To Build a Home UI

showcase

To Build a Home dropped egui in favor of working with bevy_ui to build their interfaces. That said, they plan to focus on gameplay and not UI overall.

action bar

Action Bar Items

showcase

An implementation of an action bar and items in it relating to different spells that can be used. Items can be accessed via number key.

to build a home snap errorto build a home snap success

Project Harmonia: Snapping

showcase

Placing furniture with float coordinate positioning can be tough, so why not implement a Component that allows the sides of objects to "snap" onto other entities with the same Component?

Project Harmonia Source

pinball!

Pinball... with enemies!

showcase

The beginnings of a Pinball game with enemies. Health bars and juice still to come.

Myriad Empires

Myriad Empires

showcase

Improvements to Myriad Empires include the ability to garrison characters and agents in settlements.

slavic castles

Slavic Castles Card Game

showcase

Slavic Castles is a card game that we saw last week and this week we get the full source code, including usage of bevy_ecss, bevy_pkv and more.

wiggly grace

Wiggly Grace

showcase

wiggly grace is a demo of visual audio generation, so click through to hear it.

Source is available on GitHub with some instructions in the Discord thread.

powerup menu

Powerup menu

showcase

A proof of concept for a Power-up menu. One really interesting part of the PoC is that it is fully localizable by taking advantage of Fluent and a custom crate.

Powerups are Components that get attached to the player's Entity when chosen. Interesting aspects of this approach include storing OnHit components which themselves contain Components. When that Entity gets hit, it inserts a copy of the Component in OnHit onto the target.

Fluent is a localization system with an implementation in Rust

HackeRPG

HackeRPG: Playable via YouTube Chat

showcase

This game demo was run on YouTube, allowing chatters to come in and decide what happens by taking advantage of 12 different possible commands. You can see a command log in the upper right hand corner and see the chat on the YouTube video match up.

pixel snake

Sand Snake

showcase

One of the really awesome ways in which Bevy exists is how modular it is, and one of the most commonly used crates outside the "A Bevy App" use case is bevy_ecs.

This YouTube video showcases a project that uses bevy_ecs to power a "pixel simulated version of the classic snake game". This kind of game is often referred to as a "falling sand game".

Available on Itch.io

hitboxes and hurtboxes

Hitbox and Hurtbox Editor

showcase

This showcase's author has been working with Bevy and Rust for about two weeks now. In research to build a fighting game, they decided to build this editor for setting up hitboxes and hurtboxes.

Crates

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

dbg_if v0.1

crate_release

This crate isn't Bevy-specific, but was built to work on Bevy Apps. It provides additional dbg! macros to make it easier to debug things in the loop:

  • dbg_once! print once (bevy has debug_once! which has more functionality)
  • dbg_if_ne! print if not equal to last value (for atomic types)
  • dbg_if_hash_ne! print if hash not equal to last value (for Hash types)

bevy_quinnet 0.8

crate_release

Bevy Quinnet's 0.8 update adds replicon integration via the bevy_replicon_quinnet crate.

frogfrog angle two

bevy-2dviewangle

crate_release

bevy-2dviewangle uses events and custom macros to enable the ergonomic storage and usage of multi view angle spritesheets.

#[derive(ActorsTexturesCollection, Default)]
struct MyAssets {
    #[textureview(
        actor = "player",
        action = "idle",
        angle = "front"
    )]
    pub idle_front: Handle<Image>,

    // If not specify actor/action, the previous value
    // will be used
    #[textureview(angle = "back")]
    pub idle_back: Handle<Image>,

    // If the angle "right" is not defined, it will 
    // be flipped base on the "left" image
    #[textureview(angle = "left")]
    pub idle_left: Handle<Image>,
    
    // If angle is any, other angle which has not been 
    // defined will use this value
    #[textureview(angle = "any")]
    pub idle_any_layout: Handle<TextureAtlasLayout>,
}

// Change the sprite sheet by sending event
fn switch_sprite(
    mut actors: Query<(&mut DynamicActor, Entity)>,
    mut action_event: EventWriter<ViewChanged>,
) {
    for (mut act, e) in actors.iter_mut() {
        act.action = Action::Idle;
        act.angle = Angle::Right;
        action_event.send(ViewChanged { entity: e });
    }
}
bevy iap

bevy_ios_iap release

crate_release

Provides access to iOS native StoreKit2 Swift API from inside Bevy Apps.

Features

  • fetch products
  • purchase products
  • listen to changes in transaction states (pending -> purchased, finished)
  • fetch list of all transactions (to restore old purchases of non-consumables or active subscriptions)
bevy tnua slopes

bevy-tnua 0.18

crate_release

bevy-tnua is a floating character controller, which means that instead of constantly touching the ground the character floats above it, which makes many aspects of the motion control simpler.

The major change in 0.18 is the addition of a max_slope parameter, which can be used to prevent the character from walking on ground that is too steep.

Devlogs

vlog style updates from long-term projects

astortionastortion charactersastortion blender

Reimagining Astortion: Devlog 0

devlog

Astortion is a metroidvania 2d puzzle platformer game that started life in 2020 and recently reset development with more concrete goals.

The devlog includes discussion of game mechanics as well as Blender integration designing splines in Blender and bringing them into Bevy. The developer calls out Bevy's asset system, and hot-reload specifically, as being a huge workflow improvement over their previous iteration and say they intend to go deeper into this topic in their next video.

You can wishlist Astortion on Steam

Educational

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

bevy mesh terrain editor

Bevy Mesh Terrain Editor Tutorial

educational

A tutorial video for Bevy Mesh Terrain Editor.

drag and drop LDtk levels

Drag and Drop player-built LDtk levels

educational

Bevy supports Drag and Drop files natively using an Event. We can take advantage of this and other crates in the ecosystem like bevy_ecs_ldtk to enable players to build their own levels using LDtk and drop them onto the app to play them using the game logic we've provided.

Source is available on GitHub

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