Page 1 of 1

How to save and load? [Android-SDL2]

Posted: Sat Dec 19, 2015 1:07 am
by TheWaffleDimension
I need to know how to save and load files using Martin Fellis's android sdl. I know I have to do something with the identity in the config, but I'm not sure what.

Re: How to save and load? [Android-SDL2]

Posted: Wed Dec 30, 2015 12:59 pm
by Kasperelo
Yeah, I also need to know this, but I can't find it anywhere :huh:
I need to add unlocks and highscore to my game, so I need to be able to write and read files.

Re: How to save and load? [Android-SDL2]

Posted: Wed Dec 30, 2015 2:15 pm
by bobbyjones
It should be the same as desktop love. Does it not work?

Re: How to save and load? [Android-SDL2]

Posted: Wed Dec 30, 2015 5:48 pm
by Kasperelo
Where are the files you can edit and read saved?

Re: How to save and load? [Android-SDL2]

Posted: Thu Dec 31, 2015 12:14 am
by bobbyjones
You can use https://love2d.org/wiki/love.filesystem ... eDirectory to find the save directory. Once you do please post you findings. I can't find on the Android wiki or love wiki where that save directory is. I need to add that to the wiki.

Re: How to save and load? [Android-SDL2]

Posted: Thu Dec 31, 2015 12:34 am
by Nixola
On my system it's /data/user/0/org.love2d.android/files/save/? (where "?" is the identity or the name of the folder/.love); I wonder what happens for fused files with a different ID, would the path be the same with a different ID than org.love2d.android?

Re: How to save and load? [Android-SDL2]

Posted: Thu Dec 31, 2015 4:03 am
by bobbyjones
While I can find the save directory it seems the current way files are saved causes the files to be hidden in newer devices. So save functionality will work but you just won't be able to find the files you made.
https://bitbucket.org/MartinFelis/love- ... ether-save

Re: How to save and load? [Android-SDL2]

Posted: Sun Jan 03, 2016 1:39 am
by bobbyjones
I've made a PR to love which once it is accepted would make it possible for you to save your files externally rather than internally