Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] User Interface #171

Open
vitvakatu opened this issue Jan 9, 2018 · 5 comments
Open

[Discussion] User Interface #171

vitvakatu opened this issue Jan 9, 2018 · 5 comments

Comments

@vitvakatu
Copy link
Member

Every game needs at least basic User Interface. For now, we only provide very basic text rendering, which is not enough.
Before starting any RFC about actual implementation, we need to gather some ideas:

  1. How many features our UI would have?
  2. Should we use existing library or implement our own solution?
  3. If yes, what library?
  4. Immediate or retained?
  5. How the user should describe the layout?

Please write down your ideas.

@alteous
Copy link
Member

alteous commented Jan 9, 2018

  1. This is probably not worth discussing since there are so many valid features/answers. It would be best to just implement what we need right now in our projects and expand as necessary.
  2. Not sure. conrod exists but I've heard few favourable opinions of it. There are other libraries we could wrap or re-export such as nuklear or imgui. I'd be interested in implementing our own as long as it doesn't consume a disproportionate amount of time to the rest of the crate.
  3. See (2).
  4. Not sure what you mean here. If talking about the implementation then whatever is easier. UI doesn't need to be high-performance.
  5. This could be a hot topic of debate. Game UIs are not usually complex so whatever is simple and easy to extract events/data from.

@alteous
Copy link
Member

alteous commented Jan 9, 2018

To expand on the above:

  1. I need buttons, labels, and image views at the moment. I'll also need to write some custom UI elements at some point (e.g. a health bar) so ideally we need a flexible solution.
  2. For now, I'm going to continue hacking my own UI in my game. Whether or not that's a good idea I will find out soon enough! We might be able to leverage immi for our layout. nuklear is also a viable option. three.js uses dat.gui for its examples which could serve as a starting point for our own solution.

@kvark
Copy link
Collaborator

kvark commented Jan 9, 2018

  1. Preferably, not many :) or otherwise we'd not be able to stay lean and simple
  2. I'd prefer using what's there on the market, to save us engineering resources and help the ecosystem.
  3. That I don't know. I will be against any C-bindings though, so that's a constraint (for inclusion in to Three-rs, but can be done outside of it for sure)
  4. Retained, as is everything else we do here
  5. Code first, with serde-deserializable structs coming next

@spacejack
Copy link

As a user I would prefer to see integration of an existing UI lib like imgui which seems designed for graphics/games. I see there are Rust bindings: https://github.com/Gekkio/imgui-rs

@vitvakatu
Copy link
Member Author

imgui is bad choice for in-game UI because it is ugly doesn't have styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants