Löve is a simple and powerful framework for developing 2D games in Lua, which makes it a natural fit to support in ZeroBrane Studio. The just released version of ZeroBrane Studio (v0.30) implements debugging and auto-complete support for löve scripts; the video below demonstrates these capabilities (you may need to switch the video to 720p to make the text more readable):
To enable the integration shown in the demo, you need to do few things:
Copy the debugger ((This step is no longer needed if you use ZeroBrane Studio v0.31 or later)
src/lualibs/mobdebug/mobdebug.lua) to the folder with löve executable (in the demo it is
if arg[#arg] == "-debug" then require("mobdebug").start() endline to your script somewhere inside
love.load(arg)function. This will allow you to use
Project | Runcommand to run the application and
Project | Start Debuggingto debug your application.
- Select love2d as an interpreter in ZeroBrane Studio going to
Program | Lua Interpreters | Love2d. In addition to enabling debugging, it will also turn on auto-complete for löve API calls. If löve executable is in the same folder where your game folders are or in one of the folders listed in
PATH, it will be found by the IDE. If the executable is in a different location, you may need to specify this location in
cfg/user-sample.luafor details on how this is done).
You can now open
main.lua file from your project in the IDE and work with your creation.