How to save and load? [Android-SDL2]
-
- Prole
- Posts: 14
- Joined: Wed Dec 02, 2015 11:14 pm
How to save and load? [Android-SDL2]
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]
Yeah, I also need to know this, but I can't find it anywhere
I need to add unlocks and highscore to my game, so I need to be able to write and read files.
![Huuh... :huh:](./images/smilies/ms-huh.png)
I need to add unlocks and highscore to my game, so I need to be able to write and read files.
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: How to save and load? [Android-SDL2]
It should be the same as desktop love. Does it not work?
Re: How to save and load? [Android-SDL2]
Where are the files you can edit and read saved?
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: How to save and load? [Android-SDL2]
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]
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?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: How to save and load? [Android-SDL2]
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
https://bitbucket.org/MartinFelis/love- ... ether-save
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: How to save and load? [Android-SDL2]
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
Who is online
Users browsing this forum: No registered users and 82 guests