I want to store game data like highscores or something but i.e the love.filesystem.write won't work. Is this a problem of the path I use?
"/mnt/sdcard/Android/data/com.ratchet.gamename/filename.txt"
How to save/load data to/from file?
How to save/load data to/from file?
macOS 10.14 Mojave | LÖVE 11.2
Re: How to save/load data to/from file?
I just think that love.filesystem simply isn't implemented yet. Just wait for it.
Also, writing to the sdcard is probably not what you want. It requires special permissions if you make your game standalone. It's better to use folders that the Android system gives each app for smaller files like settings, high scores etc.
Also, writing to the sdcard is probably not what you want. It requires special permissions if you make your game standalone. It's better to use folders that the Android system gives each app for smaller files like settings, high scores etc.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: How to save/load data to/from file?
What if I need to load custom files from the user, for example, custom maps, or custom <insert_here_something>?T-Bone wrote:I just think that love.filesystem simply isn't implemented yet. Just wait for it.
Also, writing to the sdcard is probably not what you want. It requires special permissions if you make your game standalone. It's better to use folders that the Android system gives each app for smaller files like settings, high scores etc.
With Lua IO procedures I can do this on PC quite easy, but on Android? Can't i just io.open("/mnt/sdcard/something.map", "r")?
I need to test on my device...
Re: How to save/load data to/from file?
It could work, just make sure you have permission to read the sdcard.Username wrote:What if I need to load custom files from the user, for example, custom maps, or custom <insert_here_something>?T-Bone wrote:I just think that love.filesystem simply isn't implemented yet. Just wait for it.
Also, writing to the sdcard is probably not what you want. It requires special permissions if you make your game standalone. It's better to use folders that the Android system gives each app for smaller files like settings, high scores etc.
With Lua IO procedures I can do this on PC quite easy, but on Android? Can't i just io.open("/mnt/sdcard/something.map", "r")?
I need to test on my device...
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: How to save/load data to/from file?
Would be great to see this working in the near future. I guess love is great for making stuff for android but quite useless if you even can't store the player's name
macOS 10.14 Mojave | LÖVE 11.2
Who is online
Users browsing this forum: No registered users and 5 guests