Best method to save data (Serialized Tree output to file)

Hello,

I made a Game Asset class with a Manager and Game Assets. Basically a Game Asset class with a vector of children inside of more Game Assets. It works fine.

I'm trying to figure out the best method to serialize and output a vector of game assets to a file then read it properly. Recreating it.

I added a Serialize function to the Game Asset class that outputs its contents. If a child or many children are find the amount it added. Then recursively Serializes each child

The output of one is which I think is a prime candidate for output.

Skynet Skynet 0 0 0 0 0 0 0 2 0 { LCD LCD 0 0 0 0 0 0 0 0 } 1 { Motherboard Motherbard 0 0 0 0 0 0 0 2 0 { CPU CPU 0 0 0 0 0 0 0 0 } 1 { Memory Memory 0 0 0 0 0 0 0 0 } }

I'm looking to do a binary file of muiltiple lines. I use familiar words so it's easy to understand whats happening.

Binary file might include a identifier, node (length), data. node(length), data

Vivienne
Last edited on
0 are flags and data not set.
Topic archived. No new replies allowed.