Jump to content
  • Advertisement
Sign in to follow this  
tplague

Asset packing and realtime extraction?

This topic is 2638 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

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?

Share this post


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

Share this post


Link to post
Share on other sites

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.

Share this post


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

Share this post


Link to post
Share on other sites

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.

Share this post


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

Share this post


Link to post
Share on other sites

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.

Share this post


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

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!