Saving question regarding streams....

BlitzMax Forums/BlitzMax Beginners Area/Saving question regarding streams....

Ryan Burnside(Posted 2009) [#1]
I know how to work with streams but I'm a bit puzzled by being able to save an object. What is saving an object? What kind of parameters does this take. It would be really nice to be able to just save any custom object in the game to file for later use but I assume this is not what it means.


tonyg(Posted 2009) [#2]
I *think* the use of the word 'object' in the doc is misleading. The streams are looking for a stream object rather than a type object.
Sorry if I have misunderstood.
There is some code in the archives to output type data via a stream using reflection.


Ryan Burnside(Posted 2009) [#3]
Thank you. Do you think it might be possible to save an entire game state if I created a Game type as a wrapper using the code from the archives?


plash(Posted 2009) [#4]
Brucey's Persistence module should do that quite easily for you.