Concerning distribution and multiple files

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
User avatar
Applefoot
Prole
Posts: 3
Joined: Sat Jul 14, 2012 3:58 pm

Concerning distribution and multiple files

Post by Applefoot »

Hey, Love community!

I'm working on a moderately sized project and I've got a few quick questions. I noticed that it's suggested that I compile the game into a .exe and distribute that along with some .dlls in a .zip file. However, many games are distributed with many files (art and sound assets, I think) in folders accompanying the .exe. Can Love do this? (and more importantly, what are the benefits of doing this?)

Another semi-related concern I have has to do with config (.cfg) files. If I plan to have adjustable settings via a config file (or even simply saving and loading user data), can I create and write onto files in the directory that contains my compiled .exe? I've read about reading/writing in the %appdata folder, but is it possible to do that elsewhere?

Thanks for your time :awesome:
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Concerning distribution and multiple files

Post by Robin »

Welcome! As a first time poster, you had to wait for someone on the inside to verify you're not a spambot. This situation very unfortunate, but it is what it is.

Anyhow, as to your first question:
Applefoot wrote:However, many games are distributed with many files (art and sound assets, I think) in folders accompanying the .exe. Can Love do this? (and more importantly, what are the benefits of doing this?)
No, not as such. Assets and whathaveyou are distributed in the .love file, which is often "hidden" in the .exe. I wouldn't say there are really benefits or downsides to that approach. Putting things in folders makes it easier to rip art, I guess, which you might or might not want to encourage. Still, you can open the .exe with an archive reader and extract the art that way.
Applefoot wrote:If I plan to have adjustable settings via a config file (or even simply saving and loading user data), can I create and write onto files in the directory that contains my compiled .exe? I've read about reading/writing in the %appdata folder, but is it possible to do that elsewhere?
Not really. It has to do with rights. It is generally a bad idea to mess around and write data to places where you want to run programs, because that opens up programs for abuse.

It's a bit late here, though, so maybe someone else can explain these things better than I can right now.
Help us help you: attach a .love.
User avatar
Applefoot
Prole
Posts: 3
Joined: Sat Jul 14, 2012 3:58 pm

Re: Concerning distribution and multiple files

Post by Applefoot »

Unfortunately I skipped reading the message about the verification the first time I posted :P , I felt a little embarrassed when I caught it the second time.

I figure that having everything in one .exe file meant that it would load every art and sound asset as soon as I ran it, while having them in folders allowed for control over when to load which files. However I had no basis for that assumption and I'm glad to hear that it's not a matter of efficiency.

I'm a little disappointed to hear that I can't write/read data to/from a more accessible place, but I suppose it's not a very big deal at all. Perhaps I can write a program that configures a .cfg file in %appdata and simply distribute that application along with my game .exe.

One other thing came to mind about Love though. I know that I have control over the name that shows up at the top of the window (and I assume the icon as well, when I work on that later), but is it possible to change the name which the program uses in the processes tab under the Windows Task Manager? It defaults to love.exe. While it's easy for me to know that refers to my game, it may not be as apparent for other users.

Thanks again!
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Concerning distribution and multiple files

Post by Robin »

Applefoot wrote:I figure that having everything in one .exe file meant that it would load every art and sound asset as soon as I ran it, while having them in folders allowed f control over when to load which files. However I had no basis for that assumption and I'm glad to hear that it's not a matter of efficiency.
I'm... not sure about that really. I guess that depends whether running a program loads the whole file into memory, or only the parts it needs. That might be different for different operating systems.
Applefoot wrote:Perhaps I can write a program that configures a .cfg file in %appdata and simply distribute that application along with my game .exe.
Or you could have the game do that. I don't know how complex the configuration options are going to be, but if it's mostly checkboxes, sliders and simple text entry, you could write a GUI in LÖVE (there are multiple libraries for that).
Applefoot wrote:One other thing came to mind about Love though. I know that I have control over the name that shows up at the top of the window (and I assume the icon as well, when I work on that later), but is it possible to change the name which the program uses in the processes tab under the Windows Task Manager? It defaults to love.exe. While it's easy for me to know that refers to my game, it may not be as apparent for other users.
Isn't that just the filename? Because if you distribute your game as a .exe, you can change that name to whatever you want.
Help us help you: attach a .love.
User avatar
Applefoot
Prole
Posts: 3
Joined: Sat Jul 14, 2012 3:58 pm

Re: Concerning distribution and multiple files

Post by Applefoot »

Robin wrote:Or you could have the game do that. I don't know how complex the configuration options are going to be, but if it's mostly checkboxes, sliders and simple text entry, you could write a GUI in LÖVE (there are multiple libraries for that).
I could totally do that in the game for sure. I've just never been a fan of having to restart the game for my options to take effect. I'd much rather configure beforehand or afterwards. I suppose it's just a personal thing :P.
Robin wrote:Isn't that just the filename? Because if you distribute your game as a .exe, you can change that name to whatever you want.
You're right! It absolutely is just the filename. I had been testing my game by dragging the folder to the shortcut, but when I tried it with the distributable .exe, it worked just fine. That was silly.

Again, I much appreciate your help.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Concerning distribution and multiple files

Post by Robin »

Applefoot wrote:I've just never been a fan of having to restart the game for my options to take effect.
Depending on the things you want to configure, you could make it so that changes take effect immediately, without restarting the game. :)
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests