embedding love in other window

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
S-Rave
Prole
Posts: 39
Joined: Wed Feb 25, 2009 4:41 pm

embedding love in other window

Post by S-Rave »

Hello all, long time no see.

I want to embed a LÖVE player in a window other than the one in love.exe.
Is the code base designed for easy integration in other GUI tools, like Qt, wxWidgets etc?

If so, which classes are of interest?

Or maybe it's just a stupid idea to integrate an instantly updated player in another gui. Does the love player recognize that files have been changed while playing and inserts the updates the corresponding code blocks so you get instant feedback? (I mean, you use LuaJIT now, right? I don't know what implication this gives).

Because I remember in 0.4 where there was a restart command, which was removed some versions later for a "fast refresh". :(

(My main mission is to integrate löve in LightTable, if you have ever heard of it, or make a player with Runtime Compiled C++, however I'm unsure about code updates.)
(Sidenote: And what is liblove? I saw that it's in 0.9 but the liblove github readme just says "helper utilities" without specifying anything. :( )

(Also 5+ years a member! WOO! :D)
srejv
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: embedding love in other window

Post by slime »

S-Rave wrote:I want to embed a LÖVE player in a window other than the one in love.exe.
Is the code base designed for easy integration in other GUI tools, like Qt, wxWidgets etc?
Not really, I don't think it was ever designed with that in mind. SDL has the function SDL_CreateWindowFrom, but LÖVE doesn't call it, and LÖVE uses SDL's OpenGL context creation API which isn't compatible with SDL_CreateWindowFrom yet (as of SDL 2.0.3) I think.
S-Rave wrote:Or maybe it's just a stupid idea to integrate an instantly updated player in another gui. Does the love player recognize that files have been changed while playing and inserts the updates the corresponding code blocks so you get instant feedback? (I mean, you use LuaJIT now, right? I don't know what implication this gives).
LÖVE has the [wiki]love.filesystem.getLastModified[/wiki] function, which allows you to write code (for example, code to reload the file) which is executed when a file is updated, so yeah it can do that - there are a few libraries on the forums which take advantage of that I think. Here's one: viewtopic.php?f=5&t=77409
S-Rave wrote:Sidenote: And what is liblove? I saw that it's in 0.9 but the liblove github readme just says "helper utilities" without specifying anything. :(
liblove is [wiki]love[/wiki] (the module) - it's a Lua-C library which gets required by the (very small) love executable. It's separate from the executable as of 0.9 so you can use love in another Lua interpreter. I think the liblove you've found on github is not related to the actual liblove. :)
User avatar
S-Rave
Prole
Posts: 39
Joined: Wed Feb 25, 2009 4:41 pm

Re: embedding love in other window

Post by S-Rave »

Sweet, lume seems to be the thing I'm looking for! :D Thank you, slime. :]]]
srejv
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests