Comparing v0.18.0...v0.18.1 · bevyengine/bevy

A refreshingly simple data-driven game engine built in Rust - Comparing v0.18.0...v0.18.1 · bevyengine/bevy

GitHub

1. https://github.com/bevyengine/bevy/pull/4775

Parallelized transform propagation! Great example of targeted, profile-guided optimization based on the challenges seen in practice.

Initially testing looks good. Seeing modest performance improvements on large, scenes, and nothing noticeable on small scenes. Needs to be rebased to provide a fair comparison due to our other changes, but even still it's faster!

Gut feel on change detection worked out, but didn't seem worth it in more realistic cases.

bors r+

2. https://github.com/bevyengine/bevy/pull/5214

#RustLang's `ExactSizeIterator` trait didn't work how we expected. The size hint is for "remaining items", not total items.

That's been better documented upstream now (thanks!) https://github.com/rust-lang/rust/issues/98721.

Now, this PR fixes our mistake.

bors r+

Fix size_hint for partially consumed QueryIter and QueryCombinationIter by nicopap · Pull Request #5214 · bevyengine/bevy

Objective Fix #5149 Solution Instead of returning the total count of elements in the QueryIter in size_hint, we return the count of remaining elements. This Fixes #5149 even when #5148 gets merged....

GitHub

3. https://github.com/bevyengine/bevy/pull/6524

When we were panicking on a thread, it was leaking upwards, and breaking other threads. This resulted in some *really* frustrating flaky tests in CI with #[should_panic] annotations.

It was likely even more damaging in actual use cases, as it prevents graceful failure.

This PR handles this more gracefully, by catching the unwind (and just dropping the error). Annoying that there's a small perf regression, but correct code is better than fast code.

bors r+

Fix panicking on another scope by james7132 · Pull Request #6524 · bevyengine/bevy

Objective Fix #6453. Solution Use the solution mentioned in the issue by catching the unwind and dropping the error. Wrap the executor.try_tick calls with std::catch::unwind. Ideally this would be ...

GitHub

4. https://github.com/bevyengine/bevy/pull/6535

Ah, flexbox, my old nemesis. `Margin::Auto` is used consistently throughout our examples as a way to center items, but it's not very robust and is an old pre-flexbox #css hack.

Instead, actually set the alignment and justification of your parent.

Annoying that this is more verbose, but this is much clearer for beginners to learn from (and tweak). Time to rebase https://github.com/bevyengine/bevy/pull/5513...

bors r+

Remove auto-margin properties from the examples by garychia · Pull Request #6535 · bevyengine/bevy

Objective Fixes #6498. Solution Adding a parent node with properties AlignItems::Center and JustifyContent::Center to centered child nodes and removing their auto-margin properties.

GitHub

5. https://github.com/bevyengine/bevy/pull/6547

Another PR by James, another sizable performance win. This one splits apart our change detection ticks (u32s used to track what's been modified) into added / changed, rather than a joint struct.

This means that in the tight tight loops, we're iterating over less data, and get better cache efficiency. Huge wins for small components mutably iterated.

bors r+

Split Component Ticks by james7132 · Pull Request #6547 · bevyengine/bevy

Objective Fixes #4884. ComponentTicks stores both added and changed ticks contiguously in the same 8 bytes. This is convenient when passing around both together, but causes half the bytes fetched f...

GitHub

6. https://github.com/bevyengine/bevy/pull/6664

Expose some more functionality from winit: passing cursor input through to the covered app.

With this + transparent windows I think that we're well overdue for Bonsai Buddy: Bevy Edition.

bors r+

Expose set_cursor_hittest() from winit by alphastrata · Pull Request #6664 · bevyengine/bevy

Objective Bevy should be usable to create 'overlay' type apps, where the input is not captured by Bevy, but passed down/into a target app, or to allow passive displays/widgets etc. Solution the ...

GitHub

7. https://github.com/bevyengine/bevy/pull/6672

Create a box from two corners! Perfectly useful. I agree with James's nit, but totally not worth blocking the PR on.

bors r+

Add Box::from_corners method by komadori · Pull Request #6672 · bevyengine/bevy

Objective This add a ctor to Box to aid the creation of non-centred boxes. The PR adopts @rezural's work on PR #3322, taking into account the feedback on that PR from @james7132. Solution Box::from...

GitHub

8. https://github.com/bevyengine/bevy/pull/6692

Another helper method for Quaternion rotation! Should be useful when working with characters.

bors r+

Add `Transform::look_to` by devil-ira · Pull Request #6692 · bevyengine/bevy

Add a method to rotate a transform to point towards a direction. Also updated the docs to link to forward and up instead of mentioning local negative Z and local Y. Unfortunately, links to methods ...

GitHub

9. https://github.com/bevyengine/bevy/pull/6676

Track the changed frames in CorePlugin, not RenderingPlugin, to be nicer to custom renderers, turn-based games and more. I'll actually use this myself in https://github.com/Leafwing-Studios/leafwing_input_playback

bors r+

The `update_frame_count` system should be placed in CorePlugin by phuocthanhdo · Pull Request #6676 · bevyengine/bevy

Objective Latest Release, "bevy 0.9" move the FrameCount updater into RenderPlugin, it leads to user who only run app with Core/Minimal Plugin cannot get the right number of FrameCount, it always r...

GitHub

10. https://github.com/bevyengine/bevy/pull/6699

When rendering, components are selectively extracted to the render world (only rendering-relevant data should be moved).

To do so, we use a nice `ExtractComponent` plugin. But when the value we want to extract, and the original component aren't the same thing, this results in wasted work and pointless boilerplate.

This PR uses the magic of associated types to speed that up.

Boo for no default associated types yet! Still, way better.

bors r+

ExtractComponent output optional associated type by torsteingrindvik · Pull Request #6699 · bevyengine/bevy

Objective Allow more use cases where the user may benefit from both ExtractComponentPlugin and UniformComponentPlugin. Solution Add an associated type to ExtractComponent in order to allow specifyi...

GitHub

That's all I have for you today: help us out by reviewing PRs: https://github.com/bevyengine/bevy/pulls?q=is%3Aopen+is%3Apr+-label%3AS-Ready-For-Final-Review+-draft%3A%3Atrue+-label%3AS-Needs-RFC+-reviewed-by%3A%40me+-author%3A%40me

Yes, that means you, dear reader. Your comments and approvals matter, and are what helps @bevy scale and move quickly as a volunteer #foss organization :)

Even if you're new to #rustlang or #gamedev, it's a great way to learn, and comments of "I don't understand this", "why are you making this change" and "needs more tests" really do improve PRs.

Comparing v0.18.0...v0.18.1 · bevyengine/bevy

A refreshingly simple data-driven game engine built in Rust - Comparing v0.18.0...v0.18.1 · bevyengine/bevy

GitHub

Yes! These days the progress and development momentum of #bevyengine is often not bottlenecked on maintainers, but rather on #codereview .

Reviewing PRs is a very effective way to help the project move forward, and anyone can do it. Don't let impostor syndrome stop you! Go review things and leave comments if you have anything to say. If you think you aren't compenent, just make that clear in your comments! Your review is still helpful!

#rustlang #gamedev

@iyes are PRs really open to anyone to review? I’d be interested but I’m definitely not qualified. I’d probably just have to ask a lot of questions, which might slow things down.

@briankung

Yes. It is up to the maintainers to make the judgement about when PRs have had enough review.

You can also ask questions in Discord, if you just wanna learn about something. But even on GH, it might lead to interesting discussion. I guess, use your judgement.