What Lua libraries are included in Love 0.8.0?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
fuxoft
Prole
Posts: 3
Joined: Mon Jan 07, 2013 2:28 pm

What Lua libraries are included in Love 0.8.0?

Post by fuxoft »

Hello,

I have probably the opposite problem than most of people here. I already know Lua very well, I've been using it for many years, but I don't know almost anything about LOVE. I've been reading the Wiki and understand most of the LOVE libraries but I cannot find some of the most basic things. For example, I'd like to know which libraries are included in the default LOVE and what parts (if any) of the plain standard Lua are missing in LOVE or are implemented in a different way.

For example, by a mere accident, I found out that luasocket is included in LOVE. I also saw a LOVE example with string.find() function being called - neither of those is part of standard Lua. Is there some kind of basic list with ALL the extensions that are included in LOVE and are not part of default Lua? For example, bitwise operations, HTTPRequest library...?

Also, is there an official system to package custom compiled (i.e. not pure Lua) modules in Lua games? Or are all the modules mentioned LOVE pages written in pure Lua?

Thanks
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: What Lua libraries are included in Love 0.8.0?

Post by slime »

LÖVE includes standard Lua 5.1, luasocket, and its own love.* API. Nothing else. string.find is a standard Lua string library function.

You can use third party compiled Lua libraries with LÖVE (such as bitop), although the require function is only able to load compiled libraries which are in the game's save directory, the other default Lua require paths, and in the current working directory set when LÖVE is launched.

Additionally, if a LÖVE game is not in fused release mode, LÖVE's require will only look for compiled libraries which exist in %appdata%\LOVE\ (or equivalent, depending on OS) or the working directory or the other default Lua require paths, not in %appdata%\LOVE\gamename\, for security reasons.
fuxoft
Prole
Posts: 3
Joined: Mon Jan 07, 2013 2:28 pm

Re: What Lua libraries are included in Love 0.8.0?

Post by fuxoft »

Thanks! I saw string.find() used in a way where string.match would be better and I thought it's some kind of weird synonym. I totally forgor about Lua's string.find, sorry.

Is there a thread where the future of LOVE is discussed, e.g. what feature can be expected from the next version? For example, what about the switch to Lua 5.2?
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: What Lua libraries are included in Love 0.8.0?

Post by slime »

fuxoft wrote:Is there a thread where the future of LOVE is discussed, e.g. what feature can be expected from the next version? For example, what about the switch to Lua 5.2?
My personal preference (which I believe many of the LÖVE developers share) is that the next language change LÖVE will get is a switch to LuaJIT instead of Lua 5.2. LuaJIT is orders of magnitude faster, includes an FFI, and has many Lua 5.2 features to boot, while still being a drop-in replacement for Lua 5.1.

You can find an incomplete list of some of the upcoming changes scheduled to be released with LÖVE 0.8.1 here. You can also check out the (not so large yet) commit-log for 0.9.0. Beyond the 0.8.1 changelog/commits and the existing 0.9.0 commits, nothing is certain. ;)
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: What Lua libraries are included in Love 0.8.0?

Post by Lafolie »

Hopefully soon we can add enet to this list!
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 6 guests