I would like to write a program with the minko Game engine.
Is it possible to write in the assets folder at runtime? Is there some kind of key value store provided by the engine?
Is it possible to write in the assets folder at runtime?
Yes, technically. You should be able to use classic C/C++ file system operations to write to the folder, just like we read from it.
However, there is no guarantee that data will persist next time you run the application. In HTML5 for instance, it definitely won't. I'm not sure how it would behave on mobile, and I'm pretty sure that's forbidden on the App Store anyway.
Is there some kind of key value store provided by the engine?
No, there is no persistent data storage in Minko. If persistence is not needed, you can use the AssetLibrary
to store your assets, or a simple std::map
. That would be pure C++, therefore cross-platform.
A key-value storage might be a great addition to the engine. There is already a JSON parser which might be enough for small data. You will need to implement the persistence layer on the platform you target (hard-drive on native desktop, vendor-specific directories on native mobile, Local Storage in HTML5...).