LuaEclipse and LÖVE

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
Arthurio
Prole
Posts: 8
Joined: Sun Jul 12, 2009 7:12 pm

LuaEclipse and LÖVE

Post by Arthurio »

Hi I'm really new here. I was looking for a 2D game engine and found LÖVE. And it looks Awesome! :)

So I started thinking: how can I start off on the right foot ... looked around on the web and found LuaEclipse which sounds like the right tool for the job since I've always liked Eclipse.
I wrote down some notes for myself and then thought ... hey why not share them ... maybe someone else has the same problem as me.

I'm using: Windows, LÖVE binaries, eclipse, lua eclipse, ant, svn. Because I want to make a LÖVE game,
distribute it as an .exe and .love, I want to use the powerful features that eclipse provides
and I want to manage my source files with SVN.

1) Unpack eclipse (http://www.eclipse.org/downloads/)
2) Install Lua on eclipse (http://luaeclipse.luaforge.net/manual.html#installation)
3) Install Eclipse Java Development Tools (http://flashorbit.com/?p=155)
4) Install SVN on eclipse (http://subclipse.tigris.org/install.html)
5) Make a new lua project in eclipse
6) Make a "src" folder - this will contain all the game files such as .lua-s, graphics, sounds etc
7) Make a "love_binaries" folder
8) Make a "bin" folder - this will contain the executable
9) Put löve binaries into the love_binaries folder
10) Make a "src/main.lua" file
11) Make an ant build file "build.xml" in the root dir:

Code: Select all

<?xml version="1.0"?>
<project name="My Game" default="Run Game .love" basedir=".">

	<property name="project.name" value="My Game"/>
	<property name="src.dir" value="src"/>
	<property name="lovebin.dir" value="love_binaries"/>
	<property name="love.dir" value="love"/>
	<property name="bin.dir" value="bin"/>
	<property name="exe.name" value="mygame.exe"/>
	<property name="love.name" value="mygame.love"/>
	
	<target name="Make LOVE" description="Package the source files into a .love file.">
		<mkdir dir="${bin.dir}"/>
		<mkdir dir="${love.dir}"/>
		<zip destfile="${love.dir}\${love.name}" basedir="${src.dir}"/>		
	</target>
	
	<target name="Package Game" description="Package the game as an executable." depends="Make LOVE">	
		<copy todir="${bin.dir}">
			<fileset dir="${lovebin.dir}">
				<exclude name="love.exe"/>
				<exclude name="stdout.txt"/>
				<exclude name="stderr.txt"/>
			</fileset>
		</copy>
		
		<exec executable="cmd">
			<arg value="/c"/>
			<arg value="copy"/>
			<arg value="/b"/>
			<arg value="${lovebin.dir}\love.exe+${love.dir}\${love.name}"/>
			<arg value="${bin.dir}\${exe.name}"/>
		</exec>
	</target>
	
	<target name="Run Game .love" description="Run the game .love file" depends="Make LOVE">
		<exec executable="${lovebin.dir}\love.exe">
			<arg value="${love.dir}\${love.name}"/>
		</exec>
	</target>
	
</project>
12) use the "Run xx" button on the toolbar to play


Now there's just one thing: is it possible to get auto-complete working for the LÖVE functions?

edit: Obviously since it's eclipse, c++ programming part could be added for those who want to make their own .dll-s or build löve from scratch. But I'm not interested in that yet.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: LuaEclipse and LÖVE

Post by rude »

Cool.

Autocompletion can only be done for the love.module.function symbols. For objects (file:write, for instance) Eclipse can't possibly know the type of the object.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 8 guests