r/bevy • • Jun 19 '26

Bevy 0.19

https://bevy.org/news/bevy-0-19/
354 Upvotes

26 comments sorted by

53

u/Doublecouponday Jun 19 '26

Finally, bevy scenes! This should help work on the long awaited editor.

20

u/cornmonger_ Jun 19 '26

*applause*

16

u/099406576946965 Jun 19 '26

So excited to see scenes finally release! Huge step forward

18

u/GreenlessRGB Jun 19 '26 edited Jun 20 '26

Nice. Not a fan of 3D being a priority, but love improvements to UI and overall engine feel (BSN etc).

EDIT: pyronide asked an interesting question about what 2D features I would like to see :

- Automatic highlighting of 2D objects. In some games, I can hover my cursor over a character and it's contour becomes blue. Typical example is Fable The Lost Chapters, though we didn't select characters with a cursor and the game is 3D. But this feature could help in 2D games also.

- 2nd feature is difficult to explain and it should probably be a separate crate, but something like this : if we have an irregular 2D shape (like spilled ink), I would like to grab the shape at some point and to move it or spread it by that point. Imagine a spilled ink that vaguely reminds you of a dog. I would like to grab that shape by the "head" and stretch the "neck" to make a giraffe. Or be allowed to detach the "head".

Though, both of these features might indeed be doable in both 2D and 3D.

28

u/chrisbiscardi Jun 20 '26

FWIW, the general sentiment is that 3d and 2d rendering should get closer together, thus bringing the benefits volunteers have introduced for 3d, to 2d as well.

You can see some of this starting to happen with 0.19's SpriteMesh, which gives a Sprite API on top of Mesh instead of a separate implementation: https://docs.rs/bevy/0.19.0/bevy/prelude/struct.SpriteMesh.html

2

u/GreenlessRGB Jun 20 '26

Thanks, didn't notice this, I guess I skimmed through the changelogs too quickly.

5

u/onlymostlydead Jun 20 '26

They mention their intent in the What's Next section of the blog post:

Unified 2D and 3D rendering internals: Bevy's 2D rendering is plenty fast, but it's started to lag behind our 3D rendering in terms of both performance and features. We're hoping to unify its internal architecture to avoid duplicating work, keeping the high-level Sprite API completely untouched.

12

u/cornell_cubes Jun 19 '26

I'd argue that the performance benefits offered by an ECS architecture are needed more for 3d games than 2d games, so it's worth making sure 3d games can be done right.

8

u/manobataibuvodu Jun 20 '26

Isn't ECS architecture mostly a performance gain for the CPU? Or is it somehow good for GPU as well?

5

u/cornell_cubes Jun 20 '26

Potentially for the GPU in that the CPU has to deliver and update data for the GPU, but maybe not to a significant degree. In general 3d games just have a lot more data and complexity moving around. By definition, a dimension more. Very few 2d projects are bottlenecked by compute.

3

u/pcwalton Jun 20 '26

It can indirectly benefit the GPU by making it easy to architect the renderer around fine-grained change detection, which is the way to make a scalable renderer. Most of the big renderer scalability improvements have been of the form "do less by leveraging the ECS' change detection to skip doing work for entities that haven't changed since the last frame".

3

u/sadtaco- Jun 20 '26

3D games are typically vastly more complicated and CPU heavy.

  1. From a gameplay standpoint, path finding, ai, and so on now has to deal with vec3 instead of vec2 math and problem solving.

  2. From a render standpoint, you typically have vastly more draw calls, culling, and batching which consume a ton of CPU.

  3. Making these more efficient frees up time spent on the CPU so more time can be spent on graphics. 3D games are typically far more graphically intensive, so having 13ms to spend on GPU is almost twice as good as only having 7ms to spend on it if you can get your time spent on CPU to under 3.67ms. Time spent on CPU typically feels like such a big waste.

One of the few exceptions I can think of is Niota, but I'd guess Niota is also offloading most of its simulation to GPGPU.

2

u/GreenlessRGB Jun 20 '26

