LÖVE 2D for everything.

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Dr.Tyler O.
Citizen
Posts: 58
Joined: Tue Jul 29, 2014 9:17 am
Location: United States

LÖVE 2D for everything.

Post by Dr.Tyler O. »

I have been using Love 2D for literally everything that I make that is GUI based and I'm beginning to ask myself whether it's a good idea to use it for EVERYTHING. What are your thoughts on this?
Any topic I have ever posted that I felt did not require a .love file, although they were requested, never required one so I would appreciate if you did not ask me to supply one unless you think that I am ignorant for not doing so.
User avatar
Duster
Prole
Posts: 32
Joined: Fri Dec 19, 2014 8:34 pm
Location: Ontario, Canada

Re: LÖVE 2D for everything.

Post by Duster »

Love IS pretty versatile, and there's certainly a lot you can do with it, but ehhh
There are sometimes better tools for what you might want to do, so you wont have to be jumping through hoops or anything. Seeing as Love is focused on gamedev there are some limitations there, specifically in the limited options for save directories or having to create your own gui.
Love can work great for small non-game programs that require a graphical interface though, like fractal generation and whatnot.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: LÖVE 2D for everything.

Post by Kingdaro »

I definitely wouldn't use it for everything. It's made for 2D games, so I only use it for 2D games. If I want to make another kind of application, I'll use something else.

There should never be a do all end all for anything you create, that and learning to use different languages and frameworks will further your knowledge of software development as a whole.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: LÖVE 2D for everything.

Post by s-ol »

Adhering to the Unix philosophy, löve does one thing and does it well, instead of many things poorly.

löve is awesome for 2D games. It is usable for demos and other graphics stuff, but for GUIs its limits are met rather quickly (one window per love thread etc.)

Of course what you do with love is your choice, but you should always try to pick an appropriate tool for your job.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: LÖVE 2D for everything.

Post by kikito »

Here are a bunch of tasks I think you could use LÖVE with, but it's not a great match.
  • Applications which require access to a DB (LÖVE has no db layer by default, you would have to add it yourself)
  • Applications which require unrestricted access to the filesystem (love.filesystem is limited to the app folder, you would have to add it yourself)
  • Web servers (I guess you could create a web server using luasocket, but it's going to be a lot of work)
  • 3D (only 2d primitives, you have to add stuff on top)
  • Command-line-only tools (you can create them by disabling all the graphical modules, but at that point you're probably better off just using plain Lua or LuaJIT).
  • Applications which are text-heavy, like a text editor or IDE (last time I checked LÖVE was not very fast when rendering text)
I repeat: I think it is possible to do all of the above with LÖVE - but I don't think it's a good match, and there are better options out there.
When I write def I mean function.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LÖVE 2D for everything.

Post by bartbes »

kikito wrote: I repeat: I think it is possible to do all of the above with LÖVE - but I don't think it's a good match, and there are better options out there.
Not to mention love's natural state is "resource-hungry", which is what you want for games, but not for your text editor.
Muris
Party member
Posts: 131
Joined: Fri May 23, 2014 9:18 am

Re: LÖVE 2D for everything.

Post by Muris »

I would probably of think using something else for gui-based stuff, if its really non-game thing. Maybe you've found a really good gui-library, but for example making cross platform guis (android + desktop), I feel like the gui-libraries do not really work too well. Or if they work it is really a lot of work to make them look like how you'd want.

For example scaling is one of those issues that you have to manually do, at least I think. Some gui-libraries do not handle click correctly if you want to create buttons for android. They assume that mouse position is constantly being updated, which doesn't really happen with touch, but rather than using set cursor. So the position would be instantly set on top of button then press the button on same frame, so any kind of gui-system that assumes that you can safely use last update position as basis of if cursor was on top of button last frame fails. Also comparing to something like QT, there are no visual gui-editors.

Also none of the gui-libraries that I know could use something like xml-like code to define a gui.

For lots of other stuff I think löve is really great, but gui-thingies/application programming is not something I really would use löve. For example I tried to create a painting program couple of months ago, just to realize that the stock löve-filesystem has quite some limits on where to save/load.

Personally if I know well on what platforms I would be planning on doing and making guis, I would choose c# and .net for windows. Maybe possibly QT if I needed other platforms, or even java, since java is quite cross-platform. On the other hand java and c++ have their own quirks, especially C++ carrying some of it's old legacy, but C++11 is at least bit more manageable by having shared_ptr / auto and lambda expressions.

Now that I think of, to my knowledge python has pretty good gui-libraries, although I haven't really used python, but that's the impression I have.

Also there is wxlua, but I am not really sure how much work would it involve to make it usable on löve2d.
Bereb
Prole
Posts: 4
Joined: Tue Nov 12, 2013 8:54 am

Re: LÖVE 2D for everything.

Post by Bereb »

I think we can do a lot of things with Löve, because there is Lua behind the scene. But there is also and above all SDL; and that tells us Löve is really meant for graphics (not only games).

It's not so difficult to build with Löve some command buttons of one's own, if need bee (in graphic programs, we often don't need more). And there are also some GUI libraries which work well (in any case in my Lubuntu), as imGui or LoveFrames. I didn't test others.

You can do with Löve almost all you could do with Processing, for instance.
NB: moreover, there is a usefull function missing from Löve: the equivalent to Processing noLoop() which causes the draw() function (= love.draw) to only execute once.

Otherwise, there is Lua; and Lua have a lot of libraries, among them GUI-libraries, which allow you to do different and various (amazing) things.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: LÖVE 2D for everything.

Post by s-ol »

Bereb wrote:I think we can do a lot of things with Löve, because there is Lua behind the scene. But there is also and above all SDL; and that tells us Löve is really meant for graphics (not only games).

It's not so difficult to build with Löve some command buttons of one's own, if need bee (in graphic programs, we often don't need more). And there are also some GUI libraries which work well (in any case in my Lubuntu), as imGui or LoveFrames. I didn't test others.

You can do with Löve almost all you could do with Processing, for instance.
NB: moreover, there is a usefull function missing from Löve: the equivalent to Processing noLoop() which causes the draw() function (= love.draw) to only execute once.

Otherwise, there is Lua; and Lua have a lot of libraries, among them GUI-libraries, which allow you to do different and various (amazing) things.
you could either overwrite love.run or quit at the end of love.draw. (first is cleaner probably)

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
zorg
Party member
Posts: 3449
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: LÖVE 2D for everything.

Post by zorg »

S0lll0s wrote:
Bereb wrote:(...) NB: moreover, there is a usefull function missing from Löve: the equivalent to Processing noLoop() which causes the draw() function (= love.draw) to only execute once.
Otherwise, there is Lua; and Lua have a lot of libraries, among them GUI-libraries, which allow you to do different and various (amazing) things.
you could either overwrite love.run or quit at the end of love.draw. (first is cleaner probably)
well, if one wants the game to actually not-quit, but show that one frame forever, then one could do all processing in love.load, then display in love.draw; since nothing's updating, what gets drawn will be static... or just comment the while loop in love.run.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests