DexterZ Posted August 16, 2016 Share Posted August 16, 2016 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 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 16, 2016 Share Posted August 16, 2016 https://github.com/Ezelia/EZGUI Kyros2000GameDev 1 Quote Link to comment Share on other sites More sharing options...
DexterZ Posted August 17, 2016 Author Share Posted August 17, 2016 13 hours ago, ivan.popelyshev said: https://github.com/Ezelia/EZGUI Thank you for the fast reply ^ _ ^ Y But Sir, I'm not looking for canvas GUI library, I'm planning to roll my own, since other developers are creating or have their own GUI library for games, I believe it is OK to create one than using the DOM GUI. Thanks a bunch. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 17, 2016 Share Posted August 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
DexterZ Posted August 18, 2016 Author Share Posted August 18, 2016 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 Quote Link to comment Share on other sites More sharing options...
harrywatson Posted August 19, 2016 Share Posted August 19, 2016 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) Quote Link to comment Share on other sites More sharing options...
DexterZ Posted August 19, 2016 Author Share Posted August 19, 2016 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. harrywatson 1 Quote Link to comment Share on other sites More sharing options...
mattstyles Posted August 21, 2016 Share Posted August 21, 2016 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. BobF 1 Quote Link to comment Share on other sites More sharing options...
DexterZ Posted August 21, 2016 Author Share Posted August 21, 2016 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 Kyros2000GameDev 1 Quote Link to comment Share on other sites More sharing options...
DexterZ Posted August 21, 2016 Author Share Posted August 21, 2016 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 "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 harrywatson 1 Quote Link to comment Share on other sites More sharing options...
mattstyles Posted August 21, 2016 Share Posted August 21, 2016 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! Kyros2000GameDev 1 Quote Link to comment Share on other sites More sharing options...
DexterZ Posted August 21, 2016 Author Share Posted August 21, 2016 Thank you Sir, everything is noted ^ _ ^ y Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.