Page 1 of 1

Passing parameters in game distributions

Posted: Sat Sep 19, 2015 12:22 pm
by 2dlover
Hi there,

First of all I have to say that I love Love2d and this is forum is being a great help during the learning process.
I came across a little issue and now I am wondering if it's possible to do what I want to :)
I am making a little tool to edit sprites in Love2d. While developing it I could pass a parameter with a file name no problem.
The question is that whenever I create the .love and try to do something like this :

$ ./love.app/Contents/MacOS/love editor.love file.dat

it doesn't work anymore. I see a flashing window and back to the command line. Is it possible to use parameters in distributions?
Thanks in advance.

Re: Passing parameters in game distributions

Posted: Sat Sep 19, 2015 3:44 pm
by Rickton
For OS X (and probably Linux too), you'd probably have to make the app actually run a shell script that calls LÖVE with the parameters.
I think for Windows you can do that with a batch (.bat) file. (Not sure, someone correct me if I'm wrong).

Re: Passing parameters in game distributions

Posted: Sat Sep 19, 2015 4:48 pm
by 2dlover
Hi Rickton,

Thanks very much for your reply. I actually ended up using the LUA io class and it worked! :)