Custom file formats

Started by
3 comments, last by tguolxaqgy 13 years ago
I'm writing a simple 2D game in C++. Up until now I just stored my game data in folders, but now the time has come to implement a sort of 'container file' where I can store animations, sounds, scripts, etc. How do you recommend I do that, what libraries should I use, etc? :)
Advertisement
Look for Virtual File System. Basically, you pack files together into one big file. You can make your own VFS or you can use a file archiver library like ZIP.
Or PhysFS
I trust exceptions about as far as I can throw them.
Sqlite also make for a pretty sweet custom file format. Depending on your data stuffing it into a file based database might not be the best solution but it's really nice to be able to access data using sql queries.
Exitus Acta Probat
PhysicsFS and Sqlite seem very interesting, but I think I'll give PhysicsFS a go first. From the superficial reading I did on it I imagine it is particularly useful if you want to make you game moddable (and give modders the ability to use the vanilla game files if they want). Just one question, though: is it 100 percent platform-independent? I'm asking because after I finish writing the game for Windows I'd like to port it over to Wii Homebrew.

This topic is closed to new replies.

Advertisement