Hello! First of all sorry that my topics title was pretty unclear, I just couldn't come up with a better one.
I've been doing programming for like a year now mainly on school courses. Now I'm developing a simple tile based level editor for a school project (and also for use of my own). For my programming language I've choosed C#. Now I'm facing a problem that has been bothering me for a really long time now and no matter how hard I've tried, I just can't figure it out nor find a specific piece of information that would explain this to me.
What I want to do is to save information about my tileset into a file. That information would include the tileset's image, and all the data about specific tiles like it's location in the tileset image etc. The question is, how should I do this. I really simply have no idea where information should be saved in a program. On my another school project I've had a simple text document where things were stored. Now I however would like something more complex as to make it harder for people to gain my tileset info with a text editor or such + I'm having that image around that should be saved to same place.
Should I get some kind of a database to which I could save my info or what do I do? I've been thinking if I should make a file extension that would contain the data but I don't know how I should do that either nor if it's wise thing to do either.
I hope this is in the right section, couldn't find a better place for it. First post.![]()
You need to choose a container file format. There are lots of standards.
One Ive used since my Amiga days is:
Interchange File Format - Wikipedia, the free encyclopedia
You can also try the Quake pak file format:
Quake Specs v3.1
Or, you could save all your files into a folder and zip them all up.
There is always the linear binary save method, but you have to get it right so your files dont become incompatible with new versions.
There is no correct answer. I like the idea of the PAK file because its simple, well defined and there are plenty of PAK explorer tools on the net. If you are looking for security, then you can always encrypt or compress the file after its created.
There is also serialization, (which arrr one company I worked for choose!). I hate it because each language serializes objects differently, so you lock yourself into C#.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks