Hello!
Reading about love.filesystem on Love wiki, i saw that it creates a sandboxed environment and exposes only a subfolder (either Love\<game> for unfused or just <game> if fused) within %AppData% (C:\Users\<user>\AppData\Roaming) to be written by the game.
Althrough i'm okay with the sandbox aspect, i would like to know if there is a way to change the default save folder (on Windows only) from %AppData% to another Known Folder, like Documents/My Documents or even Saved Games (that should be the default for games to store save data at least until Windows 7). A little OCD trigger from my IT days seeing such kind of data being written under the AppData\Roaming folder.
There is a C/C++ function in Windows API that can fetch the path of such kind of "special" folder (since they can be moved around by the user), but i'm not proeficient enough in C/C++ to try to apply it via ffi and modify the love.filesystem to reflect this change (on Windows-only, of course).
Alternate Windows's save directory for love.filesystem
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Alternate Windows's save directory for love.filesystem
You can use a generic or a specific Lua library to handle other filesystem calls. That is, using LÖVE you are not constrained to use its functions alone.
However using a generic filesystem handling library comes with some issues such as different OS etc.
However using a generic filesystem handling library comes with some issues such as different OS etc.
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Re: Alternate Windows's save directory for love.filesystem
My ocd is equally triggered. This works on Windows. Not sure about other os.
https://github.com/EngineerSmith/nativefs
I test for the os the love file is using and if it is Windows then I save to my preferred location (not 'roaming') and if it's not Windows then use vanilla love.filesystem. I don't use those os so that doesn't trigger me. 8-)
https://github.com/EngineerSmith/nativefs
I test for the os the love file is using and if it is Windows then I save to my preferred location (not 'roaming') and if it's not Windows then use vanilla love.filesystem. I don't use those os so that doesn't trigger me. 8-)
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Alternate Windows's save directory for love.filesystem
I'd say you sadly can't realistically cater to every people's different wishes on this topic. I for one like to keep my data in one place, next to the application that uses it, but that doesn't play well with multi-user systems (besides the fact that i'm the only user of mine) nor "safeties" OS-es apply to your computer for your own benefit, considering the user is always wrong.
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: Alternate Windows's save directory for love.filesystem
I think nativefs is the way i would go. I asked the author if there is a way to, on Windows, to get the path of such special folders. Let's see if it already can be achieved or if they have the interest of implementing it.togFox wrote: ↑Mon Apr 22, 2024 1:05 pm My ocd is equally triggered. This works on Windows. Not sure about other os.
https://github.com/EngineerSmith/nativefs
I test for the os the love file is using and if it is Windows then I save to my preferred location (not 'roaming') and if it's not Windows then use vanilla love.filesystem. I don't use those os so that doesn't trigger me. 8-)
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests