Using Love for an application which isn't a game

General discussion about LÖVE, Lua, game development, puns, and unicorns.
mmanso
Prole
Posts: 12
Joined: Tue Feb 09, 2016 12:11 pm

Using Love for an application which isn't a game

Post by mmanso »

Hi All,

I'm looking for a framework to write an application that is meant to be execute on Android, Windows and Linux.

There isn't many frameworks that allow you to do that and with the simplicity of Love and lua, I don't know a single one.

My question is, since Love has the ability to be deployed into Android, Windows and Linux, could it make any sense to write such an application (which is not a game, it's an application with buttons, data grids and such) in lua and Love?

Thanks all for the help.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Using Love for an application which isn't a game

Post by Davidobot »

I think it's completely possible. The only irk may be the lack of built-in https and encryption libraries, but that can be overcome with external lua libraries.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Using Love for an application which isn't a game

Post by airstruck »

could it make any sense to write such an application (which is not a game, it's an application with buttons, data grids and such) in lua and Love?
If you want to use Lua and need a rich user interface (familiar desktop look and feel), and you don't need game-specific stuff like shaders, perlin noise, a physics engine and so on, it might make more sense to use something like wxLua instead.

If you use Love for this, you'll need to find a fairly comprehensive UI library that runs under Love in order to be productive. There are many UI libraries out there for Love, but most of them are focused on building UIs for games, not general-purpose applications.
User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

Re: Using Love for an application which isn't a game

Post by adnzzzzZ »

If you use Love for this, you'll need to find a fairly comprehensive UI library that runs under Love in order to be productive. There are many UI libraries out there for Love, but most of them are focused on building UIs for games, not general-purpose applications.
It's actually kinda simple to get most UI elements that you'd need in a normal application working and looking like the ones you see in most applications. In fact, in terms of looks you usually have a ton more flexibility because you're drawing everything yourself. The only real and big problem I found when it comes to UI elements is a Textarea one. To feature-match textarea elements that exist on the web or on the desktop you need A LOT of work and you need to cover a lot of different things. The moment this is done properly the rest is pretty easy.
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Using Love for an application which isn't a game

Post by airstruck »

adnzzzzZ wrote:It's actually kinda simple to get most UI elements that you'd need in a normal application working and looking like the ones you see in most applications.
I'm not sure it's that simple. A fair bit of work goes into building something like a menu bar, context menu, or dropdown list. Even a single-line text box with proper unicode support and keyboard/mouse handling is fairly involved.

There are also other considerations besides individual elements. Do you need a flexible and responsive layout manager? Many UI libraries for Love have rudimentary or non-existent layout mechanisms. Do you need rich, high-level events that bubble through a hierarchy so you can use event delegation to reduce redundancy? Maybe you'd like a compact, data-driven format for quickly banging out UIs? Do you want to be able to easily theme or style a UI so you can keep structure and appearance separate? How about tab navigation and keyboard shortcuts? How about modal and non-modal dialogs?

Of course all of this can be done, but it adds up quickly, and if the end goal is to build an actual application, putting all this stuff in place first does not seem like the most productive approach.
User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

Re: Using Love for an application which isn't a game

Post by adnzzzzZ »

A fair bit of work goes into building something like a menu bar, context menu, or dropdown list.
Compared to what goes into a textarea element those are very simple from my perspective and I've built most of those in one way or another (https://github.com/adonaac/yaoui, https://github.com/adonaac/thranduil)
Even a single-line text box with proper unicode support and keyboard/mouse handling is fairly involved.
This is a textarea element so yea.
Of course all of this can be done, but it adds up quickly, and if the end goal is to build an actual application, putting all this stuff in place first does not seem like the most productive approach.
I agree that it's not the most productive approach, which is why I wouldn't do most of it. Most of the things you listed IMO shouldn't be the job of the UI library and should be left to the developer to either implement on their own or not. Those things add a lot of complexity to something that should be simple for no reasonable gain in my view.
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Using Love for an application which isn't a game

Post by airstruck »

adnzzzzZ wrote:Compared to what goes into a textarea element those are very simple from my perspective and I've built most of those in one way or another (https://github.com/adonaac/yaoui, https://github.com/adonaac/thranduil)
I just took a quick look at yaoui and saw that Textinput.lua is half the size of Dropdown.lua. I didn't notice menus in either repo, did I miss them? In my experience menus were trickier to get right than text inputs, although to be fair it involved less code.
This is a textarea element so yea.
I've only heard "textarea" refer to multi-line text inputs, as opposed to something like "text box" or "text input" for single-line text inputs. Sorry, I thought that's what you meant.
Most of the things you listed IMO shouldn't be the job of the UI library and should be left to the developer to either implement on their own or not.
I don't think the authors of most serious UI toolkits share your opinion, since they generally provide most of these things. In any case, I expect most users would be happy to find these things already in place when they realize they want them.
User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

Re: Using Love for an application which isn't a game

Post by adnzzzzZ »

I just took a quick look at yaoui and saw that Textinput.lua is half the size of Dropdown.lua. I didn't notice menus in either repo, did I miss them? In my experience menus were trickier to get right than text inputs, although to be fair it involved less code.
yaoui uses Thranduil to build its elements so yaoui elements are usually just wiring of multiple Thranduil elements together. Here's the actual Textarea code https://github.com/adonaac/thranduil/bl ... xtarea.lua. Similarly, menus would work the same way the dropdown does, which is just wiring basic elements together (Frames and Button in this particular case) and getting things to show up or disappear depending on where you click. This is all very simple logic.
I've only heard "textarea" refer to multi-line text inputs, as opposed to something like "text box" or "text input" for single-line text inputs. Sorry, I thought that's what you meant.
Implementation wise a single-line textbox is just a textarea that is limited to one line. Usually there's no difference between the logic of both other than this limitation.
I don't think the authors of most serious UI toolkits share your opinion, since they generally provide most of these things. In any case, I expect most users would be happy to find these things already in place when they realize they want them.
I can't disagree with that but it's all about trade-offs. You can either try to make this amazing and complex thing that you probably won't get done because it's too much, or you can try to make something simple and extensible enough that you will finish and that people can build on top off and go from there.

To answer the OP though because I feel this is a bit off-topic now...
My question is, since Love has the ability to be deployed into Android, Windows and Linux, could it make any sense to write such an application (which is not a game, it's an application with buttons, data grids and such) in lua and Love?
I think if you don't wanna do a lot of the groundwork yourself (like lots of UI work) LÖVE isn't a good idea yet for this. But it's certainly possible.
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re: Using Love for an application which isn't a game

Post by pgimeno »

One other caveat: LÖVE doesn't support multiple windows. Everything must be done in the main window. Kind of like a web browser.

Edit: and since you mention data grids, note also the lack of database support out of the box. You may be able to use existing libraries, but unless they are written in Lua, you may have trouble using them in smartphones.
mmanso
Prole
Posts: 12
Joined: Tue Feb 09, 2016 12:11 pm

Re: Using Love for an application which isn't a game

Post by mmanso »

Thanks all for the help.

Since love uses lua, I thought I could use some of the (many) libraries available.

I've been playing with an "Hello World" this afternoon and I made it run on my osx machine and on a android phone. This seems something simple but it's something that isn't possible with many technologies available (at least that I know of) and the simplicity of lua and love makes all this very tempting.

On the project I've in handle (a Point of Sale software) it's all about buttons, data grids and window modals. I understand nothing of this is available in love (because it was made for games) but I'm in the process of understanding if it's worth the effort.

wxLua was suggested for this kind of thing but I find no good information (as I found in love) that tackles development of different platforms, deployment to different architectures (etc etc).

Any suggestions, opinions, help, (etc etc) is much much appreciated.

Again, thanks a lot.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 0 guests