• Advertisement
Sign in to follow this  

Unity Where are all the good GUI libraries?

This topic is 1721 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

Awesomium will probably be available for Unity again soon I'd bet.. here's the tutorial for one of the more recent versions.   They also should have a mono version as well soon.. I think what's up now is a pre-gdc release.  I just wish they would keep their old versions available.

 

http://labs.awesomium.com/unity3d-integration-tutorial-part-1/ 

 

Scaleform too expensive?  http://gameware.autodesk.com/scaleform/unity

Share this post


Link to post
Share on other sites

I've never heard anything good about Scaleform from those who've used it. Sure, you get floaty 3D dialogs and animated textures, but making GUIs that are internally complex rather than externally flashy still seems to be a mess.

 

I'm half-tempted just to go for HTML5 because at least HTML does a decent job of GUIs - but then is a typical HTML GUI compatible with HTML5 gaming libraries? Seems like they render everything onto a canvas so I'm guessing the answer is no.

Share this post


Link to post
Share on other sites

I've never heard anything good about Scaleform from those who've used it. Sure, you get floaty 3D dialogs and animated textures, but making GUIs that are internally complex rather than externally flashy still seems to be a mess.

Once you know the ins and outs of Flash and ActionScript (which, admittedly, is a huge challenge in and of itself), it's not actually that difficult to get even the most complex of UI scenes implemented. I would say that most of the issues with Scaleform aren't really development-related as much they are workflow-related, and those really begin to show as your UI team size increases. But if you're a single developer who knows Flash and can fork out a few hundred bucks, it might be worth it. But try out the evaluation version first ;)

Edited by Zipster

Share this post


Link to post
Share on other sites

Yes, I've noticed this too. For Unity basically you have to buy a GUI package from the asset store, and your options are NGUI, EZ GUI, or iGUI. NGUI and EZ GUI are powerful and flexible, but expense, difficult to use for most, and require lots of custom programming. iGUI is the only one that is a WYSIWYG GUI editor and is pretty good, but it is pretty simple and still expensive.

 

I found I was spending way too much time working on the GUI than my actual game, so I decided to create my own GUI editor system. It's basically a WYSIWYG editor, where you can create your entire game GUI and save it as a prefab. It supports an arbitrary number of hierarchies, 3d animations through the use of a free Tween library, Photoshop like gameobject manipulations like holding shift / control to do different things based on which objects you have selected. Pretty much everything can be changed in the editor scene. I'm hoping to create my entire Game's GUI from the editor alone saved as a prefab, once I get that done I can possibly add content to it and sell it on the asset store.

Share this post


Link to post
Share on other sites

I am left to suspect (partly from experience) that it may be that GUI is one of those things it is difficult to really get "right".

 

like, while it isn't too hard to draw things and figure out, say, when a mouse click is directed at them, it is harder to figure out things like how to best represent the appearance and behavior of widgets and how to best structure and handle the various events, making the creation of a usably good general-purpose GUI library fairly difficult.

 

(not that it can't be done though.)

 

though, others are free to disagree and may not share my experiences here...

Edited by cr88192

Share this post


Link to post
Share on other sites

Once you know the ins and outs of Flash and ActionScript (which, admittedly, is a huge challenge in and of itself), it's not actually that difficult to get even the most complex of UI scenes implemented.

 

I'm fine with Actionscript but have no real knowledge of Flash itself. All I know about Scaleform is that the devs I know have worked with it said it was awful, and the games I've seen that used it had very simple (but pretty) GUIs, for the most part. I don't know how to find out much more about it though.

 

 

iGUI is the only one that is a WYSIWYG GUI editor and is pretty good, but it is pretty simple and still expensive.

 

To be honest I don't care about WYSIWYG (although I know a lot of developers do, especially those who use Unity). What I care about is:

  • Can I construct a complex dialogue dynamically through code? If not, it's worthless, because static dialogues are quite easy to implement without a GUI system just by drawing some sprites and looking to see where the mouse clicks go.
  • Can it layout objects for me in lists and grids? If not, it's going to be a nightmare to use for any complex data. I need to be able to push an arbitrary number of objects into a container and have it position them for me - otherwise, I may as well just render them directly myself.
  • Can it handle scrolling areas? This is the main thing that stops me writing my own GUI in Unity - since there is no access to scissor rectangles I can't implement scrolling areas myself. NGUI have got around this with custom shaders, which is a fun hack, but they obviously have no clue how to handle input management properly so that's a non-starter.
  • Can I change the state of the GUI easily? HTML has this 100% right - if you want to change something, it's one simple function call to find it, then one property access to change it. No need to hook up signals and slots. No need to manually traverse the tree of elements. No need to pre-create the element so that you can hold a reference to it and change it later.
  • Can the GUI effectively tell me when things happen? Usually this is done with callbacks attached to events on controls. Some GUIs like to run in immediate mode which makes life much harder since in most languages you only get one return value from a function, meaning each control can only really signal one type of event.

 

 

Take a look to: http://www.noesisengine.com/noesis_gui_features.htm

 

They're going to need to put some actual information on their page rather than just marketing if they want people like me to try it. Life's too short to be signing up to beta programs to find out whether something will be useful or not.

 

 

I am left to suspect (partly from experience) that it may be that GUI is one of those things it is difficult to really get "right".

 

I really don't think this is the case. We have several reasonable GUIs that exist for C++ apps and they look pretty good. We have decades of experience all the way back from Smalltalk through MFC up to Qt and WxWidgets about how GUIs can be written and made effective (to a greater or lesser extent), and a large number of developers now working with HTML/CSS/Javascript to create and use GUIs. In theory the only difference between these GUIs and game GUIs is the rendering aspect, which itself can often be abstracted away, but for some reason few people are attempting to get this right.

Edited by Kylotan

Share this post


Link to post
Share on other sites

I gave up on using 3rd party GUI's for games a while ago.   They always make me feel like I'm trying to insert a square peg in a round hole.   With games I need to have the power of my own custom code and I don't like modifying other peoples code, most of which does 99% more than what I require. 

 

What I've done is basically just bite the bullet and create a few very simple and lightweight classes that are loosely based on the Visual Basic/ C#  event model.     Event delegation and the use of partial classes are key to this design.    

 

IMO, this is a proven GUI general use design model and has been around since the inception of VB in the 90's.    Of course,  I don't need XML or a scripting language for what I'm doing, and I prefer to keep most that in code anyway, but I guess I could always serialize my GUI objects if I have the need.  

Edited by 00Kevin

Share this post


Link to post
Share on other sites

I don't think that GUIs are all that hard to write, but it's probably a bit of a thankless task to write them.

Simplui worked pretty well after only a couple of months development - at some point I'd love to find the time to build a full UI toolkit along similar lines.

Share this post


Link to post
Share on other sites

Simplui worked pretty well after only a couple of months development - at some point I'd love to find the time to build a full UI toolkit along similar lines.

 

I did actually use Simpleui for a while (thanks!) but replaced it with kytten for some reason that I have since forgotten. (Possibly the absence of a list view/grid controls? I remember trying to fake a grid with nested VLayout/HLayouts.) I think Simpleui was the most sane-looking of the smaller GUI toolkits I've come across. Perhaps I should try extending that.

 

What I've done is basically just bite the bullet and create a few very simple and lightweight classes that are loosely based on the Visual Basic/ C# event model.

 

I'd be reasonably happy to do that, but unfortunately, trying to implement any kind of scrollable region when your graphics API doesn't allow you to clip one object's rendering to an arbitrary rectangle is quite awkward. (I'm looking at you, Unity.) Some people have hacked it with a custom clipping shader but that is out of my realm of expertise.

Share this post


Link to post
Share on other sites

I think Simpleui was the most sane-looking of the smaller GUI toolkits I've come across.

It was/is. Unfortunately, there were a number of things about GUI layout and measure that I hadn't yet learned at the time - controls like grids and lists would be much simpler if there was proper support for scrolling, among other things.

Share this post


Link to post
Share on other sites

What about Java... you can use the SWING GUI components in your UI.

 

Does that even qualify as UI design.. they look like little rectangles with ugly blue gradients inside. It might be fine for tiny utility programs or applications where a nice interface isn't important, but for games where you need complete control over your graphical user interface, I think SWING doesn't cut it. At least, last time I checked... yes, yes, I know.. it's portable.. but still..

Share this post


Link to post
Share on other sites

I always just roll my own GUI Library with features that are specific to each game. I should probably just write one that can be used across all my games, but to lazy fo' that.

 

GUI's for me are the most trivial task in game development, it doesn't take a long time providing you don't need super complex things.

 

The only real problems I have come across is scrolling.

Share this post


Link to post
Share on other sites

I am left to suspect (partly from experience) that it may be that GUI is one of those things it is difficult to really get "right".

 

I really don't think this is the case. We have several reasonable GUIs that exist for C++ apps and they look pretty good. We have decades of experience all the way back from Smalltalk through MFC up to Qt and WxWidgets about how GUIs can be written and made effective (to a greater or lesser extent), and a large number of developers now working with HTML/CSS/Javascript to create and use GUIs. In theory the only difference between these GUIs and game GUIs is the rendering aspect, which itself can often be abstracted away, but for some reason few people are attempting to get this right.

 

this may not necessarily be because GUI libraries are easy to get right, but because many of the particularly awful ones tend to be quickly forgotten (and never gained much ground within the developer community).

 

what most people tend to see are not necessarily all the things which were ever written, but more the things which were "good enough" to gain widespread adoption.

if a programmer goes and writes something particularly awful, often no one else will use it either, and maybe soon enough the original developer will abandon it, and to the larger world, it appears as if it had never existed.

 

what generally does end up being seen, are those things which were generally good enough that people started using them.

 

 

granted, this isn't necessarily unique to GUI libraries though...

Share this post


Link to post
Share on other sites

Can I construct a complex dialogue dynamically through code? If not, it's worthless, because static dialogues are quite easy to implement without a GUI system just by drawing some sprites and looking to see where the mouse clicks go.

 

Hmm, so dynamically creating dialogue boxes, do you mean you store a large set of possible text responses and the dialogue GUI can dynamically resize itsellf based on the amount of text? Let's say the dialogue had anywhere from 0-5 clickable response lines and those spawned different dialogues, maybe ultimately leading to a dialogue with a reward in it (completed a quest for example). This shouldn't be too difficult to do as long as a flexible dialogue prefab is constructed and then you call it's creation with the parameters you want in your game code. I haven't gotten far enough in my own game to do this yet (create a dynamic dialogue system), but I will definitely make sure I consider all the possible use cases.

 

Can it layout objects for me in lists and grids? If not, it's going to be a nightmare to use for any complex data. I need to be able to push an arbitrary number of objects into a container and have it position them for me - otherwise, I may as well just render them directly myself.

 

Yea this definitely be doable with a panel GUI object. My editor started out as a world map generator, so it can randomly generate say 1,000 connected solar systems with the ability to highlight a path between any 2 given systems using a BFS algorithm using the GUI hierarchy, each with randomly generated tooltips, names, hoverstate animations, etc all within a pannable, zoomable parent panel. The way entities are related to eachother spatially within a panel parent should be highly configurable out of the box. So to create a grid like inventory system GUI for example, the children entities would have a 90 degree step and 0 degree random variation.

 

Can it handle scrolling areas? This is the main thing that stops me writing my own GUI in Unity - since there is no access to scissor rectangles I can't implement scrolling areas myself. NGUI have got around this with custom shaders, which is a fun hack, but they obviously have no clue how to handle input management properly so that's a non-starter.

 

So, a scrollable panel parent should either be able to dynamically resize itself or force a dynamic rescaling of the children objects to fit a fixed parent size. The input system is all based on one ray cast to determine where your mouse is currently located and which actions are available depend on the GUI prefab your on.  I'm pretty surprised this requires custom shaders in NGUI. Are the items you want to fit within a scrollable parent all different sizes or something?

 

Can I change the state of the GUI easily? HTML has this 100% right - if you want to change something, it's one simple function call to find it, then one property access to change it. No need to hook up signals and slots. No need to manually traverse the tree of elements. No need to pre-create the element so that you can hold a reference to it and change it later.

 

Basically I currently have it as GameObject.Find to get an arbitrary reference, the editor forces a naming convention such that the any given can be constructed using prefixes of the parent objects, to ensure that an arbitrary hierarchy object has a unique name. Problem is the names can get pretty long, I might need to rethink this design later. Once you have a reference to it, you can cast it to the type of GUI object it is to access the data. Additionally, you will also be able to add, delete, get, or set arbitrary data for any GUI object.

 

Can the GUI effectively tell me when things happen? Usually this is done with callbacks attached to events on controls. Some GUIs like to run in immediate mode which makes life much harder since in most languages you only get one return value from a function, meaning each control can only really signal one type of event.

 

This should be easy enough :)

 

Thanks for the ideas, this is a pretty complex, but fun project :)

Share this post


Link to post
Share on other sites

Guess I'm already late for the comment, but:

I'm half-tempted just to go for HTML5 because at least HTML does a decent job of GUIs - but then is a typical HTML GUI compatible with HTML5 gaming libraries? Seems like they render everything onto a canvas so I'm guessing the answer is no.

You could always overlay the GUI on top of the canvas without much issue and let the browser handle that =P

Share this post


Link to post
Share on other sites

do you mean you store a large set of possible text responses and the dialogue GUI can dynamically resize itsellf based on the amount of text?

 

Even more general than that - I need a dialogue to be whatever size it needs to be to hold its content. I should never need to specify its size. HTML does this - elements grow to the correct size for their contained elements.

 

So to create a grid like inventory system GUI for example, the children entities would have a 90 degree step and 0 degree random variation.

 

This sounds rather more complex than what a GUI should typically need to do. If I want a grid, I just want to be able to create a Grid object, and then feed it several rows of data.

 

 

So, a scrollable panel parent should either be able to dynamically resize itself or force a dynamic rescaling of the children objects to fit a fixed parent size. The input system is all based on one ray cast to determine where your mouse is currently located and which actions are available depend on the GUI prefab your on. I'm pretty surprised this requires custom shaders in NGUI. Are the items you want to fit within a scrollable parent all different sizes or something?

 

Usually when you have a scrollable region, you render everything within that region (optimisations aside) but the renderer can restrict the actual drawing operations to the viewport through which you view the region. Unity lacks that exact functionality so it's hacked in by using a custom shader on scrollable regions to achieve the same effect.

 

That's a separate issue from NGUI using colliders to stop you accidentally clicking on the objects that are invisible. That just implies that their input handling system is completely different to pretty much any other sensible GUI, which would propagate mouse clicks down through the GUI hierarchy to see what was clicked on, which would reject clicks on objects scrolled outside the viewport by design.

 

The size and shape of the items on the scrollable region should be irrelevant to how to implement the scrolling behaviour.

Share this post


Link to post
Share on other sites

Even more general than that - I need a dialogue to be whatever size it needs to be to hold its content. I should never need to specify its size. HTML does this - elements grow to the correct size for their contained elements.

 

Yea, that makes sense.

 

This sounds rather more complex than what a GUI should typically need to do. If I want a grid, I just want to be able to create a Grid object, and then feed it several rows of data.

 

Yea, I realized I was trying to make one thing be generic enough to work for a multitude of things, but it will be better to create a bunch of different simpler parent panel type scripts / prefabs.

 

That's a separate issue from NGUI using colliders to stop you accidentally clicking on the objects that are invisible. That just implies that their input handling system is completely different to pretty much any other sensible GUI, which would propagate mouse clicks down through the GUI hierarchy to see what was clicked on, which would reject clicks on objects scrolled outside the viewport by design.

 

Ok, yea what I am doing currently is RaycastAll() on the entire GUI and then sending event messages for every GUI hit using an event handler system. The GUI elements themselves in addition to the editor can receive and process the input events.

Share this post


Link to post
Share on other sites

That's a separate issue from NGUI using colliders to stop you accidentally clicking on the objects that are invisible. That just implies that their input handling system is completely different to pretty much any other sensible GUI, which would propagate mouse clicks down through the GUI hierarchy to see what was clicked on, which would reject clicks on objects scrolled outside the viewport by design.T

To be fair, most GUIs propagate events both top-down and bottom-up, and if you are raycasting in 3D, it's often easiest to find the deepest widget in the hierarchy and walk back up.

You do need some kind of clipping in either case, to handle scrolling containers. The clipping is really simple in a purely 2D GUI, but it's a bit more involved in a 3D GUI, and their clipping-via-colliders may be the best they can do in Unity.

Share this post


Link to post
Share on other sites

What I meant with the top-down processing is that traditionally in 2D you go top-down to find out what was actually clicked on, and then from there you go bottom-up to find a handler for that click. The 3D aspect does change things, but I'm sure there are often pretty trivial ways of implementing clipped areas. For example, Unity has a RayCastAll() which returns all the objects hit, not just the first. To implement clipping to a parent you can discard any object in that list whose parent is not also in that list.

 

To be fair, that's only one of my complaints about NGUI - I hate the fact that you're expected to manually set up materials and atlases and sliced sprites and all kinds of other graphical esoterica that I think should be handled by the engine, but most of that is Unity's fault. You pay the 3D price and get the 3D benefits, but lose a lot of the 2D simplicity.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Popular Tags

  • Advertisement
  • Popular Now

  • Similar Content

    • By 3dmodelerguy
      So I am building a turn based rogue-like (think CDDA). The game is going to have a very large map (up to 1000's x 1000's) however to alleviate most of that I obviously can't render everything so there will just be render a certain radius around the player and just load in and out data as the player moves.
      The next major system I am prototyping is making interactive tiles destructible and pretty much everything will be destructible besides basic landscape (cars, doors, windows, structures, etc. will be destructible)
      While I am only rendering a certain amount of tiles around the player, I want to keep the amount of colliders active at one time to be as small as possible for performance and currently the tilemap tool I use automatically merges colliders together.
      So instead of creating a separate colliders for each of these tiles and having the destructible behavior tied to that object (which my tilemap tool would allow me to do) I was thinking that I would store an array of all the X and Y locations for the interactive tilemap layer and let the tilemap manage the colliders. 
      Then when I hit a collider on the interactive tilemap layer, instead of of getting the behavior for how to deal with the destruction for that tile from that game object, I would pull it from the array I mentioned earlier based on the tile I attempt to interact with which I already have.
      Does this sound like a good approach? Any other recommendations would be welcomed.
    • By NDraskovic
      Hey guys,
      I have a really weird problem. I'm trying to get some data from a REST service. I'm using the following code:
       
      private void GetTheScores() { UnityWebRequest GetCommand = UnityWebRequest.Get(url); UnityWebRequestAsyncOperation operation = GetCommand.SendWebRequest(); if (!operation.webRequest.isNetworkError) { ResultsContainer rez = JsonUtility.FromJson<ResultsContainer>(operation.webRequest.downloadHandler.text); Debug.Log("Text: " + operation.webRequest.downloadHandler.text); } } The problem is that when I'm in Unity's editor, the request doesn't return anything (operation.webRequest.downloadHandler.text is empty, the Debug.Log command just prints "Text: "), but when I enter the debug mode and insert a breakpoint on that line, then it returns the text properly. Does anyone have an idea why is this happening?
      The real problem I'm trying to solve is that when I receive the text, I can't get the data from the JSON. The markup is really simple:
      [{"id":1,"name":"Player1"},{"id":2,"name":"Player2"}] and I have an object that should accept that data:
      [System.Serializable] public class ResultScript { public int id; public string name; } There is also a class that should accept the array of these objects (which the JSON is returning):
      [System.Serializable] public class ResultsContainer { public ResultScript[] results; } But when I run the code (in the debug mode, to get any result) I get an error: ArgumentException: JSON must represent an object type. I've googled it but none of the proposed solutions work for me.
      Also (regardless if I'm in the debug mode or not) when I try to do some string operations like removing or adding characters to the GET result, the functions return an empty string as a result
      Can you help me with any of these problems?
      Thank you
    • By nihitori
      The Emotional Music Vol. I pack focuses on beautiful and esoteric orchestral music, capable of creating truly emotive and intimate moods. It features detailed chamber strings, cello and piano as the main instruments, resulting in a subtle and elegant sound never before heard in video game royalty-free music assets.

      The pack includes 5 original tracks, as well as a total of 47 loops based on these tracks (long loops for simple use and short loops for custom / complex music layering).

      Unity Asset Store link: https://www.assetstore.unity3d.com/en/#!/content/107032
      Unreal Engine Marketplace link: https://www.unrealengine.com/marketplace/emotional-music-vol-i

      A 15 seconds preview of each main track is available on Soundcloud:
       
    • By RoKabium Games
      Another one of our new UI for #screenshotsaturday. This is the inventory screen for showing what animal fossils you have collected so far. #gamedev #indiedev #sama
    • By eldwin11929
      We're looking for programmers for our project.
      Our project is being made in Unity
      Requirements:
      -Skills in Unity
      -C#
      -Javascript
      -Node.js
      We're looking for programmers who can perform a variety of functions on our project.
      Project is a top-down hack-and-slash pvp dungeon-crawler like game. Game is entirely multiplayer based, using randomized dungeons, and a unique combat system with emphasis on gameplay.
      We have a GDD to work off of, and a Lead Programmer you would work under.
      Assignments may include:
      -Creating new scripts of varying degrees specific to the project (mostly server-side, but sometimes client-side)
      -Assembling already created monsters/characters with existing or non-existing code.
      -Creating VFX
      -Assembling already created environment models
      If interested, please contact: eldwin11929@yahoo.com
      This project is unpaid, but with royalties.
       
      ---
      Additional Project Info:
      Summary:
      Bassetune Reapers is a Player-verus-Player, competitive dungeon crawler. This basically takes on aspects of dungeon crawling, but with a more aggressive setting. Players will have the option to play as the "dungeon-crawlers" (called the 'Knights', or "Knight Class", in-game) or as the "dungeon" itself (literally called the 'Bosses', or "Boss Class", in-game). What this means is that players can choose to play as the people invading the dungeon, or as the dungeon-holders themselves.
      Key Features:
      -Intense, fast-paced combat
      -Multiple skills, weapons, and ways to play the game
      -Tons of different Bosses, Minibosses, creatures and traps to utilize throughout the dungeon
      -Multiple unique environments
      -Interesting, detailed lore behind both the game and world
      -Intricate RPG system
      -Ladder and ranking system
      -Lots of customization for both classes s of customization for both classes
  • Advertisement