Dev tools can be more than a grab bag
2024-03-25
Dev tools can be more than a grab bag of "things that developers find useful": there are real commonalities and patterns!
— Alice
Bevy 0.13.1 is out now with fixes for globals in vertex shaders, and more.
I'm in London this week to give a talk on Bevy at RustNation UK. My talk centers on the Rusty ergonomics that Bevy applies to empower people to build games, so when I saw RFC 77 - dev-tools-abstraction I knew I had to read it.
The RFC tries to answer questions like "What is a Dev Tool", what is the purpose of bevy_dev_tools
, how will dev tools be registered, called, and displayed, and more. The RFC is a great read and I encourage you to read it if you're interested but note that it hasn't been merged yet and will likely undergo some more editing this week.
Meshlets are seeing some promising progress and look like they're on their way to being merged behind a feature flag. Meshlets are very exciting but not a one-size-fits-all solution, so its also encouraging to see continued progress towards GPU driven rendering as well.
It's really meant for rendering really dense, ridiculously high resolution scenes where the goal is to render 1 triangle per pixel, so you're never limited by lack of geometric detail
— JMS55
Meshlets also point out a growing stress point in the Material and shader abstractions. In addition to the possible shaders you can define after prepass and deferred were added
- vertex_shader
- fragment_shader
- prepass_vertex_shader
- prepass_fragment_shader
- deferred_vertex_shader
- deferred_fragment_shader
It looks like there will be a few more
- meshlet_mesh_fragment_shader
- meshlet_mesh_prepass_fragment_shader
- meshlet_mesh_deferred_fragment_shader
All of these together means that you need to have a growing set of knowledge about which imports to use and how to ifdef
code appropriately if you want to support them all (and to be clear, you don't have to support them all if you don't need to).
- Alice's Merge Train is a rundown of the status of current PRs at a maintainer level.
Showcase
Bevy work from the #showcase channel in Discord and around the internet. Use hashtag #bevyengine.
Compass Map Editor
showcase
The Compass Map Editor underwent a refactor completely to use mesh and materials to be able to apply custom shaders to individual sprites. This allows custom selection and deletion outlines and more.
The refactor showed a ~48% memory usage reduction by moving to meshes and changing their caching strategy,
Animal Crossing/Stardew Valley inspired sandbox
showcase
This YouTube video shows off the progress of an Animal Crossing/Stardew Valley inspired development sandbox. Resource gathering, a number of different tiles and health bars as well as the classic Animal Crossing "curved world" aesthetic.
Updates for this one are posted regularly on Mastodon and other platforms.
Asteroids Ship Controller
showcase
This is an Asteroids-style ship controller built in a few hours on a flight. Ship selection, movement, and firing lasers were implemented. The information in the corner is iyes_perf_ui
first-person starcraft-like
showcase
About three weeks went into this first-person starcraft-like game. Its meant to act as a tech demo and thus the Discord thread has a long list of references to different plugins and other assets that were used.
Check out the video on YouTube
Ray casting
showcase
Ray casting on arbitrary convex shapes in a collision detection / geometric query library. This demo is done by the person that maintains bevy_xpbd
Voxel Planet Generation
showcase
This showcase shows the voxel planet generation in AnthonyTornetta/Cosmos. Cosmos is a multiplayer block-based space exploration game in active development.
Zoolitaire
showcase
Zoolitaire is a grid-based puzzle game deploying on iOS. Its the author's first deployed Bevy mobile game.
If you don't own an iPhone, there's a video of gameplay in the Discord thread
Path to Renewal
showcase
Enjoy nature, eat baked goods, and avoid bill-throwing enemies in this Buddy Up Jam entry. Path to Renewal is a maze game that we've seen developing in previous showcases.
Playable on Itch.io
X-treme
showcase
X-treme is the result of a 3-day game jam. You play as a cat in a box flying through the air.
Playable on Itch.io
Crates
New releases to crates.io and substantial updates to existing projects
iyes_perf_ui first release!
crate_release
iyes_perf_ui
is a customizable Performance/Debug overlay for Bevy UI!
- Made with Bevy UI (not egui or any other 3rd-party UI solution)
- Easy to set up (see
simple
example) - Customizable appearance/styling (see
settings
example) - Modular! You decide what info you want to display!
- Choose any combination of predefined entries for:
- Framerate (FPS), Frame Time, Frame Count, ECS Entity Count, CPU Usage, RAM Usage, Wall Clock, Running Time
- Implement your own custom entries to display anything you like!
- (see
custom_minimal
andcustom
examples)
- (see
- Choose any combination of predefined entries for:
- Support for highlighting values using a custom font or color!
- Allows you to quickly notice if something demands your attention.
Spawning the UI can be as simple as:
commands.spawn((
PerfUiRoot::default(),
PerfUiEntryFPS::default(),
PerfUiEntryCpuUsage::default(),
PerfUiEntryClock::default()
));
web_panic_report
crate_release
web_panic_report
replaces an html element on the page with a bug report form when panics happen in your Bevy game. This is targeted at wasm deployments and has [an online demo](https://loopystudios.github.io/web_panic_report/
Devlogs
vlog style updates from long-term projects
Gravity Sickness
devlog
This devlog covers 4-5 months of learning Bevy and Rust building a "scape-like" action-rpg.
Panzatier
devlog
3 months of development for Panzatier. Updates including talking about astar pathfindings, ray casting, map updates, and more.
Playable at lommix.com and there's a Project thread in the Bevy Discord.
Educational
Tutorials, deep dives, and other information on developing Bevy applications, games, and plugins
Modular 3d Characters
educational
Creating modular characters is a common feature of many video games. This 3 hour video dives into bones, parenting, attaching parts, and linking animations to build modular characters.
"inline assets"
educational
An "Inline Asset" is an asset whose data is encoded entirely within the asset path itself, without the need to load data from a filesystem or anywhere else. This is similar in concept to a "data URL", which allows a image or resource to be encoded directly within the URL itself.
This gist explores how to take advantage of Bevy's asset system to manage procedurally generated data for materials.
Bevy Top Down Shooter Tutorial With Massive Enemy Hordes
educational
This top down shooter uses a kd-tree for efficient collisions and is capable of handling large hordes of enemies with simple bullet collisions. The video is a timelapse of the game being built from scratch. It also includes fixing some common errors that one might encounter while working with Bevy.
Extreme Bevy Part 5: Procedural generation
educational
Extreme Bevy is a tutorial series that aims to recreate the Extreme Violence by Simon Green with online p2p multiplayer using rollback netcode. The series focuses on Bevy, GGRS, and Matchbox.
The newest section, Part 5, focuses on procedural generation and explores how to seed a random number generator and use it to generate a map.
The finished game can be played here.
remove link to inexistent example authored by tomara-x
Add pipeline statistics authored by LeshaInc
Add trait for clamping colors authored by pablo-lua
Compute texture slices after layout authored by MarcoMeijer
make example font_atlas_debug deterministic with a seeded random authored by mockersf
send Unused event when asset is actually unused authored by robtfm
Beautify example showcase site URLs authored by TrialDragon
Add into_ methods for EntityMut and EntityWorldMut that consume self. authored by jkb0o
add reflect for BinaryHeap authored by cBournhonesque
Uniform point sampling methods for some primitive shapes. authored by 13ros27
Split ScheduleGraph::process_configs function (adopted) authored by yyogo
Reflect default in colorspaces in `bevy_color` authored by pablo-lua
Fix typo in bevy_internal/Cargo.toml authored by s-puig
Solve some oklaba inconsistencies authored by pablo-lua
Use `Dir3` in `Transform` APIs authored by yyogo
Remove archetype_component_access from QueryState authored by james7132
Update to fixedbitset 0.5 authored by james7132
make align deterministic with a seeded random authored by mockersf
make alien_cake_addict deterministic with a seeded random authored by mockersf
check that patches are not broken authored by mockersf
feat: derive some common traits on some UI types authored by awwsmm
Remove WorldCell authored by james7132
Explain Camera2dBundle.projection needs to be set carefully authored by stepancheg
Fix pink colors in examples authored by rparrett
Expose Winit's `with_skip_taskbar` on window creation authored by chompaa
fast-fail in as_bind_group authored by robtfm
Add setting to enable/disable shadows to MaterialPlugin authored by NiseVoid
Use async-fn in traits rather than BoxedFuture authored by ArthurBrussee
bevy_color: Add Tailwind palette authored by rparrett
Add a gizmo-based overlay to show UI node outlines (Adopted) authored by pablo-lua
Add methods to return the inner value for direction types authored by Multirious
Add border radius to UI nodes (adopted) authored by chompaa
Color maths 4 authored by solis-lumine-vorago
Fix `Oklab` and `Oklch` color space inconsistency authored by chompaa
Reflect default in some types on `bevy_render` authored by pablo-lua
refactor: separate out `PanicHandlerPlugin` authored by simbleau
UI: don't multiply color channels by alpha authored by mockersf
UI: allow border radius to be optional for images and background authored by mockersf
Add a from Dir2 impl for Vec2 authored by Brezak
Always spawn fps_overlay on top of everything authored by IceSentry
Fix Ci failing over dead code in tests authored by Brezak
Make `AssetAction::Ignore` not copy assets to `imported_assets` authored by BeastLe9enD
typo: 'plateform' -> 'platform' authored by waywardmonkeys
Update `borders` example to match `rounded_borders` example authored by chompaa
Make cardinal splines include endpoints authored by mweatherley
rounded border: remove dead code in shader authored by mockersf
Handle NaNs in diagnostics authored by Brezak
UI: rounded border should use camera instead of windows authored by mockersf
Add hue traits authored by oyasumi731
Interpolating hues should use rem_euclid. authored by viridia
Add path function to ProcessContext authored by BeastLe9enD
`Animatable` for colors authored by solis-lumine-vorago
pick nits from example bounding_2d authored by awwsmm
Implement `Mix` for `Hsva` and `Hwba` authored by solis-lumine-vorago
Update ecs query docs authored by cBournhonesque
Add `Triangle3d` primitive to `bevy_math::primitives` authored by vitorfhc
Implement maths and `Animatable` for `Srgba` authored by solis-lumine-vorago
Allow Commands to register systems authored by pablo-lua
Fix typo in `SceneBundle` docs authored by A-Walrus
Switch to portable RNG in examples authored by TimLeach635
Removed Into<AssedId<T>> for Handle<T> as mentioned in #12600 authored by bugsweeper
Make `feature(doc_auto_cfg)` work authored by ameknite
Make SystemInfo a Resource authored by IceSentry
Remove needless color specializaion for `SpritePipeline` authored by Brezak
Update safety comment for bundle removal authored by cBournhonesque
Fix get_asset_paths not properly deleting empty folders (& recursive async functions) authored by ArthurBrussee
Clarify documentation regarding just_released and just_pressed inputs authored by s-puig
reflect: remove manual Reflect impls which could be handled by macros authored by OneFourth
Adding some docs for archetype internals authored by cBournhonesque
Moving structs PointLight, SpotLight, and DirectionalLight out of light/mod.rs authored by nbielans
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
Fix crash on Linux Nvidia 550 driver authored by eero-lehtinen
Add `AsyncSeek` trait to `Reader` to be able to seek inside asset loaders authored by BeastLe9enD
Color maths 2 authored by solis-lumine-vorago
Apply some rustfmt nightly settings authored by ameknite
Parallel event reader authored by yyogo
fix previous_position / previous_force being discarded too early authored by AldanTanneo
Add frame time graph to fps_overlay authored by IceSentry
Add padding to new text in `ui` example authored by rparrett
fix: correctly handle UI outline scale authored by notmd
Added an `init_bundle` method to `World` authored by 13ros27
Split apart `AssetSourceBuilder`'s `build_sources` and `build` authored by tygyh
Divide the single `VisibleEntities` list into separate lists for 2D meshes, 3D meshes, and lights, for performance. authored by pcwalton
Fix potential out-of-bounds access in pbr_functions.wgsl authored by UkoeHB
Adding explanation to seeded rng used in examples authored by andristarr
Fixed crash when wgpu tries to read past image data for dds skybox authored by Hexorg
more robust gpu image use authored by robtfm
check sampler type in as_bind_group derives authored by robtfm
Fixed crash when transcoding one- or two-channel KTX2 textures authored by Hexorg
Throttle render assets authored by robtfm
Change orthographic projection near default to -1000 authored by lkolbly
fix: fixing winit update mode authored by pietrosophya
Add more component common schedule conditions authored by jjyr
Corrected use of visibility to drive rendering on unsupported platforms authored by thebluefish
Fix example showcase wasm window settings patch authored by rparrett
Improve output of example showcase patches CI workflow authored by rparrett
Add triangle_math tests and fix Triangle3d::bounding_sphere bug authored by vitorfhc
Finish the work on `try_apply` authored by Brezak
Improve ci - install binaries instead of compiling authored by ameknite
Move PanicHandlerPlugin into bevy_app authored by gabrielkryss
Improve gamepad input handling ergonomics authored by s-puig
Implement minimal GPU culling for cameras. authored by pcwalton
Make dynamic_linking a no-op on wasm targets authored by james7132
Add `EncasedBufferVec`, an higher-performance alternative to `StorageBuffer`, and make `GpuArrayBuffer` use it. authored by pcwalton
fix: rewrite winit loop authored by pietrosophya
WIP: Change Detection as components authored by cBournhonesque
Render Feature system and render plugin dependency resolution authored by ecoskey
Issues Opened this week
Define and document a minimum hardware spec authored by james7132
Efficient World merging authored by james7132
Explain the usage of seeded RNG in examples authored by alice-i-cecile
`Oklab` and `Laba` color space bounds are incorrect authored by alice-i-cecile
Integrate pipeline statistics with bevy_dev_tools authored by alice-i-cecile
Add tracy integration to pipeline statistics authored by alice-i-cecile
Improve error messages when check-example-showcase-patches-still-work CI job fails authored by alice-i-cecile
Website-Examples with shaders don't start authored by mineichen
Add impl `From<Dir2> for Vec2` authored by afonsolage
Add serialize feature to `bevy_color` authored by pablo-lua
Diagnostic overlay dev tool authored by IceSentry
InlineAssetReader authored by viridia
`DebugUiPlugin` does not handle node with custom transform correctly authored by notmd
Android Support: Push Notifications authored by AbstractiveNord
`DebugUiPlugin` draws rectangles in wrong position when scale factor is not 1.0 authored by rparrett
Add `AssetServer::remove` authored by alice-i-cecile
Allow winit event loop to be recreated on web / wasm authored by phisn
`SystemState` can be cached using its `ExclusiveSystemParam` implementation, but the docs don't mention this. authored by Themayu
`AnimationGraph`: Transition with the same `NodeIndex` doesn't work authored by theredfish
Renderer optimization tracking issue authored by superdump
Move `PanicHandlerPlugin` into `bevy_app` authored by alice-i-cecile
`Into<AssetId<T>>` is a massive footgun. authored by mintlu8
LogPlugin's `update_subscriber` is broken when adding extra FmtLayers authored by cBournhonesque
Update Array Texture example with Material Extension authored by Inspirateur
Add tests, examples and benchmarks for RenderLayers and TargetCamera rework authored by UkoeHB
Configurable (opt-in) event timestamps authored by ItsDoot
Support arbitrary optional `SystemParam` types in systems with a blanket impl `SystemParam for Option<S: SystemParam>` authored by alice-i-cecile
Add tests to `bevy_color` to ensure that hue blending goes through the shortest path authored by alice-i-cecile
Use `rem_euclid` consistently throughout `bevy_color` authored by alice-i-cecile
Make Bevy's compile-fail tests less fragile authored by alice-i-cecile
Periodically check Bevy's CI against the beta Rust channel authored by alice-i-cecile
`Hsva` and `Hwba` colors do not implement `Mix` authored by alice-i-cecile
Add color math operations (Add, Sub) and `Animatable` support for cylindrical color spaces authored by alice-i-cecile
Standardize deterministic RNG in examples authored by BD103
CPU spikes when running the unfocused app in web authored by beoboo
In bevy 0.13.1 , only a single NodeBundle will work. spawning multiple UI node bundles will destroy the others ones authored by ethereumdegen
`unwrap` considered harmful authored by james7132
Add examples demonstrating how to follow the player with a camera authored by alice-i-cecile
Add a loading screen example authored by alice-i-cecile
Add an example demonstrating how to load your assets sequentially to reduce memory usage on web platforms authored by alice-i-cecile
Add an audio example demonstrating how to play randomized sound effects authored by alice-i-cecile
Add an audio example demonstrating how to play a soundtrack authored by alice-i-cecile
Retrieving data in buffers from GPU to CPU authored by 443eb9
Deprecate then remove `ReceivedCharacter` authored by alice-i-cecile
bevy_asset `LoadState` should contain more useful information in its `Failed` arm authored by alice-i-cecile