3
\$\begingroup\$

I'm working on finishing up a game written in C++ with SDL I've been working on for awhile, and I'm starting to ponder how I'm going to distribute it. It has hundreds of images that are loaded and used throughout the game, as well as a couple dozen .wav files for audio effects.

What is the best way to distribute these? Should I just include the folders with all the files? Or is there a way I can package them into a single file, then open and extract them in my application?

What's the best way to go about this?

\$\endgroup\$
2
\$\begingroup\$

I don't know about encryption, but it's relatively easy to put things in ZIP files and have a tool like PhysicsFS handle dynamic decompression at run-time.

It even allows you to support mods easily.

|improve this answer|||||
\$\endgroup\$
1
\$\begingroup\$

Unless there is a reason not to just ship them as plain directories. Less complexity in your code and you can replace content without needing additional tools for packing and unpacking.

Using PhysFS isn't wrong however, having multiple search paths is a good practice, the other features, such as reading from zip files are just a nice addition.

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.