Monday, January 9, 2012

Why must i Serialize?

I am sure there are good reasons for this. I am sure if i could be bothered to search the web i would find more information about serializing my saved data out.

BUT I DON'T WANT TO!

I have been developing games now for so many years (ok, so it's approximately 30). I have never really needed this functionality before. In fact i view all variables and classes and structs etc as simply a layout of memory. after all my first games language was machine code, typed into a monitor.

I just want to save my binary data. that's all. Nothing fancy. then later i want to load it back in. I know what type it is, i know kind of pointer to point at it for it to make sense.

The recent games we just got out the door at Mass Media don't serialize their data out. Nope, in fact they simply save bits and nibbles and bytes etc for information. as packed as we can make them. then when we load the data back in we parse this information. Oh so primitive.

There is only one reason i think that makes sense for serialization to exist (that i can think of at this time), and that is to avoid diferent hardware reading issues. So i guess that would mainly mean byte ordering. I am not sure my small games, or anyones is likely to run into this problem, but maybe that is why it seems we have to do this kind of thing.

My current situation is one where i have generated some nice binary data blocks that are my levels descriptions. I saved them out easily enough, but now i am not quite sure how to load them back in. Ok, let me be more clear. I can of course load them back in on the PC, thru Marmalades simulator. But if i deploy to android i need to make sure these files also go onto the Android device. If i could get this working, i am sure it will help when the time comes to let players create their own levels.

Ok, i am tired, still got my head cold. So i am off to bed to ponder this situation more.

Good night,
Da Voodoochief

No comments:

Post a Comment