hiding game art, sounds, models...basic idea?

Started by
6 comments, last by leiavoia 19 years, 4 months ago
howdy, so the amateur stuff i've seen has the "resources" for games located in the game directory in folders like "Images", "Sounds", "Models". but with that method everyone sees your materials... could anyone explain or direct me to some reading about condensing said materials in a folder kinda like the .pak or .mpq files you see released with some large scale games i'm kinda familiar with the idea of using visual studio to add the resources to the project build and it will compile them into the application's .EXE file....but ideas into the other method would be appreciated
Advertisement
One pretty easy way would be just to use .zip files. There is a lot of code out there that shows how to load data from inside zips. If you want to be really clever about it you could even add some encryption here so a normal zip loader ( ie winzip ) won't load them.

-----------
Andrew
make yourself a virtual file system
think what you need for information to store multiple files in one single file(offset to the file, filesize etc)
after some thinkink you will get an idea how it could work.
And for lil bit extra security don't keep the filenames in the big file, keep hashes of the filename.
I take a simpler route and just change the file extensions!
A lot of commercial games put everything into a (sometimes uncompressed) zip file, and chage the extension on that. (Hidden and dangerous's *.dta, id's *.pk3)
This article is pretty good.

Leaves a lot for want (and uses function pointers in a weird, weird way as I recall) but I used it for the basis of my resource files. Think Doom's WAD file. That was IMHO a groovy way to pack and guard your shiznit.
put some random letter in the front of the files, then when you load them take it out. . .
I like the "hash the names" idea. That would be really frustrating trying to find a specific file when they are all named like "89fjhW93H93nf9211HP", even in an open, uncompressed, unhidden folder. Note that it wouldn't mean anything to a browser that recognizes file types by their headers and not their extensions.

On the other hand, is there a really good reason to hide the resources? Leaving them open means modding potential, which most people will admit extends the lives of many commercial games (like The Sims). It doesn't have to be serious modding like making a whole new game, i just mean swapping out the graphics and sounds and whatnot. Unless you were afraid of getting your art/sound ripped and abused, i would leave it open for people to tinker with.

This topic is closed to new replies.

Advertisement