Saving data. SaveState v databuffer future?

Monkey Forums/Monkey Programming/Saving data. SaveState v databuffer future?

pantson(Posted 2013) [#1]
Hi
I have created a simple class that allows me to read and write variables and arrays into the games state (using LoadState and SaveState)
This works seamlessly for small ammounts of data, but if I wanted to write game generated image files to the save state, it takes ages to read and write (and probably as its a string there are limits)

Is there a quicker more standard way to this?
Will the databuffer contain a save method any time in the future?


NoOdle(Posted 2013) [#2]
a save method for data buffers would be very helpful!


Paul - Taiphoz(Posted 2013) [#3]
I think to keep things as cross platform as possible that savestate is all we have at the moment, I am also sure but may be wrong that save state does indeed have a limit on its size but this limit may differ depending on the target.

Saving images for example is something outwith its intended use, thats not to say you cant do it, but that its just not something it was intended to be used for.

having a davedata for windows, linux, and mac would be nice, I think you enter a big gray void though when thinking about doing stuff like that on mobile devices, would be nice though having or being able to save and load dynamic content would be cool.


Dima(Posted 2013) [#4]
I noticed with more recent version of Monkey (I have v67) there is a brl.filestream module which allows file access when targeting cpp, java, and c# languages. That pretty much covers most targets but html5 and flash.


pantson(Posted 2013) [#5]
Thanks for the replys.

I should say I am on v67b at the moment.
Dont think its a show stopper, just wondered if anyone had implemented anything better


EdzUp(Posted 2013) [#6]
This http://www.monkeycoder.co.nz/Community/posts.php?topic=1395 might be what your looking for :D