Sign in to follow this  
xissburg

how to hide my game files form the users?!?

Recommended Posts

xissburg    204
I'm looking for an answer for this question since some years ago :P(I think I didnt get it yet just because I just asked it sometimes...) In my game I have .tga files, .x files, .wav and/or .mp3 files etc... which can easily be accessed, reused, edited, etc by the game users. I have taken a look in the files of some games and I have seen a lot of files with a strange format (for example in some games from EA I have found .big files). Are these formats a file format created by them?!? or what? Is creating my own file formats the only way for me to hide my files from the users?!? thx ;)

Share this post


Link to post
Share on other sites
Sol462    240
Many people choose to create their own proprietary format for their media, be it for each kind of media or by storing it in their own compressed format.
Depending on the game you can get away with distributing to an audience who you think wouldn't know how to edit them (like kids perhaps).

Share this post


Link to post
Share on other sites
Kaze    948
probably, even then they could be stolen if someone tryed hard enough, image files are easy to rip. a 3d mesh file would be a lot harder if you made a custom format but really its not worth it

Share this post


Link to post
Share on other sites
xissburg    204
as I can see this a big and 'hard to solve' problem... Even creating our own formats its possible to extract it and edit... It can be hard for the users but not impossible..and sometimes very easy for some experts on things like.

Well, my question is already answered...now the problem is build a very complex format XD ... I dont have sifficient skills for that yet heheh...

Thanks for replying guys

Share this post


Link to post
Share on other sites
Decrius    100
If people want it, they'll get it :(

Maybe you can try to add images (if it is about images) to your resource file, then a lot of people don't know how to get it, because than its in the .exe file. But for pro's you can't hide anything in my opinion (maybe with a logaritm, like MD5 in PHP...). But for most users it enough to hide it in the .exe :)

Decrius

Share this post


Link to post
Share on other sites
Demus79    362

Well it doesn't have to be so complex system after all.

I suggest building a simple file packaging system. That is, one huge file which has all the required files and folders.

The file needs some kind of table of the filenames and location and the of course the files itself.

First you get the list of the all the files want to pack and then store a dummy table with dummy file locations and sizes. Then you append all the files and in the same time store the starting locations and size in the table. Not too tricky.

I guess that the hard part comes when you want to load from the pack, not that reading is hard, but it is sometimes a bit tricky to use certain APIs with the package. Luckily, for example, with DX it is possible to load DDS files from memory or some APIs allow to use user defined file access functions.

Cheers

Share this post


Link to post
Share on other sites
xissburg    204
Decrius, look at this

using this you can access all the resource files in the exe =D ... Dont know if many ones know it but I'm almost sure they do... hehehe

And Demus, I think the method you decribed seems to be very nice but I also think it is beyond my knowledges by now :P ...this question was just a curiosity hehehe...thanks for you to reply

thx for all ;)

Share this post


Link to post
Share on other sites
OrangyTang    1298
1. If it's on the client (ie. my machine) it's insecure.
2. I can always reverse engineer your exe to discover your file formats.
3. Similarly, if you encrypt your data I can always extract the key and algorithm from your program.
4. It'd be even easier to just let your program load the data and grab it directly from RAM.
5. Its quite easy to intercept OpenGL/DirectX calls with my own code and capture your data as it going past (ie. ripping textures becomes trivial, models, sound and other data are equally vunerable).

No matter what you attempt to do, it'll only be a delaying tactic. The question is how much time you're willing to waste on this and what you're actually trying to prevent. If you just want to stop casual users messing with them then the easiest way is to just change the file extension. Anything else is likely to be wasted time.

Share this post


Link to post
Share on other sites
Frequency    442
So far I just keep everything in "gamedir/res/". If they wanna bork the images or animation scripts, it's their choice. Then again, I'm making crappy not-good-enough-to-be-freeware games.

Share this post


Link to post
Share on other sites
OrangyTang    1298
Quote:
Original post by Shannon Barber
Quake just zips the files are rename's them .pak.

<nitpick>Quake 1 & 2 use custom archive file formats for their packs. Quake 3 uses zip files with a pk3 extension.</nitpick>

