Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 8 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:


[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

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

Here's what I did that works for quick running.

I created a main.lua file which has only one line


I put that file in a zip by itself, gave it the .love extension, and put it in the root of my project folder. Now, I can just double click that whenever I need to test.

Then, main2.lua is my actual main file. You don't even need to make the actual main file a proper module. Writing the love.load(), love.update(dt), and love.draw() functions will write to the global definitions.

share|improve this answer

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

If you're not "married" to a particular editor, I really recommend ZeroBrane Studio IDE: It's open-source, implemented in Lua itself (using wxLua), very lightweight but also very powerful and convenient.

ZBS allows you not only to re-run your code with a single keypress, but also to debug it and even do "live-coding" for Löve and a few other game frameworks.

I've been using it for a few weeks now, and can wholeheartedly recommend it.

share|improve this answer

Your Answer


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.