Live data from Hacker News

Show HN: kiUi – Lightweight auto-layout stylable UI toolkit

novembermonk.github.io

41–44 of 44 posts

Re: Show HN: kiUi – Lightweight auto-layout stylable UI toolkit

#41
post #27

Many game developers seem to build their own UI libraries from scratch. Wouldn't it make sense to use Chromium Embedded Framework[0] or Awesomium[1] instead? I haven't used them myself (yet), but writing a UI in HTML+CSS sounds a lot easier than learning a new API. [0] https://bitbucket.org/chromiumembedded/cef [1] http://www.awesomium.com

You are somewhat right in that HTML and CSS heavily inspired what kiUi became. But there are two major concerns that are not adressed by your solution : - Embedding a whole browser in your app just to display a few widgets is not my definition of "lightweight" - Often coding UI in native code (C++) makes a lot more sense, integrate with exiting code in a much cleaner way Game developpers would much less tend to build…

I agree, embedding a browser doesn't seem lightweight at all. What it does give, however, is a common and comprehensive framework for laying out and styling your UI elements. Every web developer can now be a game UI designer.

Some of the benefits I see with HTML+CSS(+JS) based UI:

  * Comprehensive feature set
  * Easy prototyping
  * Easy modding
  * No recompilation required
  * Web full of documentation & examples
  * Common skill for developers/designers
The main disadvantage is probably the performance hit of having a full-blown browser engine in your game, but it seems to work OK for AAA games. I believe Anno 2070 uses Awesomium for some of its content: http://www.posidyn.com/games/anno2070/anno2070-09.jpg

Re: Show HN: kiUi – Lightweight auto-layout stylable UI toolkit

#42
post #35

Earlier quoted context omitted.

Thank you. As to the draw calls, NanoVG draws everything directly each frame so this is constant whether or not you are updating. As to the overhead, not too long ago everything was updated each frame regardless of whether it was modified or not, and performance was fine. Worse than it is now, but okay. So I guess it could handle it. But then again, that's only the default renderer. You can always roll your own and p…

Gotcha. I ask because, on my machine, kiUi takes 8-9ms every frame regardless of what I'm doing (e.g., typing, dragging windows, resizing things). If I'm trying to maintain 60 FPS with Emscripten, 8-9ms is a significant portion of my 16.7ms frame budget. By comparison, a basic Emscripten libRocket demo takes 6-8ms (mostly due to Freetype rendering and its layout system, see http://forums.librocket.com/viewtopic.php?f…

statico: you can load a different TTF with ImGui, it doesn't have to be monospaced and they can be smooth. The perf differences are due to designing the library with performances as a major pillar, lots of things are optimised. A visual redesign is planned but it'll take a bit of time to get it done to keep the perf up.

Re: Show HN: kiUi – Lightweight auto-layout stylable UI toolkit

#43
post #42
post #35

Earlier quoted context omitted.

Gotcha. I ask because, on my machine, kiUi takes 8-9ms every frame regardless of what I'm doing (e.g., typing, dragging windows, resizing things). If I'm trying to maintain 60 FPS with Emscripten, 8-9ms is a significant portion of my 16.7ms frame budget. By comparison, a basic Emscripten libRocket demo takes 6-8ms (mostly due to Freetype rendering and its layout system, see http://forums.librocket.com/viewtopic.php?f…

statico: you can load a different TTF with ImGui, it doesn't have to be monospaced and they can be smooth. The perf differences are due to designing the library with performances as a major pillar, lots of things are optimised. A visual redesign is planned but it'll take a bit of time to get it done to keep the perf up.

That's great information. Thanks!

Re: Show HN: kiUi – Lightweight auto-layout stylable UI toolkit

#44
post #29
post #27

Many game developers seem to build their own UI libraries from scratch. Wouldn't it make sense to use Chromium Embedded Framework[0] or Awesomium[1] instead? I haven't used them myself (yet), but writing a UI in HTML+CSS sounds a lot easier than learning a new API. [0] https://bitbucket.org/chromiumembedded/cef [1] http://www.awesomium.com

AAA studios use Flash. http://gameware.autodesk.com/scaleform

Or HTML. http://coherent-labs.com/
Post reply on HN