This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

2d Lighting, Particle Systems, Meshlets, and more

2024-04-01

Welcome to another week in the Bevy ecosystem!

This week we've got a number of 2d lighting examples, deep dives into GPU particles and bevy_ecs, as well as dialogue systems, and some exciting new Bevy merges.

Have you ever had trouble reading type errors? Argus is a trait debugger for Rust that was released this week, with first-class VSCode integration. Give it a try and see if it helps you identify system errors in your next Bevy App.

Multithreaded WASM

Bevy was designed to run well in parallel environments, but when targeting WebAssembly Bevy only runs single-threaded. This wasm multithreading PR takes a first step towards multithreading on WASM.

Meshlets

meshlets got merged as experimental behind a feature flag! This is in the same category as "nanite" and meant for scenes with so much geometry that a single triangle can be a single pixel. There was a lot of work put into this one over many months and there is still plenty of work to follow up on. Having this feature integrated into the codebase will make future collaboration on it easier.

Seeded Rng in CI

Its nice if CI runs of Bevy's examples are deterministic, which can make it easier to identify changes. This can be confusing to new users so its nice that there are now explanations where this approach is used.

Archetypes and EntityLocations

Under the hood Bevy uses the concept of Archetypes which are collections of entities that have the same set of components. The metadata structs (&Archetype and EntityLocation) implement QueryData as of #12398, which enables querying for this data in systems.

Miscellaneous

  • A new 2d primitive, the Annulus was added to bevy_math. An Annulus is a ring: the space between two circles.
  • The Point trait also got moved, made a bit more generic, and is now named VectorSpace.
  • Line Gizmos now implement solid and dotted styles.
  • A new audio example shows off how to play a soundtrack with fade-in and fade-out.
  • 2d meshes now support wireframes.

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.

2d lighting compute shader

2d sdf compute shader lighting

showcase

This 2d lighting implementation includes three (1, 2, 3) different live wasm demos. The soft shadows are based on a signed distance function that is computed every frame in a compute shader and the lighting is then ray-marched as a post process step.

bevy_worldswap

showcase

bevy_worldswap is an experiment in swapping a Bevy App's World at runtime. It currently uses a fork of Bevy, although there are a few PRs in trying to get back to depending on main.

2d platformer

ROBOSHOOT

showcase

This megaman inspired roguelite includes enemies that embody every game developer's nightmare: triangles.

3d demo

3d character and environment

showcase

character, dungeon assets combine in this person's attempt to learn Bevy and Rust. It takes advantage of bevy_tnua for character control and bevy_hanabi for particles.

voltum

Drop match game

showcase

This showcase puts a twist on the popular drop match game, using different shapes, buffs, and debuffs. Its released on Android and has a YouTube video preview

particles

Particles

showcase

An in-progress 2d particle-system plugin that calculates particles on the CPU before taking advantage of GPU instancing. One of the main goals is webgl support.

A later update included a custom particle material trait that enables you to add your own fragment shader to any particle spawner.

uniform mesh sampling

Uniform mesh sampling

showcase

This showcase plays with uniform mesh sampling for grass/vegetation placement. The Discord thread has a number of great suggestions for different algorithms and approaches including R2, a witness blogpost, and blue noise.

wip chrome-ui like devtool

chrome-like devtool

showcase

Hovering mouse effects are shown off in this showcase for a chrome-like bevy devtool.

mass-preserving rotations and lighting

Mass preserving rotation and 2d lighting

showcase

A gpu-based raytracer powers this 2d lighting implementation.

chest boss

Chest Boss

showcase

This "pokemon" style game gains chest monster bosses and health bars in this showcase.

bevy magic light 2d wizard game

2d mining, crafting, and magic

showcase

The idea for this game is an ARPG with light survival mechanics. Classes, crafting, towns, questing, procedural dungeons, loot, skill tree style progression, etc. Single player or online with a party. So far its only been a few weeks of work.

The beautiful lighting is powered by a fork of bevy-magic-light-2d which includes a few changes.

jelly physics

soft-body simulation

showcase

The goal of these simulations is to build something like jelly car which has very bouncy physics. Currently collision resolution, internal springs, and internal gas pressure and all implemented and stable.

shmup

2.5D shmup

showcase

This 2.5D shoot 'em up (shmup), takes advantage of Blender_bevy_components_workflow to create some really nice intro animations. level-specific animations (or set-pieces) is one of the goals of the project.

A 3d hexagonal tile map

3d Hexagonal tilemap

showcase

A hexagonal tilemap with debug info including varying heights, water, mountains, and more.

animal crossing style game

Menus, wiggly trees, and curved world

showcase

Updates to an Animal Crossing inspired game include menu options, pause menu, world settings, and more.

Crates

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

bevy_enoki first release

crate_release

The 2d particle system we saw showcased this week got a first crate release right at the end of the cycle. The Enoki particle system is a CPU-calculated particle system, that uses GPU Instancing and works well with wasm. It provides a material trait that lets you implement your own fragment shader. Additionally, spawner configuration are provided via ron files, which can be hot reloaded.

bevy_mqtt first release

crate_release

bevy_mqtt is an mqtt client plugin for Bevy. Its currently being used to visualize Internet of Things system info, which is an area where mqtt is a popular protocol.

bevy_defer 0.8

crate_release

bevy_defer is an asynchronous runtime integrated with bevy. 0.8 brings:

  • Push Resources or even &World onto thread local storage and get instant access.
  • Cancellable async tweening
  • React to with bevy_mod_picking states with signals.
hexx crate

Hexx 0.16.0

crate_release

hexx is a utility crate for working with hexagons.

The 0.16 release brings a complete rework of the edge/vertex direction system and the addition of Grid features with orientated vertices and edges. These grid features are particularly useful for strategy/building games on hexagonal maps.

Also notable is that hexx now has 12 bevy examples showcasing usage, making it easier to onboard to using the crate.

space_editor

space_editor 0.5

crate_release

space_editor enables the creation or modification of levels, scenes, and prefabs in gui based way.

0.5 brings support for sprites and animations, bevy_xpbd_2d, and a number of quality of life changes.

No devlogs this week

Educational

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

YarnSpinner-Rust Tutorial

educational

YarnSpinner is a tool and textual format for constructing game dialogue. YarnSpinner-Rust is an integration of the tool for Bevy.

This tutorial covers using YarnSpinner's basic features including hooking into events, displaying dialogue lines when requested.

How to deploy Bevy to Android and WASM

educational

This tutorial covers building and deploying Bevy to Android and WASM (itch.io) targets.

A Tour of bevy_ecs

educational

Bevy has a number of different crates and it can be hard to get a deep view into what each one is doing. This post dives into the 0.12.1 version of bevy_ecs and covers entities, archetypes, tables, queries and more.

GPU Particle Research — Bevy Hanabi, Part 2 & 3

educational

The GPU Particle Research series got its 2nd and 3rd updates. The series currently focuses on bevy_hanabi, a GPU-based particle system plugin for Bevy.

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