Passing parameters in game distributions

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
2dlover
Prole
Posts: 2
Joined: Sat Sep 19, 2015 12:14 pm

Passing parameters in game distributions

Post 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.
Rickton
Party member
Posts: 128
Joined: Tue Mar 19, 2013 4:59 pm
Contact:

Re: Passing parameters in game distributions

Post 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).
Possession - Escape from the Nether Regions, my roguelike made in LÖVE for the 2013 7-Day Roguelike Challenge
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
2dlover
Prole
Posts: 2
Joined: Sat Sep 19, 2015 12:14 pm

Re: Passing parameters in game distributions

Post by 2dlover »

Hi Rickton,

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

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 224 guests