Why using the build in UI system?

Post your help queries and engine programming questions here

Why using the build in UI system?

Postby Sandstedt » Fri Oct 28, 2016 1:05 pm

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 :)
User avatar
Sandstedt
 
Posts: 15
Joined: Fri Oct 21, 2016 4:17 pm

Re: Why using the build in UI system?

Postby Sandstedt » Fri Oct 28, 2016 3:57 pm

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.
User avatar
Sandstedt
 
Posts: 15
Joined: Fri Oct 21, 2016 4:17 pm

Re: Why using the build in UI system?

Postby Riowind » Sat Nov 05, 2016 8:04 am

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!
Riowind
 
Posts: 8
Joined: Thu Oct 29, 2015 7:55 pm

Re: Why using the build in UI system?

Postby Sandstedt » Sat Nov 05, 2016 10:54 pm

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.
User avatar
Sandstedt
 
Posts: 15
Joined: Fri Oct 21, 2016 4:17 pm

Re: Why using the build in UI system?

Postby Buts » Tue Nov 08, 2016 12:42 pm

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.
Buts
 
Posts: 3
Joined: Sat Oct 29, 2016 4:59 pm

Re: Why using the build in UI system?

Postby orbit » Mon Dec 05, 2016 8:22 am

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.
Last edited by orbit on Tue Aug 22, 2017 3:04 pm, edited 1 time in total.
orbit
 
Posts: 1
Joined: Sat Dec 03, 2016 9:46 am

Re: Why using the build in UI system?

Postby Sandstedt » Wed Dec 07, 2016 3:06 pm

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.
User avatar
Sandstedt
 
Posts: 15
Joined: Fri Oct 21, 2016 4:17 pm


Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron