Game Engine Forum - Grit Open Source Streaming Game Engine
Site Header
It is currently Fri May 24, 2013 12:17 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: Limitations of current GUI system
PostPosted: Mon Jun 11, 2012 4:44 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 420
Here is my list of problems with the current GUI system (hud), please post more if you have more.

1) Still using ogre materials -- should be able to set colour, alpha, texture (maybe with alpha), and uvs easily
2) no rotation of subpanels
3) no clipping of subpanels within frame
4) panels should have borders as standard (without having to implement it) OR lua extensions to hud system should be as easy to use as built-in hud elements
5) shadow text should be standard OR lua argument as above
6) should be able to subpanels according to an alpha mask, rather than just a simple rectangle.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Mon Jun 18, 2012 1:47 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 348
I have noticed the Rockstar Social club overlay pop ups for max payne 3 achievements, steam overlay popups, things like that, they use something I am guessing is CSS into the game or something... either way, they are amazing looking gui elements, and worth a look too. The html/css stuff is probably the best bet for borders etc too.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Wed Jun 20, 2012 11:54 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 348
http://librocket.com

Features:
http://librocket.com/wiki/frontend/features

Python? Well, "Plugin" - I wonder if someone has made a lua wrapper which is modifiable to our needs, or better yet if it is not too difficult to tailor our own to your specific lua setup?

At any rate, some people discussing lua, there is more with "librocket lua", no quotes, in google:

http://forums.librocket.com/viewtopic.php?f=2&t=874

MIT compliant, I think, didn't read the license if there are different licenses with MIT, but it's labeled as MIT and posted:

http://librocket.com/wiki/license

Looks Awesome. Html/Css is freedom in design?

Here are some videos I am finding as I research/type this, not found in their news feed onsite:

Classic PC interface I guess, looks heavy in use of decoration:


Net bubble type:


Images worth note, type libRocket to google images, sort to large, for many, many very interesting gui's with this html/css approach. I'm not sure if these are literally ME3 shots, or if they are libRocket, I just saw the text "mass effect 3 type interface" in a google image search for libRocket in quotes:

Image

Image

Easy to get lost in the bubble type here, but the rest is nice:
Image

Here we have 6 issues listed with the gui, if you take a look at libRocket and it is easy enough to integrate and usable enough for our projects, can you find 6 or more things wrong with libRocket?

I liked this one, I saw more, but this one seems to be seeking stability and has what seems like an emergent user base with the forum having a good sum of threads and members.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Wed Jun 20, 2012 9:59 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 420
Got any evidence that they use html/css? That would be a lot of work and I don't see any point.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Wed Jun 20, 2012 10:00 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 420
Some notes on the new design:

all elements have:
position, size
rotation (about center?)

1) panel
border (RGBA, width)
background (RGBA, texture, texcoords)
stencil (alpha reject texture, perhaps just use texture alpha == 0)
always uses stencil to clip children, default stencil is rectangle

2) text
font
size
shadow
per letter colour (top, bottom)

3) clicks, callbacks to whoever registered them
default for text is do nothing
default for panel is look for a child panel (obey stencil?)

4) custom lua gui elements
use to make buttons, lists, checkboxes, etc
register with std api, appear like any other element to user
implemented in terms of panels, text, etc


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Wed Jun 20, 2012 10:13 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 2:13 pm
Posts: 293
Location: Spain
I think this is not related at all, if we wanted to have '3D' menus and so on, using meshes and so on, that is totally unrelated, just our normal meshes with materials properties for when mouse is hovering or click, all coded using lua?

_________________
oh yeahh


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Thu Jun 21, 2012 1:39 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 420
I wasn't talking about a 3d gui system, that would require a completely different design. Not sure if it would use the same material system because there may be differences in lighting etc.

The way I see it, a 2d gui system only needs colour and texture and should be completely unlit. So it's just a case of adding clipping, rotating, stencils, improving the interface, supporting mouse input, etc.

I don't want to use an existing gui library because

1) implementing sh*t is fun
2) debatable whether it would really do what we want (might have to hack it anyway)
3) might do more than we want, therefore be hard to use
4) want simple uncomplicated hud elements that are very easy to customise, not windows etc


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Mon Jun 25, 2012 5:09 am 
Offline
Newbie
User avatar

Joined: Mon Feb 20, 2012 9:31 am
Posts: 12
well, there is a few things which needed for the GUI, as I see it:
1) mouse support -- clicks, changeable pointer style
2) easy generation of menu background dependent on some image, or even just usage of image directly -- should be convenient for people unfamillar with shader language and so on
3) honor the hierarchical structure size hints -- so the children menus automatically adjusting inside the parent container

I think the two last options can be implemented as a cover to the existing menu system or with a little rewriting of it.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Mon Jun 25, 2012 11:52 am 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 420
I'm not going to do custom pointers because they are always laggy and suck in windowed mode. I've never seen a game implement them in a way that isn't really annoying.

2) should just be a case of doing .background = "MyTexture.dds" and optionally setting texture coords, otherwise they would default to use the whole image

3) you can do that already, each child determines their size based on the width / height of their parent, that's the only hint they have.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Mon Jun 25, 2012 6:59 pm 
Offline
Newbie
User avatar

Joined: Mon Feb 20, 2012 9:31 am
Posts: 12
About pointers: I saw the two ways how other apps implement them.
The first is to hide the system pointer picture and draw the picture in the app instead. This is the laggy one I guess, but it's simple.
The second one is to restyle the system pointer when it's in the window area (mostly seen under windows). This works fast and cute, but probably hard to implement.
However agreed with you, Spark, that pointers isn't so needed thing.

2) I'm imagine that pretty much just like you said it, Spark. I wonder if it's already implemented?
3) Well yeah now they adjusting automatically, but the placement setup is something I feel hard to operate.
If we can implement a percent-based positioning.
For example instead of the direct x and y positions, pass the percents (like 30%,70% would mean that it will be positioned at the 30% of width from the top side and 70% of height from the left side).
Also the resizing functions based on the current element size, screen size-related percent scale.
This should be easly implementable just as covers over existing things... I think that would make life more easier.

However maybe this all already have been implemented and I'm missing out :)

Also forgot to mention: support for custom fonts (ex. picture-based ones)?


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Tue Jun 26, 2012 10:27 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 348
Yep, it is basically the new game menu/gui standard to use HTML/CSS, and libRocket is supposedly based directly upon it (lots of writing on it, lots of companies using it, Rockstar for example uses HTML/CSS and flash with some other stuff for rage's front end along with many other companies, but I can't speak to Rage's in-game hud and whether this is used there or not). You'd really have to take a look at libRocket to confirm this is as cut and dry as I make it, I might be getting too much hope from the front page! Not sure!

Take this from my userbase growing and marketing role in the grit engine team outside of any of my actual working inside of the engine, because my life is very hard otherwise, and your programming life is more easy, the more easy mine is in this regard :P

Consideration:

Implementing things may be fun, and I would love for the tech to be totally original some day (as we joked about even replacing ogre one day in the past), but the wisest thing in my eyes is to hit the internet and find every bit of modular or plugged-in tech that we can find that also agrees with our licensing choices, to very Quickly have that complete engine that people can start using.

This is the only sensible option in my eyes, because once you put in a straight up GUI library like libRocket, for example, you have many new possibilities that are not possibly now nor with a completely scratch made GUI that could take a long time considering all of the other aspects of the engine (networking, deeper work to sound, more graphics - there is a lot to do, implementing is fun, but let's get the tech put together, and THEN wipe out stuff with scratch-made things - get the engine put together, and then you'll even see what you want to do that much better):

1: People can complain about libRocket, and thus people can be encouraged to work on it, or its replacement. Something they cannot do without a complete gui.

2: People who already use libRocket are more attracted to Grit. When you implement and have fun making a better GUI, then they can see that as an improvement, while if we don't use techs that are already out there, we are robbing ourselves of sharing those users with those techs.

3: If we grabbed a networking (enet I guess) component, grabbed lib rocket, and plugged them in, I can go find eNet and libRocket users. You can not think about GUI or Networking again until you are ready to scratch-implement, or at least, it will clear your plate, and let you focus on making the game scriptable, and making the graphics nice and fast.

I understand, most likely, all the reasons, and there are probably more not listed, for not using middle/outer techs, but these can always be rewritten later, with the benefit the engine is usable 100x faster, and only can improve from there. I can't see any other option as crucial.

libRocket can likely be integrated in under a weekend. Then you can leisurely do as you wish with gui - when you wish - with the benefit again, that you can point people to libRocket docs and grit-specific ones when they ask GUI question a, b, or c.

This eliminates the "well, there is no gui, so i don't use grit..." and replaces it with "SWEET it uses libRocket! Awesome. I can do GUI in CSS!!!!!". There is never a "I haven't done that yet" and instead you can say "It's like this, with libRocket, but my replacement might improve the experience with a, b, c"

You see?

You can see where ignoring existing tech would be a somewhat naive move in regards to actually being feasible to use our engine here, and I feel this post is incomplete and have a lot more points, but it's getting long. Even if grit ends up scatch-made 100% one day, the smartest thing to do is treat that GUI like you have treated physics. Treat it like sound has been treated with openAL. Treat it like we will likely treat networking with eNet.

Not using existing tech is shooting ourselves in the foot, the face, and the clock. We need these existing techs - EVEN if it is just temporary - to gain users, to be usable, to be noticable.

How can I go tell people about grit on libRocket if I'm not having a valid reason (like using the tech)? How can I tell people about our multiplayer project on the eNet community if eNet isn't used? Again, even if temporary, right?

We can post showcases to bullet if we want. This is because we USE bullet. We can post to Ogre. We can post to 3ds max and Blender forums because we have exporters for those. Prior to your work on Blender Exporter, I couldn't think of going there and talking to blender users - our cousin as an OS project. I haven't yet gone over there to web-based outlets, only chats, but in time I will, and it is only possible because we didn't make our own map editor/model editor.

It would be unwise to make our own map editor/model editor, right? That's because one exists. We instead support the ones we're known to use. This applies to this argument for libRocket (or another, I don't care, just let it be a somewhat popular one who has users) GUI, as well. You can spend time away from more arguably more important things, or bounce back and forth, or you can have the potential for more users, and a more close to complete engine awaiting your libRocket replacement at your leisure.

Any of the third party stuff we use can be replaced, libRocket wouldn't be any different, using it has the advantages of, and not using it introduces or makes apparent major disadvantages in, both the growth and people's knowledge of Grit, but also just how long it is going to take to see a game project show up using it, small or large. Use existing tech. Replace it at your leisure, but use the existing tech. It's the smartest thing when you weigh it all out.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Tue Jun 26, 2012 11:43 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 348
On second thought; Is there any reason we can't support both libRocket and an in-house solution? Can we not plug this in and use it for now, and be able to potentially use both, or one or the other as a user's choice, when the in-house one fully exists? It makes all of our lives easier, including Spark's and whoever will be working together with him on GUI. And it makes us able to speak to users who will already be acquainted with part of grit, just by being acquainted with libRocket. They are more likely to see your work in in-house GUI, by including them to our project through giving them libRocket.

Think about it, the more we tie in and use that is designed to be easily plugged into projects like ours, the easier, more relaxed, and potentially more fun it will be to work on your own in-house solution, which could end up very positively influencing your decisions on how you implement your own. It can serve as only a benefit to grit to seek out systems we need that already exist, with the intention from the very start to replace them later.

A game development real world example: Rockstar had a part-custom engine throughout the III era. By the next generation, renderware was gone, and their custom formats either remain the same or have been improved and now they own even more of their stuff, and have integrated more third-party techs (umbra occlusion, bullet physics, natural motion to name some).

Will GTA V ditch Umbra for their own occluding technology or another? Should grit not follow that kind of rationale of being able to allow users to get games out the door or up and running while it is perfected with in-house stuff?

Do me a favor and see how easy it would be to plug libRocket into Grit? If it is easy enough and won't bore your time or give a hassle, plug it in. Then, end users have a GUI that is already documented along with whatever docs specific for your implementation of it into Grit, and you can use their complaints to fuel your own GUI implementation, along with other benefits that directly help me out with getting us known among the OS and dev community. I'm not in a rush, but this would be a big step forward.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Thu Aug 09, 2012 8:06 pm 
Offline
Newbie

Joined: Sat Mar 27, 2010 6:26 pm
Posts: 50
Location: Belgium
-XML markup would be cool
-Deformation of panels (http://www.youtube.com/watch?v=PszwY5XykT8)
-Stuff like checkboxes, buttons, lists, arrows, etc etc
-Opacity
-Rounded borders (we must be cool)

Basicly the curent MTA GUI is a good place to steal ideas from :letucce:

_________________


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Thu Aug 09, 2012 8:21 pm 
Offline
Newbie

Joined: Wed Aug 08, 2012 3:49 am
Posts: 5
Opacity and rounded borders can simply come from using RGBA textures, so no coding needed there.
Panel deformation to give the illusion if 3D is easy and fast when done by the renderer, OGRE would make that easy.
I'd prefer Lua over XML, since the fewer languages used, the easier the engine is to use and develop.
Would need a few prebuilt things like button, window(every element on screen could be a window or in a window), radio, slider&frame.
Windows and base gui elements can be skinned with a single texture with coords defined in pixels instead of float(although converted to float for the renderer to texture the bits) to keep things spot on.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Thu Dec 06, 2012 2:28 pm 
Offline
Newbie

Joined: Wed Dec 05, 2012 9:20 pm
Posts: 1
Hey guys.

Not sure if you tried out libRocket or not, but based on trials for my own engine, I very underwhelmed with the library's performance. I mean, just a normal, run-of-the-mill FPS counter, pretty much a clone of the stock Ogre FPS overlay, bogged it down from ~ 400 FPS to ~ 70 FPS. From what I gathered, updating an element (e.g., the stats in an FPS counter) causes a full reparse of the element tree. That said, it's possible that they've fixed this in the month or so since I used it. :D

It *does* seem to work fairly well for menus, though I was a bit disappointed by the fact that it doesn't support CSS3 - no border-radius, for example. You can have rounded corners, but only if you make them in gimp or whatever.

All in all, I'm probably going to be looking at either Berkelium or Awesomium for my GUI needs, as HTML/CSS *is* a nice format for it.


Top
 Profile  
 
 Post subject: Re: Limitations of current GUI system
PostPosted: Thu Dec 13, 2012 7:30 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 348
Good info man, makes me feel better about no one ever trying to tie it in :P


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Localized by MaĆ«l Soucaze © 2010 phpBB.fr