Using Love for an application which isn't a game

General discussion about LÖVE, Lua, game development, puns, and unicorns.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

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

Post by bobbyjones »

If you want to use lua to write an application I personally think love is one of the better choices. Many of the dedicated gui libraries for lua suck. They generally lack documentation and expect the user to have more knowledge than they need. In love using the various gui libraries you have complete control over the appearance and functionality of your app. Love is also much much more simpler than libraries like wxLua.
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 »

What do you mean with "the various gui libraries" ? Can you mention one or two just for me to know what you're mentioning?

Thanks.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

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

Post by bobbyjones »

Loveframes, Luigi, suit, or Adn's 2 libraries. There is a ton of gui libraries and one would surely fit your need.
paulclinger
Party member
Posts: 227
Joined: Thu Jun 28, 2012 8:46 pm

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

Post by paulclinger »

@mmanso, I can only speak about wxlua a bit. I've been developing a cross-platform Lua IDE and it has been fairly straightforward process, although there are some differences to keep in mind (as wxwidgets toolkit that wxlua is based on is trying to keep "native" look on platforms it supports). I have it working on Windows, OSX, and Linux (with separate packages for each platform), but I structured the repository in a way that allows to run the application from a cloned copy on each of the platforms.

If you want to look at some of the examples, I found wxlua samples to be useful to see the capabilities it supports, although the default look and feel is a bit outdated, it's possible to make it more "modern" with few tweaks. You can use the the IDE I mentioned earlier to run those examples as it already includes compiled wxlua libraries (or you can build one from scratch). Paul.
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 »

Gööi is a GUI library specifically designed for Android.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

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

Post by T-Bone »

The main problem, as I see it, is performance. Löve is designed for games. That means that it will take as much resources as it can, to stay fast and responsive. On mobile devices, using this for normal apps will lead to excessive battery drain and an inferior multitasking experience.
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 »

@T-Bone: from what I've seen in the docs, you can disable a lot of things you don't need (like joystick handling for example). I don't know if in the end of that process Love will be "less" performant and save more battery but for the project I'm trying to tackle, that's not really a big issue.

Being cross platform with the same codebase is the priority.

@bobbyjones: I think those libraries have enough for the project I've in mind.

I'll play around with all this a bit to try and decide in the end what to do...

Thanks a lot.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

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

Post by bobbyjones »

T-Bone wrote:The main problem, as I see it, is performance. Löve is designed for games. That means that it will take as much resources as it can, to stay fast and responsive. On mobile devices, using this for normal apps will lead to excessive battery drain and an inferior multitasking experience.
How could it use less resources? I would think that this all would be determined from the way the program is coded.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

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

Post by T-Bone »

bobbyjones wrote:
T-Bone wrote:The main problem, as I see it, is performance. Löve is designed for games. That means that it will take as much resources as it can, to stay fast and responsive. On mobile devices, using this for normal apps will lead to excessive battery drain and an inferior multitasking experience.
How could it use less resources? I would think that this all would be determined from the way the program is coded.
The underlying framework makes many decisions based on how it think its applications will work. A normal UI framework is much better at releasing resources when they're not used, and does less work when idle. An obvious example is that normal UI frameworks generally only redraws the screen when something changes, whereas a game framework redraws every frame. The latter is fully reasonable for a game, but for a normal app (which might be running in the background for long periods of time) that's far from ideal. Normal UI libraries are also better at using the OS' built-in functionality for many things (which game engines cannot do, to keep things flexible).
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

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

Post by bobbyjones »

But the redraw every frame thing can be configured by the user by changing love.run. And the memory usage thing is probably would be an issue with Lua side code. Which is dependent on the programmers ability. I don't think there is much difference from just using wxLua or using love. The main difference would be how you draw your GUI. I believe that you can probably(if you tried hard enough) get a love application that is just as performant as luaWx. There are more benefits than there is drawbacks IMO. For example spotify on desktop uses Electron iirc. Because it uses Electron it allows them to customize their UI to exactly how they want it to look. Using wxLua or another Lua GUI library would make things difficult IMO. I doubt Spotify could be made with WxLua.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest