Page 1 of 1

Why using the build in UI system?

PostPosted: Fri Oct 28, 2016 1:05 pm
by Sandstedt
Is there a reson (performance or other) to use the build in UI system instead of native DOM versions with regular HTML, CSS? I see a lot of drawbacks using text inside a canvas, like accessibility, functions for copying text, writing text (autocorrect and similar features) (the spec. Not to speak about the ease to create advanced layouts and animation with CSS.

So, I would like some arguments why I should use the build in UI, or why I should avoid using the regular DOM :)

Re: Why using the build in UI system?

PostPosted: Fri Oct 28, 2016 3:57 pm
by Sandstedt
Answer from Rob Evans himself on Youtube: https://www.youtube.com/watch?v=c2YGsbgcaIU:

Depends if you intend to port to mobile devices or not. DOM overlay on top of GPU accelerated canvas layer is performance killer.

Re: Why using the build in UI system?

PostPosted: Sat Nov 05, 2016 8:04 am
by Riowind
Good find. For my game I just used the DOM calls and it worked fine for a "login"/scoreboard ui. I couldn't get the ui example to run and had a hard time figuring it out. Let me know if you find some more!

Re: Why using the build in UI system?

PostPosted: Sat Nov 05, 2016 10:54 pm
by Sandstedt
I think it's mostly for constant UI graphics during animations where there could be a problem. I haven't seen any prefermence drops when using a popup anyway. But will try a little bit more.

Re: Why using the build in UI system?

PostPosted: Tue Nov 08, 2016 12:42 pm
by Buts
I think if your game is not very interface reliant i.e just a popup or something, or if its really, really heavily interface based then use the DOM. in the first example it won't have much of an effect on performance, on the second you could use the engine to supplement an interface based game by passing data to it. Almost like a mini-game.

For anywhere in between I think the built in UI is pretty good. The built in UI is also best for parts that change often and in real-time like a health bar or something.

Re: Why using the build in UI system?

PostPosted: Mon Dec 05, 2016 8:22 am
by orbit
Sandstedt wrote:Is there a reson (performance or other) to use the build in UI system instead of native DOM versions with regular HTML, CSS? I see a lot of drawbacks using text inside a canvas, like accessibility, functions for copying text, writing text (autocorrect and similar features) (the spec. Not to speak about the ease to create advanced layouts and animation with CSS.
gold
So, I would like some arguments why I should use the build in UI, or why I should avoid using the regular DOM :)


I think the built in UI is pretty darn good.

Re: Why using the build in UI system?

PostPosted: Wed Dec 07, 2016 3:06 pm
by Sandstedt
orbit wrote:I think the built in UI is pretty darn good.


I guess that's subjective. Never worked with a canvas ui-builder before, so I'm just comparing to the HTML DOM and CSS, and then I'm missing like 98% of everything I want to do.