This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

Animation Graphs, Cheatbooks, and Googly Eyes

2024-03-11

Welcome to another week in the Bevy ecosystem!

This week we've got some new work on animation graphs, a lot of Bevy Cheatbook updates, and a new bevy_dev_tools crate.

A few new crates have also been published, including an interesting path recording crate.

Animation Graphs

An implementation of RFC 51: animation-composition landed this week in #11989.

Note that the implementation strategy is different from the one outlined in that RFC, because two-phase animation has now landed.

Bevy's AnimationPlayer now supports blending multiple animations together through an AnimationGraph.

The animation-graph example demonstrates the usage of the new blending functionality.

Bevy Cheatbook

The Bevy Cheatbook is a reference-style book for Bevy concepts. It is a major piece of the ecosystem (IMO) and got a major update (discord), including all the scheduling-related pages: Schedules, Run Conditions, States, System Order, System Sets, Fixed Timestep!

bevy_dev_tools

The bevy_dev_tools crate was created, which marks some progress in the editor efforts. What it will become in the future is somewhat TBD, but the original issue makes it seem like easily turning developer-tools on and off is a priority.

As usual, Alice's merge train happened on Monday which dives into some of the active PRs on a maintainer level.

Showcase

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

Spatial Audio with Steam Audio and FMOD

showcase

This is a spatial audio example, so its worth clicking into the Discord thread with headphones on.

The author hopes to release a Bevy plugin soon. Until then, give the demo a listen.

The Artifact Project

The Artifact Project

showcase

I'm doing an experiment by building tools to create a Voxel Game, which will be highly customizable and rich in features. I have a whole bunch of ideas, that i haven't seen anywhere yet, and i'm curious if it works out. The goal is to make a game, that is a lot of fun, and gives unique experiences, but at the same time makes it possible to be extended by you. The initial implementation will be called The Artifact Project

algorithmically-generated floors

Algorithmically-generated floors

showcase

The floors start out as 2d polygons, which are then triangulated using earcut and the 3d geometry generated in a compute task. The different floor surface types are determined by schematics/aspects which are defined in JSON. If you look closely you can see that there are black outlines which are rendered by a custom outline shader.

The goal here is to recreate the look and feel of isometric tile games from the early 2000s (think Ultima), except that the "tiles" are actually 3d models and there's actually perspective.

Some great commentary in the Discord thread here. From "why Bevy" to an entire game soundtrack, to a link to the floor mesh generation code.

bevy_editor_pls doodad placement

doodad placement

showcase

Uses bevy_editor_pls to add doodad placement for objects like trees.

snake!

Snake!

showcase

Snake is a classic game to build to learn a new engine and this is another one!

game jam

Game Jam progress

showcase

Some game jam progress from a couple days of work. Not much info so enjoy the visuals.

space shooter

Space Shooter

showcase

The game developer for this one has been learning Rust for about a week and built this retro-like game as a result of that work. They're planning to both continue to work on it and open source it some time in the future.

death star simulator

Tiny Death Star

showcase

Tiny Death Star is a pixel-art Death Star (the Star Wars kind) simulator/manager.

descent clone

Descent Clone: Audio

showcase

This is another audio demo, so check out the Discord thread to hear the multiple wonderful demos.

rougepush

RougePush

showcase

rougepush is a game jam game made for the 7-day roguelike challenge.

googly eyes

New Bevy Googly Eye Example

showcase

Well known game asset creator kenney released some googly eyes which immediately got used to create an example desk toy widget. This example got upgraded into an the official desk-toy example in the Bevy repo.

The desk-toy example shows off some interesting usage of window transparency to achieve the effect of a floating Bevy logo with googly eyes on top of other windows. You can drag the logo around and generally play with it.

armaturearmature in bevy

Armature plugin

showcase

Armatures (also known as bones) can be used for many different kinds of entities, not just "people shaped". @cake built a new plugin to make dealing with armature setups in Bevy easier to use.

