Page 1 of 2

Any plans to make a built-in GUI api?

Posted: Sun Mar 01, 2009 8:12 pm
by Blart
I know there are GUI libraries for Löve already, but I think it would be neat if Löve came with its own basic GUI framework out of the box. It shouldn't be anything fancy. In fact, most actual widgets may not have to be included; just a framework that people can use to build the widgets they need and hook them together.

Really, all that this framework would need is a system for:
  • Defining how widgets draw themselves and update their appearance; I'll very much want to define how my widgets are drawn rather than use a default graphical scheme
  • Linking widgets to callbacks for certain events, so stuff happens when you click on a button or press Enter/Return
  • Widget layout and resizing; especially if you resize the window
  • Handling modal input; this would be really usefull if you have a game screen where your guys walk around, but you also have an inventory window or something that you can bring up (also do-you-want-to-quit dialog boxes)
I could see a need to include various widgets that are either very common (like buttons and text boxes) or very difficult and tedious to implement (I'm thinking lists and scroll areas) but having the general framework for a GUI is more important. I hope this isn't a lot to ask, but I think a simple GUI system would give Löve an edge over similar frameworks like Pygame, especially for users that want to make an RPG or something. I have a modest amount of experience in making games, and one thing I'm sure of is that implementing the GUI is. a. pain. in. the. #%@. :P

Re: Any plans to make a built-in GUI api?

Posted: Sun Mar 01, 2009 8:16 pm
by bartbes
This kind of discussions are to be found all over the forums, and generally the result is that we are told the following:
Love is meant to be generic, and 'low-level', so a GUI would miss the point.
And this supports the idea of having as many possibilities as possible to implement something.

But as you stated, if there is someone who continues work on the GUI libraries made by users, anyone can just use that.

Re: Any plans to make a built-in GUI api?

Posted: Sun Mar 01, 2009 8:19 pm
by Blart
It seems all the good game engines are "low-level." :?
All the "high-level" ones always seem to cost money and not work outside Windows.

I also have trouble keeping track of which GUI library in these forums is most up-to-date.

Re: Any plans to make a built-in GUI api?

Posted: Sun Mar 01, 2009 8:20 pm
by Kaze
Blart wrote:I know there are GUI libraries for Löve already, but I think it would be neat if Löve came with its own basic GUI framework out of the box. It shouldn't be anything fancy. In fact, most actual widgets may not have to be included; just a framework that people can use to build the widgets they need and hook them together.

Really, all that this framework would need is a system for:
  • Defining how widgets draw themselves and update their appearance; I'll very much want to define how my widgets are drawn rather than use a default graphical scheme
  • Linking widgets to callbacks for certain events, so stuff happens when you click on a button or press Enter/Return
  • Widget layout and resizing; especially if you resize the window
  • Handling modal input; this would be really usefull if you have a game screen where your guys walk around, but you also have an inventory window or something that you can bring up (also do-you-want-to-quit dialog boxes)
I could see a need to include various widgets that are either very common (like buttons and text boxes) or very difficult and tedious to implement (I'm thinking lists and scroll areas) but having the general framework for a GUI is more important. I hope this isn't a lot to ask, but I think a simple GUI system would give Löve an edge over similar frameworks like Pygame, especially for users that want to make an RPG or something. I have a modest amount of experience in making games, and one thing I'm sure of is that implementing the GUI is. a. pain. in. the. #%@. :P
You can do all of this in Leif. We've been working to expand it a bit lately as well.

Re: Any plans to make a built-in GUI api?

Posted: Sun Mar 01, 2009 11:52 pm
by Skofo
There's everything you need in LOVE to create a GUI, so there is no need to include a built-in one. LOVE focuses on being a mash-up of game making libraries for graphics, input, sound, physics, sockets, etc. These are standard technical things which many games need, while there is no standard for in-game GUI's. If LOVE included a default GUI library, there is a much bigger chance that many people wouldn't like it because it's more of a creative thing than a standard technical thing (not that much, but still moreso than graphics in general, sound, etc.). Plus, you can make a GUI library out of the already built-in libraries, while there is pretty much no way to code graphics/sound/input/efficient rigid body physics/sockets in Lua from scratch. Many people are actually making GUI libraries for LOVE. All of them are pretty incomplete at this point, though. Perhaps you can help one of them. ;) There are already complete libraries for a camera system and simplified networking, though, so I think that LOVE is on track to becoming as high-level as people ever want it to be. ^^

But then again, I may be completely wrong about this. Perhaps it'd be simpler to build in bindings for guichan or something? Rigid body physics aren't exactly low level, either.

Re: Any plans to make a built-in GUI api?

Posted: Mon Mar 02, 2009 2:07 am
by Merkoth
Guichan was suggested long, looong ago, but rude decided he would not include it. IIRC, he had good reasons but I can't remember.

Re: Any plans to make a built-in GUI api?

Posted: Mon Mar 02, 2009 11:49 am
by rude
Guichan was not only suggested, it was actually integrated at some point. LÖVE is moving more and more towards a library internally, in the sense that all cross-module interaction happens via the Lua VM. Guichan requires graphics output (love.graphics), input (love.mouse/keyboard), image loading (forthcoming love.image), font loading (forthcoming love.font) and probably more. This is way too much to handle internally, and this is one of the reasons a GUI library must be 100% Lua.

Re: Any plans to make a built-in GUI api?

Posted: Mon Mar 02, 2009 2:31 pm
by Skofo
Ahh, I get it. Thanks for explaining. ^^ That old GUI looks quite awesome, though. I wonder if we'll be able to remake it in any of the Lua GUI libraries any time soon...
Please contact your penis for support.
:ultrahappy:

Re: Any plans to make a built-in GUI api?

Posted: Wed Mar 04, 2009 9:04 am
by mike
Ah, the built-in GUI. I remember spending a lot of time struggling with GuiChan only to end up scrapping the whole thing as people were making their own libraries. I think that people should try to work together more when it comes to all these fancy libraries that they build, but that's just me...

Re: Any plans to make a built-in GUI api?

Posted: Thu Mar 05, 2009 6:34 pm
by Xcmd
I still think a standard library would be best. But, see, I'm a lazy person. I don't want to do many amazing things to make things work. I want to do one simple thing. Like this:

mainDialog = love.gui.newDialog(x,y,w,h)
mainDialogButton = mainDialog:newButton(x,y,w,h)

And such. I dunno, that's off the top of my head.