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.
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 - 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
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
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 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.
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.
Animations with Combinators
showcase
An experiment to build animations through using composable combinators. Code is posted in the Discord thread
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.
Top down shooter bullet shells
showcase
This top down shooter added persistent bullet casings as well as some audio to go along with it.
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 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.
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.
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(())
}
}
sickle_ui and bevy_cobweb
showcase
This demo showcases in-progress work integrating sickle_ui and bevy_cobweb.
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 - 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 - 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.
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.
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.
Crates
New releases to crates.io and substantial updates to existing projects
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 first release
crate_release
Rust crate and Swift package to easily integrate iOS's native UIAlerts API into a Bevy application.
- Add to XCode: Add SPM (Swift Package Manager) dependency
- Add Rust dependency
- Setup Plugin in your Bevy App
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.
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()
}
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>;
}
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 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 likeFixedUpdate
. LogicGate
trait queries.World
andCommands
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
crate_release
visualize and control the direction of directional lights, very similar to a tool found in Unreal Engine.
bevy_ios_review first release
crate_release
Rust crate and Swift package to easily integrate iOS's requestReview
API into a Bevy application.
- Add to XCode: Add SPM (Swift Package Manager) dependency
- Add Rust dependency
- Setup Plugin in your Bevy App
Educational
Tutorials, deep dives, and other information on developing Bevy applications, games, and plugins
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.
fail when an example doesn't set doc-scrape-examples authored by mockersf
Fix crates not building individually authored by BD103
Fixed crash when transcoding one- or two-channel KTX2 textures authored by Hexorg
Fix some doc warnings authored by ameknite
Implement alpha to coverage (A2C) support. authored by pcwalton
fix shadow pass trace authored by re0312
Update docs of `set_if_neq` and `replace_if_neq` authored by RobWalt
Fix 2D BatchedInstanceBuffer clear authored by superdump
Add comment to example about coordinate system authored by emilyselwood
Fix beta lints authored by BD103
Add `Cascades` to the type registry, fixing lights in glTF. authored by pcwalton
Add double end arrow to gizmos authored by pablo-lua
impl `Reflect` for `EntityHashSet` authored by RobWalt
Cleanup the multithreaded executor authored by james7132
Normalization anchor for sprite slice in dimensions of this slice authored by bugsweeper
Fix extensionless image loading panic authored by VictorBulba
Make `Transform::rotate_axis` and `Transform::rotate_local_axis` use `Dir3` authored by mweatherley
grammar fix authored by TheCarton
Implement clone for most bundles. authored by Brezak
fix: incorrect sprite size for aabb when sprite has rect and no custom_size authored by MarcoMeijer
Instrument asset loading and processing. authored by chescock
Fix extensionless image loading panic authored by VictorBulba
Fix a copy-paste typo doc authored by atlv24
Run `CheckVisibility` after all the other visibility system sets have… authored by Brezak
separating finite and infinite 3d planes authored by andristarr
Added deref trait for Mesh2dHandle authored by zuiyu1998
Add missing Default impl to ExtendedMaterial. authored by tychedelia
Document Camera coordinate space authored by atlv24
Expose `desired_maximum_frame_latency` through window creation authored by Kanabenki
Remove unused nightly toolchain environmental variable authored by BD103
Fix uses of "it's" vs "its". authored by targrub
fix: use try_insert instead of insert in bevy_ui to prevent panics when despawning ui nodes authored by MarcoMeijer
Math primitives cleanup authored by solis-lumine-vorago
Fix Clippy lints on WASM authored by BD103
Use WireframeColor to override global color authored by IceSentry
Adding explanation for loading additonal audio formats to example authored by andristarr
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.
Pull Requests Opened this week
Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org authored by SkiFire13
Implement opt-in sharp screen-space reflections for the deferred renderer. authored by pcwalton
Add `#[track_caller]` to `Query` methods authored by BD103
Remove unecessary lint `#[allow(...)]` authored by BD103
Clean up 2d render phases authored by IceSentry
Introduce a `WindowWrapper` to extend the lifetime of the window when using pipelined rendering authored by Friz64
multi_threaded feature rename authored by andristarr
new example: sprite animation in response to an event authored by awwsmm
Optimize TaskPools for use in static variables. authored by james7132
Meshlet single pass depth downsampling (SPD) authored by JMS55
Implement fast depth of field as a postprocessing effect. authored by pcwalton
Headless renderer example has been added authored by bugsweeper
Make `AppExit` more specific about exit reason. authored by Brezak
use a u64 for MeshPipelineKey authored by mockersf
Dedicated `Reflect` implementation for `Set`-like things authored by RobWalt
Use a slotmap for render assets storage authored by superdump
Ellipse functions authored by solis-lumine-vorago
Implement clearcoat per the Filament and the `KHR_materials_clearcoat` specifications. authored by pcwalton
Cleanup extract_meshes authored by re0312
ButtonInput Performance Cost Adjustment authored by Earthmark
`ButtonInput` docs should contain a usage example authored by Earthmark
Support `on_thread_spawn` and `on_thread_destroy` for `TaskPoolPlugin` authored by LogicFan
Make SystemParam::new_archetype and QueryState::new_archetype unsafe functions authored by james7132
Redo CI caching authored by BD103
Issues Opened this week
Create an example showcasing disjoint mutable access to the world via `unsafe_world_cell` authored by cBournhonesque
multi-threaded feature name is kebab case but all others are snake case authored by alice-i-cecile
Systems could potentially get preempted by tasks from other worlds authored by re0312
Add `LoadContext::load_direct_with_settings` or similar authored by Zoomulator
Bevy, on Web and WebGL, doesn't exit winit's Event Loop cleanly after a GPU crash. It panics twice with already borrowed: BorrowMutError authored by Maximetinu
Remove unecessary lint authored by BD103
GLTF with 3 UV Maps throws an error authored by ethereumdegen
Make Bevy Citable authored by alexk101
Indic font rendering incorrectly authored by neevany
Add `ExitCode` to `AppExit` authored by BD103
Allow usage of `Rg11b10Float` for HDR authored by eero-lehtinen
Clippy complains when building with wasm32. authored by Brezak
Errors when loading labled assets authored by HaNaK0
Clarify how `Plane3d` is oriented in space authored by mweatherley
Clarify camera coordinate system further authored by alice-i-cecile
Android 11 segfaults since `MeshUniforms` generation on the GPU authored by mockersf
Words that are wider than its container are not wrapped authored by MarcoMeijer
WireFrameColor component ignored authored by galop1n
Gizmos::line() with a transparent color display weird authored by gloridifice
Gizmos always draw on 2d sprites, z value and depth_bias neither works authored by gloridifice
0.13.2 - failed to run custom build command for libudev-sys v0.1.4 (fedora) authored by Vladimir-Urik
Improve scene serialized format authored by djeedai
`check-missing-*-in-docs` job does not install Rust authored by BD103