Hi #bevymergetrain fans! We're back to our regular posting schedule this fine Monday, catching up on the 25 community-approved #rustlang #gamedev PRs. Follow along as I walk you through the tiny decisions and processes needed to make #opensource work and celebrate the contributors who make this possible :)
1. https://github.com/bevyengine/bevy/pull/13871
Bevy has two different rendering modes: forward and deferred, each with their own advantages. While handy, this adds significant complexity. In this case, our emissive (glowy) values differ.
Not a full fix, but seems like an improvement. There was concern about how it conflicts with another PR, but that author chimed in saying that we should merge this one first. Very helpful! Well, let's do that now.
2. https://github.com/bevyengine/bevy/pull/13888
Error messages: shockingly important to a nice development experience. In this case, the incomparable MrGVSV has improved the error messages associated with reflection-powered serialization.
Some really nice work to define an ad-hoc callstack of serialization to actually produce user-relevant error messages when attempting to save games. This is finally passing CI, but the authors *other* code quality PR merge conflicted with this one T_T Well, pinging again...
3. https://github.com/bevyengine/bevy/pull/14790
Ooh, an undefined behavior fix for our ECS stack. These are always fun: designing complex unsafe Rust code is a lot like a security exercise. Contributors are constantly probing, looking for edge cases and constructing the most pathological things imaginable to break your system.
Most of the time, this isn't something users are likely to stumble across, but it's good to fix here! In this case, `QueryFilter` could perform safe mutable access. Bad! Merging the fix.
4. https://github.com/bevyengine/bevy/pull/15039
A simple code quality fix: some code was moved between two modules, but then accidentally reintroduced to its origin a week later due to an old git branch.
Delete it! Great, nice and easy. Merging.
5. https://github.com/bevyengine/bevy/pull/15040
A PR from a returning contributor (hi! it's good to see you again!), cleaning up the type signatures for some of our methods on `Query`.
I agree, these *are* a bit less intimidating :) Still uh... very type heavy, but there's nothing to be done there. Merging.
6. https://github.com/bevyengine/bevy/pull/15044
A nice follow-up PR for working with `ShaderStorageBuffer` :) It's really nice to see the rough edges get polished on new features prior to release.
Some nice review feedback to reduce the number of copies required: I love seeing this sort of small improvement suggested. Code added looks solid, and she even updated the example that uses this feature! Perfect, merging.
7. https://github.com/bevyengine/bevy/pull/15047
Oh wow, this is a very nice PR. Simple but high impact, from a brand new contributor. I didn't review this at all, so this is my first time seeing it.
The problem being solved here is that saving a scene led to unstable results, generating aggravating diffs when manually inspecting or version controlling scenes. By simply sorting these entries by their path name, we can stabilize this. It's still arbitrary, but stability is its own reward. Merging!
8. https://github.com/bevyengine/bevy/pull/15057
Oh look, someone decided to start documenting `bevy_assets`. Wonder who that could be...
This is a tiny PR that I spun off of my main, much more controversial PRs, explaining how `AssetMode` works and why it exists. This has two (well, three in this case) approvals, so it's time to merge in my own PR :) A quick skim of the diff looks fine, so let's press the button.
9. https://github.com/bevyengine/bevy/pull/15062
When convenient, Bevy will use Rust's handy `deprecated` annotation to phase out old APIs. This makes migrations easier by allowing us to provide in-line migration advice and keep old code compiling.
We generally only keep them around for a single release cycle though: most of the time the migration is simple enough. In this case, these old bundles are particularly valuable to remove now, since we're likely to deprecate *all* of Bevy's first-party bundles. Merging.
10. https://github.com/bevyengine/bevy/pull/15065
A simple cleanup PR to simplify some recently added logic for picking buttons with rounded corners.
As discussed in the thread, this reverts a review suggestion, favoring simpler code over less branching. Both are fine, but given that this is run *very* rarely (a few times a frame at most), I like the simplicity a bit better. Branching vs less assembly is a perf toss-up, but its really not worth benchmarking here.
Merging :)
11. https://github.com/bevyengine/bevy/pull/15066
A nice little feature for our extremely popular new observers feature, which offer really convenient callback-style event handling in Bevy.
Observers are stored as entities, listening for changes. This PR exposes *which* entity was listening to the callback, allowing for interesting "remove the callback once it runs" behavior and aiding debugging. Sure, this is neat! The data is already there, it's just adding a getter.
Merging.
12. https://github.com/bevyengine/bevy/pull/15071
A simple rendering fix, fixing some logic related to how we validate the available device features in our `AsBindGroup` macro.
This is deep in the weeds for me and I wouldn't be comfortable approving this myself, but it's by a trusted contributor, the linked docs line up, and a rendering SME has approved it. Happy to merge here: I should spend some work time playing with side projects to learn more rendering soon.
13. https://github.com/bevyengine/bevy/pull/15073
An adopted PR has made it across the finish line! I love Bevy's cultural practice of picking up and finishing abandoned high quality work. The author in this case was too busy to resolve merge conflicts in a timely manner, so one of our intermediate contributors cleaned it up for them.
The actual work resolves a nasty conundrum: 2D and 3D orthographic projections want different defaults, so what should we pick? The answer: split the method in two. Awesome. Merging!
14. https://github.com/bevyengine/bevy/pull/15075
Another adopted PR, also about orthographic projections. Weird! Anyways, this PR (by a different author) removes the `scale` field on our orthographic perspectives: it's fully redundant to the more flexible `scaling_mode` field.
Awesome: this has bugged me for ages but never been important enough to prioritize personally. Spinning off well-written approachable issues and fostering contributors is really powerful. Fix is good, merging :)
15. https://github.com/bevyengine/bevy/pull/15083
A mildly spicy ergonomics PR: allowing users to set states via commands using an extension trait. I personally wouldn't use it often (it's a bit slower, and I find it less clear), but I've seen this exact convenience API created across multiple serious projects that I've done code review for.
I pushed back on using this in examples to ease learning (teach one blessed way consistently!), but I'm fine to add this for those who want it. Merging.
16. https://github.com/bevyengine/bevy/pull/15090
While writing docs for asset processing, the `LoadAndSave` asset processor came to my attention. This approach is extremely similar to the `LoadTransformAndSave` processor, and JMS55 complained about its existence. I spun out a quick issue, bushrat implemented it and we're now ready to merge!
I think removing this is the right call: splitting your transformation into its own step is much clearer and more reusable, and its easier to learn. Merging.
17. https://github.com/bevyengine/bevy/pull/15091
A new contributor appeared! They've taken the initiative to clean up our `AspectRatio` API: adding error types, constants and better documentation.
There were a few style / API design choices that I corrected (we don't need a separate errors.rs file....) but I'm really pleased with the quality and pleasant receptiveness to feedback. Looking forward to seeing more!
Merging :)
18. https://github.com/bevyengine/bevy/pull/15092
Ooh, one of my issues from 2021 got a fix! This PR demonstrates how to zoom and orbit cameras, a common and surprisingly annoying gamedev task. Love to see it; this sort of documentation makes a big difference.
Really good iteration during review: merging the examples and generally cleaning things up. I can't wait until we have a first-party inspector to let users twiddle the various camera controller values easily.
Merging :) New contributors are great :D
19. https://github.com/bevyengine/bevy/pull/15093
A code quality PR for our shaders. There was a mysterious `if (all(indirect_light == vec3(0.0f)))` clause repeated in a few places. Turns out, this was actually a test for if we found diffuse indirect lighting.
Factoring this out into a named boolean is way clearer. Nice! Shader code doesn't have to be unreadable, promise. Merging.
20. https://github.com/bevyengine/bevy/pull/15094
A buggy example (screenshot) reveals a bug in our cursor icon code: it wasn't resetting properly when the `CursorIcon` was removed. A great use of the new observers here.
There's also the standard "always use `get_single` for windows" bug, which I know I've written quite a few times. Panics are bad! I regret advocating for panicking-by-default all those years ago Well, good fixes! Merging now.