Sign in to follow this  

Custom map format for large maps

Recommended Posts

RyxiaN    137
I program in C# SlimDX, but this might be more of a generic game programming question, so move if if it's appropriate.

Anyway, I'm creating a world editor, and I've gotten stuck on how I should save the map to a file. Tehcnically this wouldn't be a problem if the maps weren't so large. But the maps will be larger than I expect will fit in memory all at once, so I need to know where the patches/quads are located in the file.

I first saved the ground information (height and texture-weights of each vertex) of each patch just after each other, and I knew were the patches were located. But now I realized that I won't be able to load information about static meshes and objects at the same time either, cause it's just gonna be too much. So now I don't know where to store the data about static meshes and objects in the file. I could just add an extra gap in the file between each patch that this information will be at, but I'm assuming it's gonna be a lot of un-used space in the file for the patches that barely have any objects or static meshes.

Anyone has any tips on how to store this much detail in a file but still know where exactly to find the data of each patch?

Thanks in advance!

// Anton

Share this post

Link to post
Share on other sites
Jason Z    6434
I would just store the terrain in one section, and then either use another file for the object location / state data, or append it to the end of the file. Typically the terrain is considered a static data file, while the object state would be part of something like a save game file since it changes from one run to the next - so I would suggest having separate files.

Share this post

Link to post
Share on other sites

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

Sign in to follow this