Love Command-line How-To

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
sanyaade
Prole
Posts: 3
Joined: Sun Sep 21, 2008 3:19 pm

Love Command-line How-To

Post by sanyaade »

Hi All,

Good day to everybody!

I am a newbe here and I am trying to use Love 2D with my 14-16 year Students. My Questions are:

1.) Is it possible to run Love 2D within and ide? For example from within Scite or any ide like compile and run mode.

2.) Is there any information on running Love 2D from command-line? If so where can I find the information?

We are using Windows XP

Any pointer, guide-lines, advices, examples will be highly appreciated.

Thanks in advanced and Happy Xmas!

God blesses!!!

Best regards,
Sanyaade
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Love Command-line How-To

Post by Kaze »

sanyaade wrote:Hi All,

Good day to everybody!

I am a newbe here and I am trying to use Love 2D with my 14-16 year Students. My Questions are:

1.) Is it possible to run Love 2D within and ide? For example from within Scite or any ide like compile and run mode.

2.) Is there any information on running Love 2D from command-line? If so where can I find the information?

We are using Windows XP

Any pointer, guide-lines, advices, examples will be highly appreciated.

Thanks in advanced and Happy Xmas!

God blesses!!!

Best regards,
Sanyaade
Command-line:

Code: Select all

love.exe "folder, zip or .love"
IDE:
Notepad++. Take a look at http://love2d.org/forum/viewtopic.php?f=4&t=235
sanyaade
Prole
Posts: 3
Joined: Sun Sep 21, 2008 3:19 pm

Re: Love Command-line How-To

Post by sanyaade »

Thank you Kaze! Thank you everybody!

I have tried the .love command-line with some of the examples/demos but does not work. The folder command-line seem to work once but in most cases I get error --> Game (F:\Love2D\LOVE\example1.love) does not exist." but the file does exist and same with other tried files. Some of the files are actually those that case with the Love package.

Is there anything I am doing wrong?

Is there documentation or any text on running love from command-line that I could consult or do I have to consult the Lua documentation on Lua website? I went through the love 5.0 document but I could find anything or command-line.

I will like to start using Love with the students by 5th of January 2009, so I am ready to learn and explore.

Thank you for your support.

God blesses!!!

Best regards,
Sanyaade
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: Love Command-line How-To

Post by Merkoth »

Hi sanyaade, welcome to this lövely forum :)

I'm not aware of any documentation on the topic and the Lua docs will not contain any clues since command-line parameters are managed by LÖVE itself and not Lua.

Now, as Kaze said, LÖVE expects its parameters in one of the following forms:

Code: Select all

love.exe my_game.love
or

Code: Select all

love.exe my_game_directory
On my tests (on Windows), LÖVE seems to do fine with stuff like

Code: Select all

love.exe demos/no.love
but fails to open stuff like

Code: Select all

love.exe C:\Program files\LOVE\demos\no.love
But Kaze's link seems to suggest otherwise, so colour me confused :P
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Love Command-line How-To

Post by Kaze »

Merkoth wrote: but fails to open stuff like

Code: Select all

love.exe C:\Program files\LOVE\demos\no.love
Program files, there's a space, so it takes it as two arguments. It needs to be in quotes like this:

Code: Select all

love.exe "C:\Program files\LOVE\demos\no.love"
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: Love Command-line How-To

Post by Merkoth »

I fail at Windows, period. Thanks :)
sanyaade
Prole
Posts: 3
Joined: Sun Sep 21, 2008 3:19 pm

Re: Love Command-line How-To

Post by sanyaade »

Thanks Merkoth! Thank you everybody!,

Merkoth, I think it is the path problem as I am investigating now. I did the following and got the following errors:

Case 1.) On Windows XP:
1: I copy the love program to f:\love, then I run the cmd and cd to f:\love
2: I copy the animations.love from the demos folder to love directory then I issue the command:-

Code: Select all

 love.exe animations.love 
I got the stderr:- Game (F:\love/love) does not exist. It seems to be appending extra folder argument to itself. If I cd to F:\ (root drive) and I issue the same command:-

Code: Select all

 love.exe animations.love 
then the love program starts up and about to show its window but then died, the stderr was:- Game could not be loaded. By suprise if I drag the file --> animations.love onto the love.exe, it runs smoothly but I dont know how it works internally (know this may help). But we definitely having path level problems here!

3.) I am going to download more love packages (may be perious ones -> just to see if command-line used) and current source code to see the API and the extern interface, hopefully the problem will surface.

Thanks in advanced!!!

God blesses!!!

Best regards,
Sanyaade
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: Love Command-line How-To

Post by Merkoth »

Maybe I'm missing something, but if love.exe is located in f:\love\, calling love.exe from the root directory shouldn't be possible at all :shock:

By the way, the LÖVE installer automatically binds the .love file extension to love.exe, maybe you can use that? It'll be kind of annoying for your students though, having to create a zipfile and rename it each time they want to try their projects.

In any case, I strongly suggest to follow Kaze's advice and use Notepad++ as shown in the link he posted before. Notepad++ is a feature-packed, free open source text editor. IMO, it's also easier to configure than SciTE.
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Love Command-line How-To

Post by Kaze »

All of these worked for me: (Windows XP)

Code: Select all

C:\Program Files\LOVE>love.exe "J:\Lua\LOVE\Text box.love"

C:\Documents and Settings\Compaq_Owner>"%ProgramFiles%/LOVE/love.exe" J:\Lua\LOVE\test.love

-- I copied the LOVE directory to the J drive
J:\>"LOVE/love.exe" Lua/LOVE/test.love

J:\LOVE>love.exe ../Lua/LOVE/test.love
J:\LOVE>love.exe J:\Lua/LOVE/test.love
No problems for me.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests