Skip to content

ScreenElement vs HTML UI #1788

Answered by kamranayub
muirch asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Muirch, thanks for asking! I don't think we have any performance benchmarks and I am not sure if that will be helpful--HTML will always be "faster" than rendering on Canvas because HTML is separate. By using HTML, you offload all of that to the browser and it shouldn't affect your game as much as implementing Canvas-based UI. For all of our games that require more than a simple UI, we tend to go with HTML. For some pieces of UI like icons, progress bars, or sprite-based UI, we use Screen Elements.

There is also the question of how much work it will be. To build your own Canvas UI library of elements will be quite a bit of work. Handling events, rendering text, grids, etc. all of that w…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by muirch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants