Hello, everybody!
Lately, I’ve been trying to condense my levels into compressed files that sort of encapsulate everything about them, including their tile information, the world objects within, anything pertaining to quests, etc. As of right now, I only have incorporated tile information because I haven’t quite gotten the other aspects solidified in the engine to where they are ready to be hard set into the level specs (world objects are coming along, but it’ll be a little bit yet). But I digress!
Basically, I wanted to compare my methods to all of yours. Before, I was storing my level files as .png images where all of the tile information was thus very visible and fairly condensed (I find .png files are pretty tiny most of the time). However, this is somewhat ungainly for my game, as a .png can’t by itself encompass things like world objects, chests with their contents, data for liquid bodies, NPCs, and so on and so forth. Thus, I figured I would develop a level metafile that contains all of this information similar to how, I guess, Doom would store their files or whatever other example fits.
Down to process and numbers:
Step One: Convert the map to Unicode so that it can be stored in a file as a character matrix, with each character representing a relevant tile from the game engine.
Step Two: This could encompass multiple steps, but essentially this is where everything else pertinent to the level gets stored besides the tiles (i.e., world objects, liquids, quest information, NPC information, etc.).
Step Three: Convert the Unicode map and other information to a compressed “.lev” file using ZipStream. Not elegant or fancy, by any means, but it works.
Using the aforementioned process, I get about a 15-20% smaller size of the level than I would have with .png images comprising them, and not to mention the benefit of encapsulating the level’s information to boot, which will probably augment the file by maybe another 5% at most, considering the sheer bulk of the files will be the tile information.
I’m not sure if this process is exactly the most efficient or best, and would love to know of what you guys have done or what you would recommend! I’m open to all sorts of suggestions and would like the best for my level data! Thanks for all your time! :]
Best regards,
Colton