I'd like to store some volatile data on the device. This is data that my game uses or creates. This data is not required to play the game, but it helps the game somehow. It can be logs or any pre-processed files that helps the game to run faster on the 2nd attempt.
Obviously it should be platform independent. So, in Windows it will point to %temp%\LOVE, in Android and iOS it should point to the proper location, so when I empty the cache of the game, the data will be removed.
Is there any possibility to do it. If so, how?
Access temporary / cache folder?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Access temporary / cache folder?
Visual Studio Code Template • RichLÖVE Mobile (AdMob+UnityAds+PlayGamesServices+GameCenter) • Add me on Discord
───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░█░░░░░█░░█────
─▄▄──█░░░▀█▀░░░█──▄▄─
█░░█─▀▄░░░░░░░▄▀─█░░█
───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░█░░░░░█░░█────
─▄▄──█░░░▀█▀░░░█──▄▄─
█░░█─▀▄░░░░░░░▄▀─█░░█
Re: Access temporary / cache folder?
Love2d has a dedicated save folder which is the only folder you can write to with love.filesystem. The location is platform independent (so different paths for different systems).
You can just create a temp folder there and clear it regularly.
Exactly what you're asking for isn't possible with love. You'll need standard lua io functions and / or libraries.
You can just create a temp folder there and clear it regularly.
Exactly what you're asking for isn't possible with love. You'll need standard lua io functions and / or libraries.
Who is online
Users browsing this forum: Google [Bot] and 228 guests