File input/output in C++ Question

Started by
12 comments, last by Bacterius 11 years, 4 months ago
Well I see your point, but what if my game was multiplayer? Just write the files in a binary format and hope for the best?

There is not much you can do against a determined attacker. Whatever is on his computer can be read and modified by design. You cannot prevent that short of keeping assets away from the user and rendering the game on dedicated servers, delivering the results via the internet (see OnLive) which is really overkill. And even then he might still be able to recover the assets to some extent (e.g. stare at a wall and screenshot the texture on his computer). It's just not a 100% solvable problem in practice.

To be honest, just packing all your assets in a zip file and renaming the extension will discourage 99.9% of people out there from snooping into your assets. That's probably good enough unless you have an AAA game in the works.

Basically, you are attempting to solve the DRM problem, which in short is "how do I make sure someone cannot copy X while still having access to it" which is fundamentally flawed in the abstract computer realm, because while it is difficult to replicate a physical object, all information in the form of bits (i.e. everything on a computer) can by definition be copied.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Advertisement

Woah. I can see what you mean now Bacterius, and yeah I'll probably do what you said with the zip file. Thats an interesting point with the DRM problem.

Thanks very much for taking time to share your knowledge :)

mikenovemberoscar

Well I see your point, but what if my game was multiplayer? Just write the files in a binary format and hope for the best?

If it's that important, you send the client a 'seed' value, hash the file with it, and send the results to the server.

Only the server knows the correct result to the challenge and since the seed value keeps changing they can't just send you the correct result from last time you asked.

And that's the start of cryptography...

- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Well I see your point, but what if my game was multiplayer? Just write the files in a binary format and hope for the best?

If it's that important, you send the client a 'seed' value, hash the file with it, and send the results to the server.

Only the server knows the correct result to the challenge and since the seed value keeps changing they can't just send you the correct result from last time you asked.

And that's the start of cryptography...

That would not help, the pirate would just keep the original assets stashed somewhere, hash them for verification, then go back to using the altered ones.

Cryptography does not help, it solves an entirely different problem.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

This topic is closed to new replies.

Advertisement