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
@alice_i_cecile thanks for those Monday threads, always a pleasure to read :)