How can I store all my level data in a single file instead of spread out over many files?
- by Jon
I am currently generating my level data, and saving to disk to ensure that any modifications done to the level are saved.
I am storing "chunks" of 2048x2048 pixels into a file. Whenever the player moves over a section that doesn't have a file associated with the position, a new file is created.
This works great, and is very fast. My issue, is that as you are playing the file count gets larger and larger.
I'm wondering what are techniques that can be used to alleviate the file count, without taking a performance hit. I am interested in how you would store/seek/update this data in a single file instead of multiple files efficiently.