Extending with DLLs? Other librarys?

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
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Extending with DLLs? Other librarys?

Post by ljdp »

I'm optimistic about LÖVE.
However, it seems a bit limited, especially for a hobbyist.
Is it possible to extend the functions with external DLLs
and other librarys like wxLua?

Having an engine that's extendable would be brilliant.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Extending with DLLs? Other librarys?

Post by rude »

Of course. Lua has built-in support for that. It is not possible to load a DLL from inside the .love-file, however. That would break cross-platform-ness.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: Extending with DLLs? Other librarys?

Post by ljdp »

So i'm guessing I'd have to recomplile love?
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: Extending with DLLs? Other librarys?

Post by Merkoth »

Nope, not at all.

I'm not sure what rude meant, but my best guess is the fact that you can't just import the public symbols of some random DLL. What you can do, however, is to use lua extensions (or whatever they're actually called) like LuaSocket (that one's already buldled since 0.5.0, though). I'm not sure, but maybe you can get wxLua to work.

Just don't expect the wxWindow to be drawn inside you LOVE window :P
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Extending with DLLs? Other librarys?

Post by Kaze »

Just to clarify what rude said;
Lua modules are generally shared libraries, DLLs for Windows, SOs for Linux/OS X. DLLs don't work on Linux, SOs don't work on Windows.

Edit: And they don't work in .love files..
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Extending with DLLs? Other librarys?

Post by bartbes »

I thought that require looked in the working dir (and the install dir, etc), so you might be able to distribute a dll or so (still, not recommended) together with the .love.
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Extending with DLLs? Other librarys?

Post by Kaze »

Modules work when distributed with love+game.love executables too (not inside the love file).
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Extending with DLLs? Other librarys?

Post by rude »

bartbes wrote:I thought that require looked in the working dir (and the install dir, etc), so you might be able to distribute a dll or so (still, not recommended) together with the .love.
:monocle: Correct, as far as I know.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 5 guests