Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

More versatile GUI element(s) -- guiHTML layer?

Discussion in 'Wish List' started by podperson, Apr 30, 2007.

  1. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    I think the simplest option might be to simply provide a GUI HTML layer using IE on Windows, and Safari on the Mac, (and Opera on the Wii). Unless there's some magic somewhere I can't see, building sophisticated 2d UIs in Unity is pretty nightmarish.
     
  2. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Are you talking about inside Unity to help with the cumbersome GUIText layout? or on top of the game in the WebPlayer?

    I think this is an awesome idea to allow us to format GUI layouts easily. But I am sure OTEE are working one something amazing to relieve us all of the current frustrations.
     
  3. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    Yes I'm suggesting they basically stick a web browser in a GUItexture layer (well -- an html renderer with JavaScript support).

    The nice thing about this is that you get a huge amount of functionality for free. It's pretty much how both EverQuest and World of Warcraft do their UIs, except they've both implemented a complex hotchpotch of custom xml + html + random script language stuff.

    "But I am sure OTEE are working one something amazing to relieve us all of the current frustrations."

    The major weakness I see in Unity right now is a lack of attention to 2d stuff. It will do anything you can think of in 3d, but try and implement any kind of 2D UI beyond showing your current ammo and you are in deep water.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    I certainly wouldn't argue against this, but one thing to consider about features is their effect on run-time code size. If you throw everything that anyone could want in there, it's going to start bloating, though it of course makes development nicer. As it is, you've already got the code in your game for physics, for example, whether you're actually using physics or not. But UI stuff can be implemented relatively easily with custom scripting (unlike physics). So I wonder if this is an area where an enterprising third party could spend some time putting together a nice general 2D UI utility package that people could buy if they needed advanced UI functionality. Just an idle thought...probably there are issues with that I haven't thought of.

    --Eric
     
  5. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    Webkit is already installed on every Mac. IE is on every PC. It's just calls to system libraries.

    "But UI stuff can be implemented relatively easily with custom scripting (unlike physics)."

    Er, no it can't. Some UI stuff can be implemented relatively painfully with custom scripting.

    "So I wonder if this is an area where an enterprising third party could spend some time putting together a nice general 2D UI utility package that people could buy if they needed advanced UI functionality."

    Indeed, I've had the same thought.

    But you're talking about an income stream comprising $x multiplied by a fraction of Unity users.
     
  6. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Search around the forum and you'll find that SeriousGames.dk who has a source license for Unity tried this for their game, and it turned out to be a serious dead end. They ended up scrapping it for some other better GUI system.

    -Jon
     
  7. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    By "this" I assume you mean using webkit / ie?

    If so, we still need better UI stuff. I just thought this might be a relatively easy solution.
     
  8. MatthewW

    MatthewW

    Joined:
    Nov 30, 2006
    Posts:
    1,356
    I think the issue (especially with IE), is rendering to a texture or otherwise getting the information into an OpenGL environment.

    I posted this in another thread awhile ago--it's a "cleanroom" implementation of Flash that can render to texture or rasterize as polygons: http://www.scaleform.com/products_gfx.php . A lot of game companies are using it for UI work today.
     
  9. manuelflara

    manuelflara

    Joined:
    Jan 21, 2007
    Posts:
    87
    I think the lack of a proper (let alone "Unity level") GUI system is a real pain in the ass for me right now. Networking is nice and all, but if there are no improvements planned in this area for Unity 2.0 or sooner, it'll be a big disappointment for me, and I'm sure for others as well.
     
  10. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    By "relatively easily" I don't mean it would be trivial, just that you don't need a source code license to Unity itself or anything.

    Well...if only a fraction of Unity users need that sort of thing, then it suggests that OTEE shouldn't make it a priority. I'd rather have fully dynamic shadows. ;)

    --Eric
     
  11. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    "Well...if only a fraction of Unity users need that sort of thing"

    No, only a fraction will buy a third-party gizmo.

    Dynamic shadows would be great -- but isn't that essentially just a "pro" feature?

    Another option would be to leverage QuickTime's support for Flash (at least up to version 5).
     
  12. hsparra

    hsparra

    Joined:
    Jul 12, 2005
    Posts:
    750
    Depends on what this would add to the runtime. Not all PCs have QuickTime installed.

    What specific features do people need? For me, I find it cumbersome moving GUITextures using the Scene View. Perhaps if you could:
    a. Toggle the Scene View to GUI layout mode where your GUI objects would appear as they would in Game view
    b. Constrain the GUI Objects to the bounds of the window (or at least have a toggle)
    c. Be able to "nudge" the objects with the keyboard, if you alread can't. Memory is failing me at the moment.
    d. Have a set of predefined widgets, although some, such as buttons, are not that difficult to do now.
     
  13. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Having a way of placing GUI elements in Orthographic view, so there is no distortion from camera perspective, or even have an Orthographic camera for that purpose that works like an overlay.

    Sometimes you want GUI elements in your 3d space, but sometimes you don't. An Orthographic camera would seriously reduce the amount of fiddling and guess work for this type of setup.
     
  14. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    That, at least, is already possible if you use two cameras. Then just put the 3D GUI objects on their own layer which is only seen by the orthographic camera. Of course, I'm probably misunderstanding what you're doing.

    --Eric
     
  15. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Eric,

    Sure, but you cant see that all happening in the editor.

    Whats great about Unity (but is often a curse) is there are always ways of getting what you need done.. not always straight forward, but always do-able. The curse part is... some of it is tedious to the point of inhibiting work flow.

    OTEE are aware of this... how can they not be, they are active on this forum. So, I am sure they have a plan, and it may not be for the next release, or it may be a bit by bit solution, but bottom line is... we can still do what we need in Unity as it is.. so its about improvements not failings.

    Seon.
     
  16. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    "Not all PCs have QuickTime installed."

    Not all PCs have pretty much any darn thing installed :)
     
  17. mindlace

    mindlace

    Joined:
    Mar 31, 2007
    Posts:
    24
    Look, I don't know about y'all, but it seems like we "should" be able to appropriate more from the stuff already implemented in the mono framework.

    It's not that hard to get mono + gtk set up on your mac/pc. It doesn't really matter if we have to fall back gtk wise with Unity relative to the Gnome project.

    The Nokia N800 runs a stripped down version of Gnome and has a fine HTML rendering system. We should be able to appropriate that to give Unity a lightweight, very advanced system for rendering things in 2d, including HTML.

    There are projects I know of that already run GTK on win/lin/mac and there's no good reason to keep it out of unity.

    The runtime size issue is not that bad; I for one would gladly pay dozens of megabytes for good 2d graphics.
     
  18. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
    It doesn't render HTML at all? maybe that's why my attempt to format a MySQL return in a table to display scores is broken?
     
  19. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    The N800 is designed as a web browsing device ... and it has Opera embedded in it. Meanwhile, Nokia is using Webkit for future development...