Jump to content
  • Advertisement
Sign in to follow this  
ukdeveloper

.pak files

This topic is 4823 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!