Asset packing and realtime extraction?

Started by
6 comments, last by Tachikoma 12 years, 6 months ago
Hello all,

I'm wondering, what's the preferred method of doing this? As in, say I have the asset folders "models", "sounds", "images"...is there a way I can securely pack them into a custom way which can't be read except by my game engine?
Advertisement

Hello all,

I'm wondering, what's the preferred method of doing this? As in, say I have the asset folders "models", "sounds", "images"...is there a way I can securely pack them into a custom way which can't be read except by my game engine?


Compressing the assets with something like zlib ot bzip will likely turn away most people. You can try physfs it supports several pack formats if you don't want to reinvent the wheel. Honestly I wouldn't go over board with the security, cause it's probably a waste of time. Triple A publishers and developers have spent billions trying to keep people out of their games inner workings and assets (unsuccessfully).
Patrick

Hello all,

I'm wondering, what's the preferred method of doing this? As in, say I have the asset folders "models", "sounds", "images"...is there a way I can securely pack them into a custom way which can't be read except by my game engine?


No. If your game engine can read it, so can other programs. You could go through some trouble to make it non obvious, but you can't make it secure.
Yes and no...

Yes, there are ways to cram it all into a big file and make it hard for Joe Random to read. There are any number of existing formats for this - some with compression, some with encryption, some with all kinds of other features... depends on what language you're using, what library dependencies you're willing to add to your project, and so on.

If you want absolutely no program but yours to be able to read the files... well, sorry. Bad news is, if your program can do it, then someone could write their own program that can also do it. You can make it pretty inconvenient for someone to try that, but only inconvenient - never impossible.


Some more details on your game and what tools you're using would be helpful in making a recommendation.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]


Hello all,

I'm wondering, what's the preferred method of doing this? As in, say I have the asset folders "models", "sounds", "images"...is there a way I can securely pack them into a custom way which can't be read except by my game engine?


Secure against who? Secure against a computer-illerate grandma who says that her operating system is Internet Explorer and believes the Internet == email+Facebook? Secure against a collective of hackers who desperately want to read it? Secure against security agencies of the governments of the world?

Given the time and resources a determined attacker could break anything you create. It is simply a matter of how much effort you want to put into protecting it.

How much time have you spent worrying about this? How much time and effort have gone into the copy protection instead of into making your game better? How much effort will you put into fighting the bad guys in the community rather than trying to grow and support the awesome members of the community?

For homebrew and hobby projects it is usually best to simply ignore pirates. You have more important issues. Finish your game, get it out there, and provide a community where those who participate and give support are rewarded.


The simplest option is to just preprocess the resources to the format you will use in memory. Minimize your load time by making it a direct stream into the final location so no deserialization work is required.
I guess I worded it wrong...I'd like to compile all of the folders into one asset library that only my engine could call (i.e. a compressed asset library and some type of hash check by the engine verifying that the library is original). I am developing my own game engine in C++.

I guess I worded it wrong...I'd like to compile all of the folders into one asset library that only my engine could call (i.e. a compressed asset library and some type of hash check by the engine verifying that the library is original). I am developing my own game engine in C++.


You cannot prevent access to it.


Look at the recent PS3 jailbreak as an example. Major corporations spend fortunes in software security, and they know full well that eventually it will be broken.

The best you can do is attempt to slow them down. You can attempt to make it more expensive or more time consuming than the value/life of the content.


You can try to hide it, try to encode it, try to make it more difficult to use, but if a determined person wants access they can eventually break anything.
The problem is, casual users would not be interested in extracting assets in the first place. Those who are interested tend to be more computer literate than most, and your custom content protection against that crowd is not very effective. Perhaps create your own custom file formats for everything, making reverse engineering a little harder. Personally, I think this is a waste of time. I'd rather spend that time coding useful features into the game, or making more assets. Realistically, law is your best protection. If you find a rival title using your assets without permission, take em to court.
Latest project: Sideways Racing on the iPad

This topic is closed to new replies.

Advertisement