.pak files

Started by
2 comments, last by Rebooted 18 years, 10 months ago
Hi, My Pong clone is just about done (other than the dodgy AI in single player mode, it's getting there fast), but at the current time I've got all my files in a folder called /data. They're in their raw form as .bmp and .wav files, which means that people can put in their own files with the same name. However, for my next game, I'd like to try something a little different. In professional games (and also in some of the Showcase entries), people include a file called something like Data.pak, and it includes all the audio, graphics etc. How would I do that myself, and how would I load it and get the data from it? Would I just use fstream and open it as ios::binary, and once it's opened, how do I extract, say, car.bmp from it and load it as a texture surface? I'm using SDL at the moment, but I'm sure the same principles apply for everything. Hope you can help, ukdeveloper.
Advertisement
Google + Gamedev = winner!
"Game Programming" in an of itself does not exist. We learn to program and then use that knowledge to make games.
Quote:Original post by Instruo
Google + Gamedev = winner!


Aaah, looks promising...

Thanks.
There are a few articles about it but I remember that being the best. You just need to write your own file format similar to the one described there, and then write your own functions to load entries in your pak file into memory so you can use them in your game.

This topic is closed to new replies.

Advertisement