Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've just started with LOVE and LUA , i'm interested in LOVE because i want to play around with something different from my dayjob(i'm a webdeveloper) and since it uses LUA and is interpreted , i though it would be a great way to try out the API.

but i couldn't find how to run my .LÖVE game directly from the lua interpreter? i'm finding it bothersome to package the game each time i make a little test with the API.

share|improve this question
add comment

3 Answers 3

up vote 6 down vote accepted

LÖVE isn't as a library that you import into Lua. What it does is embed the Lua interpreter and expose its game functionality to that interpreter.

If you'd like to interactive play with the API, there's a couple of libraries built for debugging and live coding:

Source: https://love2d.org/forums/viewtopic.php?t=8537&p=52985

[EDIT] The debug function can also be useful in a limited context.

[EDIT EDIT] The love-console library was apparently built on an older version of LÖVE, but at least it's a starting point for building your own prompt.

If you're not specifically looking to work with Lua and a game-centric SDL-based framework, another fun one to try out is ruby-processing. It wraps JRuby, making it more convenient to access the Processing library, and has a mode where it will watch a sketch and recompile it every time you save the file. There's also a "live coding" mode but I haven't gotten it to work for me.

[EDIT x 3] Also look at PyProcessing. It has the advantage of having to not bundle JRuby, and can be imported into a standard python interpreter (provided you have all the dependency modules installed, which is Pyglet (which requires PyObjC on OS X).

share|improve this answer
add comment

To run a game you made in Löve2D, you have to drag its folder (the one containing the main.lua) to the Love2D executable. It's the easiest way to run it. If you want to export you game into an executable itself, you have to package the folder and embed it into the Love2D executable.

If you made a .love file, the same applies, just drag the .love file to the Love2D executable. Make sure main.lua is in its root folder, though. If you installed Love2D in your computer instead of running its portable version, you should be able to play it by just double-clicking the .love file though.

share|improve this answer
add comment

I'm not sure it counts as running it through the lua interpreter, but you should be able to run it without packaging:

On a terminal, navigate to the directory with your main.lua file, and just enter "love ."

I'm pulling that from memory, but this is where I found it originally: Love wiki

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.