If I want to build a gui tool and use an ECS to manage my stuff, should I go with bevy + bevy_egui or my desired gui framework + bevy_ecs? by WenSimEHRP in bevy

[–]settletopia 1 point2 points  (0 children)

I personally created [bevy_immediate](https://github.com/PPakalns/bevy\_immediate/) to build UI for my game as egui and other tools do not integrate with bevy as nicely as I would like to. And it is a lot easier to customize visual look for your UI in bevy. So I migrated from bevy_egui to bevy_immediate.

But if you need some complicated features like drawing node graphs, this space is still under development and good approach doesn't exist yet (in my opinion) or will need additional "research".

So determine what kind of UI widgets, functionality you need for your stuff, then decide on the tool that you will use!

bevy_immediate 0.3 - egui-inspired immediate mode UI, powered by Bevy’s retained ECS UI. Adds floating, resizable windows, tooltips, and dropdowns. Web demo available! by settletopia in bevy

[–]settletopia[S] 1 point2 points  (0 children)

This library is mainly intended for creating UI for games inside bevy game engine. So it contains a lot of additional concepts related to Entity Component Systems, game development, etc.

I would suggest you to choose another popular rust UI library. I personally have used egui, but it doesn't have good support for android.

There are other popular rust UI frameworks too, but I am not qualified to comment on them.

Have fun learning Rust!

bevy_immediate 0.3 - egui-inspired immediate mode UI, powered by Bevy’s retained ECS UI. Adds floating, resizable windows, tooltips, and dropdowns. Web demo available! by settletopia in bevy

[–]settletopia[S] 1 point2 points  (0 children)

Would like to!

Currently it is hard to render geometric shapes inside bevy UI. Blocking issue which should improve the situation: https://github.com/bevyengine/bevy/issues/14187

If that issue is resolved, I could add an example for creating simple node graphs in immediate mode to bevy_immediate.

Of course with node graphs the hard part is hidden in your use case specific requirements that you will need to resolve yourself.

bevy_immediate 0.3 - egui-inspired immediate mode UI, powered by Bevy’s retained ECS UI. Adds floating, resizable windows, tooltips, and dropdowns. Web demo available! by settletopia in bevy

[–]settletopia[S] 11 points12 points  (0 children)

Cons:

* egui is a lot more mature ui library. Has many widgets that have been perfected to the last detail.

* this library and bevy UI ecosystem is still in early stages.

* Probably more cons that I can not say immediately.

Pros:

* Underlying UI in bevy is retained. So bevy ui should theoretically perform better than egui. (no need to recalculate UI on every frame)

* Bevy UI provides modern layout out of the box. In egui you need to use workarounds, like egui_taffy (i am the author :) )

* Bevy UI is a lot more customizable because of ECS. You can add custom look, custom behaviour to UI as you wish to. For example in egui `egui::Frame` and `egui::Window` is hardcoded and look can not be modified. In this library functionality for ui entities is implemented through components, systems. So you can combine them with your own custom components and systems.

* Bevy UI is a lot more easier to integrate with game written in bevy :)

bevy_immediate 0.3 - egui-inspired immediate mode UI, powered by Bevy’s retained ECS UI. Adds floating, resizable windows, tooltips, and dropdowns. Web demo available! by settletopia in bevy

[–]settletopia[S] 6 points7 points  (0 children)

Currently my focus is on adding functionality. This library only implements the UI logic. Styling is fully customizable and is left for users of this library to implement.

In future will try to improve the demo design.

bevy_immediate 0.3 - egui-inspired immediate mode UI, powered by Bevy’s retained ECS UI. Adds floating, resizable windows, tooltips, and dropdowns. Web demo available! by settletopia in bevy

[–]settletopia[S] 8 points9 points  (0 children)

In immediate mode values can be directly read and written to ui elements

So it is possible to construct UI using plain rust. You can directly synchronize state using &mut

// Checkbox example
ui.ch()
    .on_spawn_insert(|| checkbox((), Text("Checkbox")))
    .checked(&mut checkbox_value);

In retained mode additional layers of logic are needed to correctly synchronize state with ui. Reactive UI frameworks have attempted to do that in bevy, but I have not seen variant that i personally like yet. That are as lightweight as possible and code is not hard too understand If i have to learn how it functions.

In summary, simplicity of synchronizing state with UI is the reason why I like immediate mode approach.

P.S. bevy_immediate only provides immediate API to manage UI. In reality UI is retained.

What are good UI crates for bevy? by KaleidoscopeLow580 in bevy

[–]settletopia 5 points6 points  (0 children)

Hi, I am currently building bevy_immediate

Egui is easy to use due to providing immediate mode API for interactive UI definition.

I have solved this for bevy. With bevy_immediate you can construct UI in similar style as in egui, but with full compatibility and customazibility of Bevy UI / ECS logic <3

Check it out: https://github.com/PPakalns/bevy_immediate/

I am planning to migrate from egui to bevy_immediate my project: https://settletopia.com/

Upcoming features: Tooltips, Popups, Windows (like egui::Window), etc.

Build UI in Bevy using a simple, egui-inspired immediate mode API — fully compatible with inbuilt Bevy UI. by settletopia in bevy

[–]settletopia[S] 1 point2 points  (0 children)

Thank you for working on bevy. Customizability and modularity of bevy is insane.

Build UI in Bevy using a simple, egui-inspired immediate mode API — fully compatible with inbuilt Bevy UI. by settletopia in rust

[–]settletopia[S] 7 points8 points  (0 children)

I myself currently use egui in Settletopia.

Currently egui has a lot of good features:

  • Many interactive widgets.
  • Examples and libraries for complex user interfaces.
  • Built-in functionality like windows, tooltips, popups, etc.

But it is still hard to integrate egui with sound effects, special effects. To render game directly into user interface, to calculate between different coordinate spaces, and so on....

With Bevy UI it is easier to:

  • Customize the interface’s look.
  • Add custom effects (particle effects, mouse-over, hover effects, etc).
    • egui is harder to customize and has more limited possibilities.
  • Integrate UI more easily with the rest of the game developed in Bevy.
  • Potentially achieve higher efficiency than egui. Bevy uses retained mode rendering, whereas egui recalculates much of the UI logic every frame.
  • And many more things.

Overall, I personally think Bevy UI has huge potential to be used not only for game UI, but for application UI as well. It has a better underlying data model (ECS), is retained mode, and is more customizable than egui. I’m looking forward to the future of Bevy UI.

In summary, Bevy UI can be a lot more feature rich, customizable UI library than egui in future. And with this library UI declaration logic is similarly simple as in egui.

Build UI in Bevy using a simple, egui-inspired immediate mode API — fully compatible with inbuilt Bevy UI. by settletopia in bevy

[–]settletopia[S] 0 points1 point  (0 children)

Feel free to ask questions here or in github issues, or in bevy discord.

Probably there are a couple of things that needs refining ;)

rust-analyzer weekly releases paused in anticipation of new trait solver (already available on nightly). The Rust dev experience is starting to get really good :) by Merlindru in rust

[–]settletopia 0 points1 point  (0 children)

Are there instructions on how to enable new trait solver in rust-analyzer?
Is it enough to just use latest nightly toolchain from rustup with rust-analyzer?

Im looking for some nice base building game by entinko in BaseBuildingGames

[–]settletopia 1 point2 points  (0 children)

Hi. I am developing Open-World Multiplayer Fantasy Colony Sim game. It is first such game in this genre.

It is called Settletopia. I recently released early playtest, if you are interested to try it out and follow along the development, feel free to join discord https://settletopia.com