They're looking for feedback, so check this out and let them know how it works for you in the Discord thread

#[derive(Component, Armature, Reflect, InspectorOptions)]
#[reflect(InspectorOptions)]
#[armature_path("Armature")]
pub struct MyTurretArmature {
    #[armature_path("Bone")]
    pub base: Entity,
    #[armature_path("Bone", "Bone.Neck", "Bone.Head")]
    pub head: Entity,
    #[armature_path("Bone.Head.Target.IK")]
    pub target_ik: Entity,
}
Tiny Glade loading

Loading screen using a second Bevy App

showcase

Tiny Glade is extremely heavy on procedural generation, which is well-known to be resource intensive. This level of resource-intensive usage at the time of loading can cause stutters as the game loads and generates. This approach uses a second Bevy App to basically make the loading screen a separate process, isolated from the resource-intensive usage, resulting in a smooth loading indicator.

This approach is fairly unique to Tiny Glade, as Tiny Glade has been around since Bevy 0.6 and they have rendering professionals working on it who wanted things done in specific ways.

Tiny Glade uses a custom renderer and asset system. The bevy builtin asset system does have async loading of assets and it's possible to implement a loading screen without using this 2 app technique. With that said, it still has some pitfalls and this solution could still make sense even in a game that uses the bevy asset system

There's a lot of great discussion about different rendering APIs, how to get started in rendering, as well as discussion of this technique in particular and why it exists like it does.

Procedural dungeon generation

Dungeon Generation

showcase

spawned random sized, random positioned rectangles, then connected them with corridors by minimum spanning tree

moar ants!

Moar Ants!

showcase

Moar Ants! (itch) is a clicker-inspired ant colony simulation.

Source is available on GitHub under the Polyform Strict license,

Project Home furniture assembly

Project Home: Furniture Assembly

showcase

Click to assemble! Its almost as easy as IKEA!

Deltarune fangame pause menu

Deltarune fangame

showcase

Deltarune fangame. New work here includes the pause menu and an animation system that can load animations from .ron files.

The animation got moved into a repository on Codeberg called bevy_sprite_anim and it includes an example of loading the .ron files.

voxel building

Voxel Click+Drag to Build

showcase

Boris gets click+drag voxel building. Source for Boris is available under MIT on GitHub

gomoku

Gomoku

showcase

A Gomoku implementation with capture rules. You can Play Online on Itch against a programmed AI. (I definitely lost my first game).

painterly standard material extensions

Painterly StandardMaterial extensions

showcase

A baked custom normal map from Blender combined with a small StandardMaterial extension shader results in this painterly tree scene. If you like this result, check out some of the inspiration for your own work as well.

jarl indoor space detection

Jarl: indoor space detection

showcase

Jarl is a Fantasy Colony Builder with some amazing 2d lighting systems (which are available to use separately!). This demo shows a system which can detect various kinds of indoor spaces such as rooms (yellow) and caves (red).

Check out their YouTube for devlogs and other videos.

Crates

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

homotopy paths

charred-path 0.1.1

crate_release

charred-path is a component-based plugin for Bevy used for recording the homotopy type of a moving object around a specified set of points in 2D.

The charred-path crate uses some generally less-familiar math to produce some really interesting use cases, especially around tracking player movement in platformers.

The charred-path crate was initially built with platformers/metroidvanias specifically in mind, but is well-suited to a number of game development scenarios. Here are a few examples:

Beta Testing

During beta testing, it can be beneficial to understand the paths that players take through a game. By recording the path of a player's character, developers can gain insights into how players are interacting with the game environment. This can help identify areas of the game that are not being explored, or pinpoint locations where players are getting stuck.

Game Logic

The path recording functionality can also be used to influence game logic. For example, you could check whether a player's character went above or below a certain platform and trigger different events based on that information.

The README includes some great explanation of the math behind the crate.

edges first release

crate_release

Edges is a new crate supporting bevy_collider_gen. The purpose of the crate is to find edges in images with transparency.

