Changing the save directory
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Changing the save directory
-
Last edited by Bicentric on Tue Jun 19, 2018 7:30 pm, edited 1 time in total.
- ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
- Contact:
Re: Changing the save directory
The string you use for the identity will be the name of the directory where LÖVE will write your files. However, LÖVE has restrictions on where you can work with files. It only allows you to write files in the 'save directory' which uses the name of the identity. But the location of that directory depends on the operating system and you cannot do something like try setting the identity to an absolute path. This page has more details about LÖVE and files:
http://love2d.org/wiki/love.filesystem
http://love2d.org/wiki/love.filesystem
Re: Changing the save directory
-
Last edited by Bicentric on Tue Jun 19, 2018 7:30 pm, edited 1 time in total.
- ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
- Contact:
Re: Changing the save directory
There is nothing you need to do in order to save files on different operating systems. LÖVE knows where to put them and hides a lot of those details when reading and writing files so that you don’t have to worry about it. If you want to know where those directories are you can use the functions I mention below.Bicentric wrote:With that being said I change my original question, what would be the best way of saving files to a directory across both operating systems?
As far as I know you can’t do that, but I could be wrong. You can use love.filesystem functions to get information about absolute paths, e.g. anything in the form of love.filesystem.get*Directory(). But you can’t use that to start saving your files in those directories.Bicentric wrote:Or is there a way to overcome this and be able to save my files to an absolute path?
Re: Changing the save directory
This system is bad: impossible to make utility programs.
Re: Changing the save directory
You can always use lua filesystem functions on top of anything that LÖVE offers.
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Re: Changing the save directory
as was mentioned, you can use lua's io or change love's source to add this functionaity
but, why you want to use game framework to make programs?
aren't there no tools for that?
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Changing the save directory
Maybe because someone wants to? I do that too because it's still simpler than learning anything new to code a non-game app.
Also, you can use NativeFS that's been rehosted here: https://github.com/EngineerSmith/nativefs
(also gg bumping a thread from 2013)
Also, you can use NativeFS that's been rehosted here: https://github.com/EngineerSmith/nativefs
(also gg bumping a thread from 2013)
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Changing the save directory
zorg wrote: ↑Sun Jan 30, 2022 11:19 am Maybe because someone wants to? I do that too because it's still simpler than learning anything new to code a non-game app.
Also, you can use NativeFS that's been rehosted here: https://github.com/EngineerSmith/nativefs
(also gg bumping a thread from 2013)
like something bad(also gg bumping a thread from 2013)
Re: Changing the save directory
Thanks all of you.
Who is online
Users browsing this forum: Bing [Bot] and 3 guests