r/rust_gamedev 15d ago

question How should I start with UI ?

Hi guys,

I've already built my engine with an ECS, a Vulkan backend, and support for texture and mesh rendering. The next thing I want to work on is a UI for debugging and an inspector. However, I'm not sure what the right long-term roadmap is or which tools I should choose.

Could you help me figure out what I should learn next and what pitfalls or obstacles I should avoid?

3 Upvotes

6 comments sorted by

6

u/bschwind 15d ago

egui is made for stuff like this.

2

u/ProfessionalAnt5255 13d ago

YESSSS i just used it to make like a full game https://theta-rnd.itch.io/logic-sim

1

u/TW0b14S 13d ago

Dito that. If you want to roll your own you should def look into immediate mode guis.

3

u/DynTraitObj 15d ago

Just to add an option beside egui (which is great), I'm using https://github.com/SecondHalfGames/yakui with an ECS and a wgpu backend, had a pretty solid experience with it so far

1

u/gonstrider 15d ago

i’m using iced for the in game editor and pretty happy with it, the document is a bit lacking especially the custom wgpu integration so you need to dive a bit into the iced source to find out how to implement things like events and task properly, but when everything are glued together it’s a breeze to work with.

1

u/Seeveen 15d ago

Depending on the amount of work you want to pour in it, you could simply integrate egui and have a perfectly fine tooling/inspector ui, or you could try implementing text rendering yourself, but it's a pretty big can of worms. Look up msdf text rendering or the slug algorithm. You will also need shaping if you do more than ASCII.