I am interested in using ECS mainly because I am planning on developing a real time strategy. ECS could help a lot when there are a 100 or so units all moving and making decision in parallel.

11

u/[deleted] Jun 19 '26

Why not? Preference of game genre?

12

u/GreenlessRGB Jun 19 '26

Reason is kinda shallow, but it's because I see improvements to 3D in every Bevy update, but improvements to 2D are quite rare.

I don't have any 3D artists friends, so I don't see myself ever developing a 3D game.

As such, every time I see improvements to 3D features in Bevy, I see it as a wasted time and effort that could have been put into something that could have benefited 2D game developers.

Yes, I know it's selfish and most won't agree with me.

Though, who knows, maybe I might learn 3D art myself one day and would use these features, but it's not my immediate concern.

Improvement to rendering and better use of GPU, though... If it also benefits rendering 2D art, then I am definitely happy about the changes. It's always good to have extra "hardware budget" to compensate in case I under-optimize the game somewhere.

9

u/pcwalton Jun 20 '26

Ultimately we want to more or less throw out the 2D renderer and use the 3D renderer for everything. Maintaining two code paths isn't great. When we do that, all the improvements to 3D will also apply to 2D. Of course, the tricky part is that we don't want to regress the game developer API--everything should continue to feel like a 2D renderer even if it's actually using the 3D renderer under the hood.

3

u/pyronide Jun 20 '26

Lol I thought that is what was happening from the start - considering that 2d lighting was a thing in bevy, I figured the 2d renderer was just a tuned orthographic projection inside the 3d pipeline...

3

u/sadtaco- Jun 20 '26

Would it be awful to just wrap the 3d functions in 2d functions?
Like some 2d functions like camera repeat a ton of what 3d fns do

8

u/pyronide Jun 20 '26

I'm curious... What 2d features would you like to see in bevy?

2

u/GreenlessRGB Jun 20 '26

Good question 😄

I have never done anything to do with 3D world in any of my jobs (only camera stream processing of 2D images and various embedded system software stuff), so I am not sure how to answer you.

I see that devs have already added tilemap chunks which is good. I remember at some point Bevy was rendering things even when they weren't visible on screen, but it's no longer the case now I think (something called "frustum culling" ?)

I guess I have 2 features in mind that I could use, but I don't know if these should be part of the engine itself or not :

- Automatic highlighting of 2D objects. In some games, I can hover my cursor over a character and it's contour becomes blue. Typical example is Fable The Lost Chapters, though we didn't select characters with a cursor and the game is 3D. But this feature could help in 2D games also.

- 2nd feature is difficult to explain and it should probably be a separate crate, but something like this : if we have an irregular 2D shape (like spilled ink), I would like to grab the shape at some point and to move it or spread it by that point. Imagine a spilled ink that vaguely reminds you of a dog. I would like to grab that shape by the "head" and stretch the "neck" to make a giraffe. Or be allowed to detach the "head".

2

u/Matzeall Jun 20 '26

Is there some connection between BSN and USD planned? I imagine it could make workflows between DCCs and bevy more seemless and I think when an engine builds natively around USD (like Houdini does) it will always be better than a convert step in an importer.

This is not a very informed opinion though. Not exactly sure if both even try to do the same thing.

1

u/ElfDecker Jun 21 '26

Do I understand correctly, that Bevy Scenes are more like Unity prefabs and Godot scenes (i.e. precomposed entities), and not like Unreal levels and Unity scenes (what is called maps by gamers)?

2

u/Koryaga Jun 21 '26

If I also understand correctly then yes, as far as I understand Godot's Scenes and it's .tscn format would be the closest comparison point, the biggest difference as far as I understand is ergonomics to easily define it without editor just in code, but as far as I understand you could do the same in godot, just you don't need to.

1

u/ElfDecker Jun 21 '26

They said, that they developed BSN for the editor, so in some future you also wouldn't need to write it by hand in Bevy

1

u/BerrDev Jun 23 '26

Awesome. Just checked the bevy blog last week for updates. Scenes look great