Using Love for an application which isn't a game

General discussion about LÖVE, Lua, game development, puns, and unicorns.
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 »

Unfortunately, Love doesn't receive expose (redraw) events. This means that you still have at least to redraw a canvas every frame.
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 »

pgimeno wrote:Unfortunately, Love doesn't receive expose (redraw) events. This means that you still have at least to redraw a canvas every frame.
Actually, in love.run, the graphics are cleared every frame. You could easily write a system that only draws a frame if something has changed.
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
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 »

Yes that's what I was hinting at. You could reduce the redrawing to a smaller amount. But it is still recommended to redraw often to remove artifacts as they appear.
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 »

When the window is partially or totally hidden, and then made visible again, if you don't redraw at that point then the previous contents of the window won't be there. Redrawing less often could be a workaround, yes, at the cost of a bit of responsiveness.
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 »

If the application runs on a device connected to a power socket, this Isnt an issue, correct?

When the app is paused on android it will be stoped and not spending any resourses, correct?
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 »

mmanso wrote:If the application runs on a device connected to a power socket, this Isnt an issue, correct?

When the app is paused on android it will be stoped and not spending any resourses, correct?
Yes to both, if programmed correctly.
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
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests