Jump to content

Canvas GUI inquiry


DexterZ
 Share

Recommended Posts

Hello all!

I'm new here, if may I inquiry does it make sense to create a full blown Canvas base GUI, I saw some answer to this kind on inquiry on Stack overflow but from the Game developers side is worth it ? including buttons, scroll bars,page tab something like that, to simplified Game menu and for Game GUI general purposes.

Thanks in advanced for some reply ^ _ ^ y

Link to comment
Share on other sites

If you have some new architectural ideas that will make your library differ from others - then go for it. Just don't make it from scratch, use PIXI renderer or something like that. If you write it on plain canvas, there is no way you'll be able to port it to webgl/opengl and go native later.

Also, look at how other GUI libraries work.

Link to comment
Share on other sites

13 hours ago, ivan.popelyshev said:

If you have some new architectural ideas that will make your library differ from others - then go for it. Just don't make it from scratch, use PIXI renderer or something like that. If you write it on plain canvas, there is no way you'll be able to port it to webgl/opengl and go native later.

Also, look at how other GUI libraries work.

Hey man!

Thanks again! I have already created a couple GUI elements, I don't intended to convert GUI to WebGL, my intention for the GUI objecst is to sit on top of Webgl, my rendering order will be the following :

5. draw Pointer ( mouse, etc.. )
4.    draw GUI
3.         draw Screen
2.            draw TileMap
1.               draw WebGL
 

Here are some of my early GUI elements button,scrollbars,forms, etc...

 

thanks for pointing me out to other rendering libraries, but I planning to create my own development kit which includes my own implementation of rendering pipelines ^ _^ y


https://dexterzgdk.blogspot.com/2016/08/z-gdk-architecture.html
 

Link to comment
Share on other sites

4 hours ago, harrywatson said:

Great idea !  Lot's of time involved. You probably won't be paid for it.

Don't let me squash your dreams!

(annoying smiley here)

No real coder is sitting there saying, “I’m going to make a bunch of money,” or, “I’m going to sell a hundred thousand copies.” Because that kind of thought gives you no guidance about the problems.   :P

Link to comment
Share on other sites

So you're creating a quick GUI to go above a canvas layer inside another canvas layer? Why not just use the DOM and all of the many advantages of doing so for creating a UI?

Just seems like a really odd place to go to to solve the problem.

As Ivan pointed out, if you wanted it expand to GL (although most DOM transitions can be, and are, GPU accelerated, and in many cases they don't rely on JS to control their animations either) or you wanted it integrated right into your main rendering layer for some reason then it makes sense, but I'm not sure what advantages using a canvas GUI over a DOM one gives you here and there are certainly many disadvantages of this approach.

Link to comment
Share on other sites

3 hours ago, mattstyles said:

So you're creating a quick GUI to go above a canvas layer inside another canvas layer? Why not just use the DOM and all of the many advantages of doing so for creating a UI?

Hello Matt ^ _ ^y DOM GUI for games is too slow IMO and most of DOM GUI cannot be replace with custom image. as for my future goal on my Canvas Content 2D based GUI, whenever WebGL is selected,  Gui drawing will render on Billboards ( A quad that always face the camera in 3D world but the position is always relative to screen ) I've done this before using  XNA, but that was a long time ago  : - D

Link to comment
Share on other sites

On 19/08/2016 at 11:30 AM, harrywatson said:

 

Thanks you Sir for the like  : - D

I forget to mentioned that I quoted Bill Gates for that :P

"No real coder is sitting there saying, “I’m going to make a bunch of money,” or, “I’m going to sell a hundred thousand copies.” Because that kind of thought gives you no guidance about the problems." -- Bill Gates 

 

Link to comment
Share on other sites

There are lots of cases where DOM will be faster than canvas manipulations, particularly regarding transitions. DOM also has images so anything you can do in the canvas can be done in DOM, but sometimes it just feels more natural to write heavily animated sections using the usual stuff you write your canvas stuff with so that makes sense.

Just on a side note, I almost always find that a custom UI in canvas feels clunky and awkward compared to things like native scrolling and layout refresh in a DOM-based approach, hopefully yours will feel smooth and wonderful! All the best with it, good luck!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...