Posts

Showing posts with the label binaryformatter

Recommended process for saving Custom C# Classes (containing lists/arrays of various size) other than binaryformatter.serialize?

Recommended process for saving Custom C# Classes (containing lists/arrays of various size) other than binaryformatter.serialize? I would like users to be able to create grid-style 'maps' in my application, save them to disk and then share them with others. Among basic map data I would like the user to enter their name so as to 'claim' their work. For this to be a little bit more secure I was thinking of saving the map class (with the artists name, map dimensions, other useful options and the flat/2D array/list [delete as necessary]) into binary. So, XML's (being human readable) are probably not what I'm going to be using... but I'm not completely dead set against them yet, just cautious to stop 'stealing'. I've been using the BinaryFormatter.Serialize method, however as the size of my tiledata grows from 200*200 tiles to 300*300 tiles the time it takes to deserialize grows from 6.5 seconds to 33 seconds, and continues to increase in an exponent...