Sign in to follow this  
  • entries
    10
  • comments
    0
  • views
    3903

Holy Bloated XML Batman!

Sign in to follow this  
ElementCy

311 views

This weekend, I started to plan out on how to save the world data in chunks for my upcoming ProjectCube game. Just for fun and the simple fact it was easy to do, I tried saving a copy of the data using XNA's IntermediateSerializer. I knew it would be more bloated than something I could come up with myself, but wanted to see just how big it would be. After getting a test project setup and pouplated, I let it chunk thru the generating and saving of the level data for a region. A region in ProjectCubed consists of an array of 32x32 chunks, each chunk being 16x128x16 cubes. If you do the math, that is a grand total of over 33 million cubes (if every spot on the region is a cube.)

After it ran and saved the file, I just laughed and thought "Yea, I'm not using this." The file it saved was a whopping 780ish MB. Just for that small region, which ProjectCubed will be comprised of more than just 1 single region. After widdling away, and coming up with a nice and compact format, I took that 780MB file and got it down to a whopping 32MB. This is much more managable.

So in conclusion, IntermediatSerializer is great for something quick and small, not for a huge datastructure.

F6JP4E3V5eA

Source
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now