This is interesting as they went from a proprietry format to a more open format precicely because they want users to mess with the files. Quake (and the rest of the quake-engine games) have such a long lifespan because they encoraged user modification, not prevented.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Quote:
Original post by xissburg
which can easily be accessed, reused, edited, etc by the game users.
And how would this hurt you? If anything, people would just be able to create MODs for your game easier and the game would thus become more popular. And if your content is worth stealing, people will steal it no matter how you try to hide it. The game would have to be able to open the complex format anyway, so all the keys the hackers need are there right next to the treasures.

Share this post


Link to post
Share on other sites
nife    235
Packaging files normally aren't meant to hide information from the user, instead they collect the massive amount of data/files in a single file in an optimized and/or compressed format, which are both things that will help either to minimize storage space or lead to more efficient/faster loading times.

Share this post


Link to post
Share on other sites
Simian Man    1022
Just copyright your art and don't worry about it. If somebody messes with the stuff on their computer, who cares? If somebody tries to distribute or reuse your art, they'll be breaking copyright laws.

Share this post


Link to post
Share on other sites
OrangyTang    1298
Quote:
Original post by Simian Man
Just copyright your art and don't worry about it.

Copyright is automatic, you don't need to do anything for it. But yes, the best way to stop unauthorised distribution is legal, not techinical, measures.

Share this post


Link to post
Share on other sites
Simian Man    1022
Quote:
Original post by OrangyTang
Quote:
Original post by Simian Man
Just copyright your art and don't worry about it.

Copyright is automatic, you don't need to do anything for it. But yes, the best way to stop unauthorised distribution is legal, not techinical, measures.


You don't even have to say "Copyright Joe Smith 2006" ?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Quote:
Original post by Simian Man
You don't even have to say "Copyright Joe Smith 2006" ?


No. Before you had to, but not anymore. It kind of sucks, tho. How will people in the future know what year the stuff enters the public domain if there is no year on the work?

Share this post


Link to post
Share on other sites
Raghar    96
Quote:
Original post by Anonymous Poster
Quote:
Original post by Simian Man
You don't even have to say "Copyright Joe Smith 2006" ?

No. Before you had to, but not anymore. It kind of sucks, tho. How will people in the future know what year the stuff enters the public domain if there is no year on the work?


Disney would extend theirs rights even more, so the answer would be... Use them under Fair use rights for your personal/nonprofit use.

Share this post


Link to post
Share on other sites
Anon Mike    1098
Just giving the file a different extension (whatever.tga -> whatever.pq7) will stop most casual people. Stupid stuff like XOR'ing each byte with some value will stop most of the people that are left.

It is impossible to stop determined people. All you can do is make it incrementally harder. Each increment is also harder on you, hurting performance and opening new oppurtunities for bugs. Googling for "the client is in the hands of the enemy" might give you some insight into this.

And realistically, unless your game becomes big nobody is going to want to steal your stuff anyway. And the only people that will try are the little guys that don't really matter themselves. The big players don't need the kind of hassle that legal complications might cause when they have the resources to just come up with thier own stuff.

Share this post


Link to post
Share on other sites
xissburg    204
very nice... thanks for replying men... I know I dont need to worry about that by now, since I'm a n00b :P but its good to know more about...thats all and thx ;)

Share this post


Link to post
Share on other sites
Or you could create a single binary file which contains a list of 'protected' files and their checksums. If a file's checksum doesn't match, you take appropriate action.
It'd be a little harder to goof around with than a text file or the resources themselves.

Share this post


Link to post
Share on other sites
jpetrie    13154
The reason many games pack resources into "archive" formats of one flavor or another isn't always just for "protection" against people looking at or modifying game data. Often that's just a side-effect and not really a concern at all. Archive formats can boost load times, reduce overall on-disk asset size, ease downloads and patches, ease validation/checksumming of data between networked computers, et cetera.

The bottom line is that you cannot protect your data from external observation or modification. If you decompress/display/play/whatver... if the data is ever at any point observable in its "native form" than it can be acquired by users and potentially modified. So what? You own the copyright implicitly, they cannot steal your work unless you let them get away with it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this