Currently this is mostly useful in testing scenarios, as it can be expensive and not integrated with Bevy's preprocessing system.

use edges::Edges;
use std::path::Path;

fn main() {
    let image = image::open(Path::new("assets/car.png"));
    let edges = Edges::from(image.unwrap());
    println!("{:#?}", edges.single_image_edge_translated());
}
bevy_rts_camera

bevy_rts_camera first release

crate_release

bevy_rts_camera is a simple RTS-style camera controller including support for

  • Pan (keyboard or mouse), zoom, rotate
  • Smoothed movement
  • Automatically follows ground/terrain

bevy-yoetz first release

crate_release

bevy_yoetz is a plugin to aid in the implementation of rule-based AI. As is the case with many new crates, the author wasn't quite satisfied with how other existing crates worked, especially related to focus on state-switching. Yoetz focuses more on the data that accompanies these states.

#[derive(YoetzSuggestion)]
#[yoetz(key_enum(derive(Debug)), strategy_structs(derive(Debug)))]
enum EnemyBehavior {
    Idle,
    Chase {
        #[yoetz(key)]
        target_entity: Entity,
        #[yoetz(input)]
        vec_to_target: Vec2,
    },
    Circle {
        #[yoetz(key)]
        target_entity: Entity,
        #[yoetz(input)]
        vec_to_target: Vec2,
        #[yoetz(state)]
        go_counter_clockwise: bool,
    },
}
bevy_incandescent

Bevy Incandescent 0.1.0

crate_release

Last week we saw a 2d lighting showcase and this week bevy_incandescent is the release of a 2d lighting plugin that powers that showcase.

Currently the plugin only supports point lights (soft shadow using PCF) and ambient light, but there's still much to do!

The author says to consider this crate experimental for the moment.

This is an experimental release, and it's NOT recommended to use this in your formal project.

source is available on GitHub

bevy-stat-query v0.0.2

crate_release

  • RPG stat system
  • overdesigned
  • experimental

bevy-stat-query is self-described as

An overdesigned experimental RPG stat system.

and it looks a bit like this:

let fire = Qualifier::all_of(Flag::Fire);
let fire_magic = Qualifier::all_of(Flag::Fire|Flag::Magic);
let elemental = Qualifier::any_of(Fire|Water|Air|Earth);
let elemental_magic = Qualifier::any_of(Fire|Water|Air|Earth)
    .and_all_of(Magic);

moonshine_util

crate_release

  • Expect performs additional checking to make sure a component is associated with all instances of the queried component. This means this system can enforce that all components with A also have B.
  • HierarchyQuery enables entity hierarchy traversal/query. Similar to aery with a slightly different API.
  • RunSystemLoop is a trait for testing systems, similar to RunSystemOnce in Bevy.

bevy_replicon_snap

crate_release

bevy_replicon_snap is a plugin for bevy_replicon to allow snapshot interpolation and client-side prediction.

This library is a very rough proof of concept and not meant to be used in productive games

Bevy Replicon 0.24.0

crate_release

bevy_replicon a high-level networking crate for the Bevy game engine. This release brings the ability write your own integration with the messaging library of your choice. renet support will remain first-party via bevy_replicon_renet.

The full changelog is available.

Devlogs

vlog style updates from long-term projects

6 months of work

First 6 months with Rust and Bevy

devlog

This person decided to jump on the Rust train for the first time and dig into Bevy for 6 months. This devlog shows off a number of different part of their journey along that time including shaders, terrain, and 3d animation.

Small Town Life

Small Town Life AI system

devlog

Small Town Life is a City/Community builder and this update covers improvements to the AI system as well as other improvements.

HackeRPG

HackeRPG 0.1.3

devlog

HackeRPG is an arena roguelike. This devlog talks about plans for the game.

Demo is available on Steam

Solving Teleportation Bugs

devlog

A really short (60 seconds) devlog about fixing a teleportation bug.

No Educational this week
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