Game Storage and Company Symbols

Started by
20 comments, last by CHG-Swampert 15 years, 3 months ago
I think that the compression of data is enough to hide your resources. Crypting would be like using a bazooka to kill a bee. You just need something to prevent the average user from messing with your resources, and encoding your bytes in a compressed format works in most cases. As it has been said before, the more hackish user will find a way to your data anyway.

From my experiences, loading from a big archive also makes it faster to load. I haven't done any tests on it, but my game just seems faster since after I gave it an archive loading system. When you have 40 files to load, you don't open 40 files, you open only one, get their address and size from the TOC (that you probably kept in memory so you don't have to parse it from the HDD everytime), seek to each file's address and load them, then close it when you're done. One open, one close.

The only thing to remember if you compress your data is that you must compress the files within the archive, not the archive itself. If you compress the whole archive, you have to decompress it entirely before reading. Some compression libraries have support for seeking, but seeking through a compressed chunk of data requires a lot more processing. If your archive takes 1Gb, depending on the compression format you used, it could be VERY slow.
Advertisement
Quote:Original post by Kest
Quote:Original post by Kenneth Godwin
Quote:Original post by Kest
Some people seem to be in the mindset of "if it's possible to crack, it's pointless to protect". If you were to move somewhere where a few people (out of thousands) insist on ripping off your clothes, would you stop wearing clothes altogether, or fight harder to keep them on?


Your analogy is horribly flawed.

What a mean thing to say :P

Quote:It is more along the lines of "Do you buy plate mail when a some people are willing to rip it off? Or do you just stick with clothes?"

I don't get it. Plate mail is a hell of a lot tougher than clothes, and unlike clothing, it's designed to be difficult to rip off.

Quote:Based on the fact that most men and women out there who aren't wearing heavy steel armor...I'd say my opinion is the correct one.

This is an interesting type of logic that I've never seen before.


I think he means that even though there are a few people who might try to rip your clothes off, it's so unlikely that nobody goes to the extent to wear plate mail to prevent their clothes from being ripped off.

In my opinion it just comes down to your personal choice. Do you want to feel that your data is safe and secure to the point of spending time/money/resources to do it, or do you not mind if a handful of people attempt to get your data? Even with all the protection in the world, you can't keep someone from getting the data. There is no such thing as total security.

I think this goes beyond data protection and into the realm of personal protection. Most people want to feel like they are in control and can protect themselves/others but really you're never in control and you're totally vulnerable at all times. It's just that most people don't want to believe that so they try to do things that will make them feel more secure. Same goes for your data. You want to go to sleep at night thinking that your data is safe but no amount of encryption/compression is going to protect it.

[size="3"]Thrones Online - Tactical Turnbased RPG
Visit my website to check out the latest updates on my online game
I think, Kest, the correct counter-argument to losta DRM is this:

It takes about the same amount of time to crack a heavy DRM game and a light DRM game (in terms of days from release, not in terms of hacker hours worked). Spore, for instance, had one of the the heaviest DRM implementations to date. It was cracked before it was released.

So would you rather spend 10x the money on Gucci clothes and have them ripped off, or just buy some at K-Mart on Blue-light special?

To the OP's question, what do you get out of trying to protect your assets? They're already in out there in public, so you don't need to keep people from seeing them. If someone uses them you're going to have to sue them whether they crack the game to get it or whether they can just get at them easily. Since your cost of enforcement is the same whether you have the assets under DRM or not why would you overly concern yourself with their protection? Very few AAA PC games bother hiding their assets. Many even give away the file formats to aid in modding.

Anyway since we've descended into an all encompassing DRM argument, here's my take:

I think the right answer is relatively light DRM (light in the sense of low-cost for development and in the sense of low impact on the honest user). That pretty effectively prevents casual piracy. And since you can't protect against dedicated piracy anyway, you're not wasting tons of cash on something that is basically guaranteed to fail.

I mean if even games like World of Warcraft, in which all of the "real" game logic runs on a server and which require per-session authentication, can be hacked such that people can run free-private servers, there's no hope for standalone single player games. So spend some money to raise the low bar but concede the arms race.

-me
Quote:Original post by Konidias
I think he means that even though there are a few people who might try to rip your clothes off, it's so unlikely that nobody goes to the extent to wear plate mail to prevent their clothes from being ripped off.

In other words, he thought I was ripping on his earlier statements about renaming and compressing being enough to protect. Since I wasn't doing that, his following statements made no sense.

Renaming files relies on the assumption that average computer users are naive and lack cleverness. I would take it a little farther than that. Compression (as long as it can't be opened with winzip) definitely seems like enough. It's something even a skilled programmer would need to spend a little time to get into.

Quote:I think this goes beyond data protection and into the realm of personal protection. Most people want to feel like they are in control and can protect themselves/others but really you're never in control and you're totally vulnerable at all times. It's just that most people don't want to believe that so they try to do things that will make them feel more secure. Same goes for your data. You want to go to sleep at night thinking that your data is safe but no amount of encryption/compression is going to protect it.

If you've been following my posts, you'll see no mention of data protection or security. As far as I'm concerned, the worst that can happen as a result of breaking into the data is that the player's game experience is cheapened.

Quote:Original post by Palidine
I think, Kest, the correct counter-argument to losta DRM is this:

It takes about the same amount of time to crack a heavy DRM game and a light DRM game (in terms of days from release, not in terms of hacker hours worked). Spore, for instance, had one of the the heaviest DRM implementations to date. It was cracked before it was released.

First, I'm not interested in DRM, I'm interested in securing the player's perspective of the game and its world. Second, I would say light DRM is plenty for that type of protection, and haven't given you any reason to assume otherwise.
Quote:Original post by Kest
Renaming files relies on the assumption that average computer users are naive and lack cleverness. I would take it a little farther than that. Compression (as long as it can't be opened with winzip) definitely seems like enough. It's something even a skilled programmer would need to spend a little time to get into.

My asset packs essentially are just ZIP archives, except with the PAK extension. It's enough to hide the data away neatly so you won't inadvertantly see it and is trivial to work with. I think just a mere change in extension is enough. If I left them as ZIP, the message would be "unzip me and see what's inside!". As a PAK, the message is "leave this as is unless you really want to break me open". As far as I'm concerned that's all that's needed.

Quote:Original post by Trapper Zoid
Quote:Original post by Kest
Renaming files relies on the assumption that average computer users are naive and lack cleverness. I would take it a little farther than that. Compression (as long as it can't be opened with winzip) definitely seems like enough. It's something even a skilled programmer would need to spend a little time to get into.

My asset packs essentially are just ZIP archives, except with the PAK extension. It's enough to hide the data away neatly so you won't inadvertantly see it and is trivial to work with. I think just a mere change in extension is enough. If I left them as ZIP, the message would be "unzip me and see what's inside!". As a PAK, the message is "leave this as is unless you really want to break me open". As far as I'm concerned that's all that's needed.

If you have to go out of your way to protect it any better, it's probably good enough. However, I've seen normal browsers and OS search engines that look at the header of files to determine their type, rather than the extension, and they often dig into compressed formats to display their contents.

Often, when you use an existing compression file format, you can just as easily pass the compression library a pointer to the file memory instead of a filename, giving you the option to invalidate the format by storing a tiny header at the beginning of the file. It's also something that can be done after the game is complete, or switched on and off with ease, so it won't slow your development down.

My engine uses a single compressed file with the z-lib library, but during development, the data is just stored in normal directories.
Quote:Original post by Kest
If you have to go out of your way to protect it any better, it's probably good enough. However, I've seen normal browsers and OS search engines that look at the header of files to determine their type, rather than the extension, and they often dig into compressed formats to display their contents.

Really? Darn. I'll mangle a new four byte file header for my PAK files and make it capable of reading both ZIP and PAK.
Quote:Original post by Trapper Zoid
Quote:Original post by Kest
If you have to go out of your way to protect it any better, it's probably good enough. However, I've seen normal browsers and OS search engines that look at the header of files to determine their type, rather than the extension, and they often dig into compressed formats to display their contents.

Really? Darn. I'll mangle a new four byte file header for my PAK files and make it capable of reading both ZIP and PAK.

Well, even if the search thing is an issue, I doubt normal people would use it to purposely get into your files. It might happen by accident, but even that would be rare (they would need to search your game's directory or the whole drive). If you have to go out of your way to change the header, it's probably not worth the hassle.
Quote:Original post by Kest
Well, even if the search thing is an issue, I doubt normal people would use it to purposely get into your files. It might happen by accident, but even that would be rare (they would need to search your game's directory or the whole drive). If you have to go out of your way to change the header, it's probably not worth the hassle.

It's not particularly difficult. In my case, I just don't want the resource files to look like ZIP archives as people might feel they need to unzip them (which they don't). Nor do I want them filling up people's search results unnecessarily. I want the game directory to be tidy.

Having the archives as essentially ZIP files is useful because they're so easy to work with. Just zip up the directory, rename the file and you're done. Having a custom format with exactly the same format just with a different header isn't that hard to do.

Quote:Original post by Trapper Zoid
Quote:Original post by Kest
Well, even if the search thing is an issue, I doubt normal people would use it to purposely get into your files. It might happen by accident, but even that would be rare (they would need to search your game's directory or the whole drive). If you have to go out of your way to change the header, it's probably not worth the hassle.

It's not particularly difficult. In my case, I just don't want the resource files to look like ZIP archives as people might feel they need to unzip them (which they don't). Nor do I want them filling up people's search results unnecessarily. I want the game directory to be tidy.

Having the archives as essentially ZIP files is useful because they're so easy to work with. Just zip up the directory, rename the file and you're done. Having a custom format with exactly the same format just with a different header isn't that hard to do.

Just out of curiosity, do you have to re-zip your resources each time you make changes to them, or do you have a temporary development thing set up?

I made a custom data compiler program that uses z-lib to store all of the game's files as individual components in a single file with a lookup table, back in the day (1998 or so), and had been re-compressing it every time I needed to adjust some artwork or scripting. I even went back to adjust the data compiler program to only modify parts of the file that change, to speed it up, and created a shortcut to run it on my quick-launch toolbar. What a hassle. I eventually got lazy enough to write a sub mode into my game engine that allows loading data from a normal directory structure during development.

This topic is closed to new replies.

Advertisement