New Bevy UI/Scenes Proposal

Ғылым және технология

Thread: github.com/bevyengine/bevy/di...
Discord Invite: / discord
Patreon: / logicprojects
Chapters:
0:00 Intro
0:58 Prior Art
2:28 Design goals
3:58 Prototype
6:11 Outro

Пікірлер: 61

  • @indierusty
    @indierusty10 ай бұрын

    ECS is already a core design to Bevy UI. I hope it will be atleast good as Godot's UI - best in class in my experience.

  • @borisboutillier7956
    @borisboutillier795610 ай бұрын

    I think that the most important fact here is that Cart is now fully working on the UI/Scene in Bevy, and this means that this part of the project will move forward. On top of that the community and expertise, prior work is big enough that this reach a good architecture/concept quicker than for other part ( think scheduling). And even if does not, we know Bevy is happy to overhaul things along the way. So as you say, I expect first prototypes of this project in 2024 (perhaps not 'early' 2024), and then several years of improvements, but the ball is rolling now on UI/Editor !

  • @Nkokoro
    @Nkokoro10 ай бұрын

    I've used HTML/XML syntax my whole life, but I have to admit that the proposed BSN syntax looks really good. Looks really promising, and a step up from existing libraries for Bevy, if they can execute their vision fully !

  • @zactron1997
    @zactron199710 ай бұрын

    I definitely think it's important to look at prior success stories for Rust UI frameworks. I think a good example would be Leptos, which seems to have all the same functionality goals that Cart outlined. The key difference is using Bevy's System architecture instead of Leptos' signals. Ideally, I would like a Bevy UI to be Leptos tbh.

  • @logicprojects

    @logicprojects

    10 ай бұрын

    I haven't heard of that before, I'll check it out. I wonder if someone has already tried tying their design into bevy

  • @zactron1997

    @zactron1997

    10 ай бұрын

    @@logicprojects Leptos is really interesting and definitely look into it. I'm working on some minor issues on Bevy as my first big contributions to an open source project (biggest PR so far is only +1,000 / -2,000) I want to try and prototype actually using Leptos itself with Bevy, since it supports a custom rendering engine beyond just HTML with its view! macro (which is very similar to rsx!)

  • @user-fe1ke6qe7f
    @user-fe1ke6qe7f10 ай бұрын

    this ui is what i want, good for coder from react, I think this is good start for bevy ui.

  • @morgomi
    @morgomi10 ай бұрын

    I'm just an appreciator of all the interesting work in this community. Hope one day I can make some contributions too.

  • @warkah7557
    @warkah755710 ай бұрын

    Hoping to see more Bevy development update posts. I think it's what most of us that are interested in Bevy are looking for anyways right now, rather than actual Bevy game development.

  • @logicprojects

    @logicprojects

    10 ай бұрын

    Yeah, it's harder to make videos like this though. I might experiment with more like this showing off the new asset system if people like the style

  • @Galakyllz
    @Galakyllz10 ай бұрын

    I really like this idea. I've been using this style for interface construction for HTML for a while and have grown to love it.

  • @shrin210

    @shrin210

    10 ай бұрын

    How are you using this style instead of HTML , what libraries?

  • @Galakyllz

    @Galakyllz

    10 ай бұрын

    @@shrin210 I've been using tide along with tide-jsx for this type of component-based style. And yes, this is rendering to HTML.

  • @Perspectologist
    @Perspectologist10 ай бұрын

    This is very interesting. I’m following your recent game tutorial, but on a bigger picture level I am also looking at implementing desktop apps in Rust. I’ve been playing with Dioxus for a UI and it seems to work well. It would be interesting to consider a Bevy based application UI. My concerns would be excessive frame redraws and accessibility support (screen readers, etc…). I am also very interested in a future Bevy editor. The Unity Editor made it very easy to get started.

  • @logicprojects

    @logicprojects

    10 ай бұрын

    I know accessibility will be a big priority, the team seems to always want to improve on that. Desktop apps with Bevy seem to be a growing area of interest but it's unclear how the future will look

  • @SEOTADEO
    @SEOTADEO10 ай бұрын

    Yeah, currently developing a game almost entirely in Bevy UI and to say the least... It sucks. Very excited about the new proposal :)

  • @indierusty
    @indierusty10 ай бұрын

    I'm very excited for Bevy Editor. I hope it is Simple and Powerful and Lightweight like Godot is. Is it achievable? My guess is yes!

  • @logicprojects

    @logicprojects

    10 ай бұрын

    Seems to be the goal and so far they haven't let us down

  • @IcyTorment
    @IcyTorment5 ай бұрын

    One objection I have the bsn! macro is that it looks like declarative code (e.g., maybe functional code that would be returning scene info), but it's actually imperative code that's modifying things in the background. That feels very unrustlike. I've also had nothing but negative experiences with embedding one language into another. That tends to lead to abominations like PHP.

  • @jaysistar2711
    @jaysistar27116 ай бұрын

    I'm hoping to play with bsn soon. An ergonomic was of representing changes over time in both UI and 3D scene component values will be very valuable.

  • @gitstautusgitstutasgitstatus
    @gitstautusgitstutasgitstatus10 ай бұрын

    Hey that looks pretty nice

  • @natew4724
    @natew472410 ай бұрын

    I think UI should use pure ECS. You could add a system to UI components to run every tick, but instead we prefer using reactive design. Reactive design should be supported in underlying ECS- similar to schedules. Reactive design might mean custom implementation of widget updates. - Define "update" or "redraw". Is this always required on every resize event? Do we need to redraw if same pixels, but different location on screen? - In a VList, we should not need to redraw every item if we append a new item. How can VList make this optimization? - If a VList is inside a ScrollContainer, we should skip drawing list items out of bounds. This is complicated when items have different sizes though. #[derive(Component)] struct VList; impl Widget for VList { fn update(&self) { // called when resized? called when parent resizes? where is the rendering actually happening? // this is where I'd imagine is the implementation of VList, which decides the new position of each element. } }

  • @logicprojects

    @logicprojects

    10 ай бұрын

    Interesting, I think bevy has some support for what you are describing with run conditions

  • @tsalVlog
    @tsalVlog10 ай бұрын

    As a Swift developer who has recently been using SwiftUI, and a long-time Compose developer in Kotlin-land.. I really like this. It leans a bit closer to SwiftUI, and I'd like to see it go a little further and handle UI states specially (still Components, but specialized for UI when coerced).

  • @logicprojects

    @logicprojects

    10 ай бұрын

    I think Cart is thinking about something like that. He mentioned a few times that he was avoiding calling things components in his prototype so there might be a new concept soon

  • @gljames24
    @gljames249 ай бұрын

    I'm curious if Bevy could take advantage of the libraries written for Iced's UI elements.

  • @goshawk_fly
    @goshawk_fly8 ай бұрын

    Start video from the demonstration of the result of using plugings.

  • @tomaspecl1082
    @tomaspecl108210 ай бұрын

    So far I have been using bevy_egui in my project. It is quite simple to do stuff. But I do not use the UI much, just for basic stuff, like a spawn button and a text input field. When I used the default bevy UI, it was quite wordy. Too much code even for simple stuff. This change looks nice. But I can not really compare it with any other option than egui as I did not use anything else yet as having nice UI has not been my goal yet. But using this for spawning entities with components and children hiearchy based on composeble templates is something that I could use.

  • @indierusty
    @indierusty10 ай бұрын

    Svelte, Godot and Flutter has best UI system in my perspective.

  • @jeffg4686
    @jeffg468610 ай бұрын

    Does Bevy have the ability for us to add our own screenspace shaders (post) ?

  • @logicprojects

    @logicprojects

    10 ай бұрын

    Yes. I think there's an post processing example on the github

  • @jeffg4686

    @jeffg4686

    10 ай бұрын

    @@logicprojects - thanks, yeah, I noticed later on. Back in 2022. Bevy is coming together very nicely. Already a ton of functionality in there.

  • @liamhamilton2719
    @liamhamilton271910 ай бұрын

    Is it worth waiting for this new UI system to be implemented, or should I start using the existing UI?

  • @logicprojects

    @logicprojects

    10 ай бұрын

    Always start with the existing tools, maybe not bevy internal ui but the others that Cart listed seem like good places to experiment. This might not be ready for 6 months and there's no point in waiting on something that is still just a proposal

  • @liamhamilton2719

    @liamhamilton2719

    10 ай бұрын

    @@logicprojects In your opinon, which current UI option seems closest to the proposed Bevy UI? I dont have lots of spare time so i'd like to learn something that will be most relevant to these proposed changes.

  • @tadeohepperle7514

    @tadeohepperle7514

    10 ай бұрын

    @@liamhamilton2719 Probably KayakUI.

  • @logicprojects

    @logicprojects

    10 ай бұрын

    kayak is most similar but I don't think it will be updated to 0.11 soon. Currently I'd stay away from UI in bevy and focus on learning the other parts of the engine if you don't have much time. Things are still in early draft phases

  • @tadeohepperle7514

    @tadeohepperle7514

    10 ай бұрын

    @@logicprojects That is solid advice!

  • @fnizzelwhoop
    @fnizzelwhoop10 ай бұрын

    "The cool thing about proc macros in Rust is that they often work well with the Rust Analyzer out-of-the-box, so all of your Rust plugins should easily pick it up and create a seamless developer experience.". 😂

  • @AshtonSnapp
    @AshtonSnapp10 ай бұрын

    b e v u i

  • @goshawk_fly
    @goshawk_fly8 ай бұрын

    It's better to show place of these lines of code in an entire project. I'am begginer, I cannot understand where I can put them.

  • @mrmaniac9905
    @mrmaniac990510 ай бұрын

    It's a no from on the rsx! format. Non-technical users should be able to edit custom html like files. There should a separate dedicated parser outside of rust.

  • @logicprojects

    @logicprojects

    10 ай бұрын

    That seems to be a goal for the bsn file format, both human editable and easy to support from other tools and the editor. The macro in code is just a bonus I believe (but maybe the core development should focus on the file format, not the macro support)

  • @mrmaniac9905

    @mrmaniac9905

    10 ай бұрын

    Who in their right mind would want to have to recompile an entire rust project to update the background color of their view??? It's a silly gimmick in my opinion. Now if they were to transfer this RSX format to it's own dedicated parseable file outside of rust, my interest is peaked.

  • @mrmaniac9905

    @mrmaniac9905

    10 ай бұрын

    ​@@logicprojects If that is the case, I'm all for it. For this to actually take off, I think it would be advantageous to focus on the external bsn file format it's self, making rust macro support secondary. I've been playing around with the concept of a JSX file format for my own virtual operating system (with lua instead of javascript) for a while now. The best thing these developers can do it externalize the BSN files allowing for hot reloading among other things. I'm all for this now, seems like a wonderful idea. Perhaps they may want to take it a step further however and use a scripting language in place of rust. It may be a bit to heavy for normal user's to have to understand the borrow checker just to make simple user interfaces. Then again, I'm not sure if this project is targeted at "normal users" (web developers 🤮). I do think it'd be worth discussing a secondary abstraction layer though, perhaps something like I've been working on. Treesitter + lua + antlr can do wonders.

  • @logicprojects

    @logicprojects

    10 ай бұрын

    I don't think they want to go all the way to a scripting language for this. I did see support for hot reloading in the proposal though so I think that's in the plan and with embedded assets it's possible to ship the final project without needing to send the raw file or interact with a file system at all. The macro support is nice though if they are aiming for this to support scenes beyond ui (for example spawning a prefab entity) but we'll have to wait and see how it all shapes up.

  • @mrmaniac9905

    @mrmaniac9905

    10 ай бұрын

    @@logicprojects I agree, I think a scripting language would be a bit overkill and could be considered feature bloat. I like this project, seems like it has a lot of potential.

  • @natew4724
    @natew472410 ай бұрын

    7:27 *patrons

  • @logicprojects

    @logicprojects

    10 ай бұрын

    Words are hard :/

  • @johanngambolputty5351
    @johanngambolputty535110 ай бұрын

    I hate UI so much... I just want something simple like egui, I want to place some standard components down (labels, buttons, sliders, ...) and maybe get mouse events on colliders or just screen regions.

  • @CodyNeiman

    @CodyNeiman

    10 ай бұрын

    Yeah, I've been very satisfied with egui and left flutter for it. So I'm not super sold on the rsx stuff

  • @tadeohepperle7514

    @tadeohepperle7514

    10 ай бұрын

    Everyone hates UI, but everyone needs it. That is why we need something that is quick to change/easy to write and allows all the customization and styling. It should be as little friction as possible.

  • @craftminerCZ
    @craftminerCZ8 ай бұрын

    I'm actually rather surprised at how really very unworkable the included UI system is. Supports only very basic layouts, very basic interactions, and requires a metric f-ton of error-prone boilerplate. On top of that there's no real guides on how to make a game UI in bevy, only a few examples on the GitHub and a lot of developer tool level UI guides. A lot of the time I think you're just better off using clickable sprites with tags and your own logic, at least that makes them conform to the scaling mode of the game itself and respects the camera settings. I'm really happy that some work is being done on this, because developing anything in Bevy right now is just a nightmare. Too bad we're not gonna see any results for a year, but at least it's being worked on.

  • @sirhc8927

    @sirhc8927

    Ай бұрын

    Not to mention the UI is fixed to the camera. Forget naming UI that follows the player character in a local coop.

  • @purplevincent4454
    @purplevincent445410 ай бұрын

    so i just recently got into rust and bevy, and i wonder. why do people want an editor? i actually prefer the code-only and modular style of bevy, so ... honestly going to an editor-heavy style such as unity or godot will be a downgrade.

  • @logicprojects

    @logicprojects

    10 ай бұрын

    I also feel the same way and I think bevy will always support code only approaches. Most people expect an editor from modern game engines though and it will be nice for laying out complex scenes. I'm hoping it ends up being a glorified bsn creator and most of the work is still in code just loading the bsn files

  • @VergilxUA

    @VergilxUA

    10 ай бұрын

    Because a lot of people working on a game in a team aren't programmers. You shouldn't need to find & adjust respective code to tweak or adjust something. Its just less time consuming overall and more practical.

  • @RSchenal
    @RSchenal10 ай бұрын

    As a former React developer, I both hate and love this!

  • @logicprojects

    @logicprojects

    10 ай бұрын

    Yeah I've heard some people hate having Bevy looking more like their day jobs

  • @ditchdigger106
    @ditchdigger10610 ай бұрын

    Forcing recompilation to tweak a widget sounds like it could be burdensome. Forcing recompilation to tweak the origin transform of an object is an absolute non-starter. We're missing a layer of separation.

  • @logicprojects

    @logicprojects

    10 ай бұрын

    Yeah that's what I think the goal of the scene format is. Get everything into a text file that will work with hot reloading

Келесі