Jump to content
  • Advertisement
Sign in to follow this  
Telamon

Encrypting Resources

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

I'm writing a roguelike game in C# and I would like to encrypt all of my game resources (bitmaps and XML files mainly) to prevent people from peeking into the game content and posting spoilers online. I recognize that it's really hard to secure game resources on the client, so I'm just looking for something easy that I can do to make it harder for anyone inclined to poke around. Any suggestions? I'd like to do something a little more complicated than inverting all the bits or XORing them with a key. I could encrypt the files using a standard algorithm, but I would have to save the key somewhere on the machine to decode them.

Share this post


Link to post
Share on other sites
Advertisement
Further, you need to decrypt them into plaintext on the machine to use them. It's fairly trivial to look into memory and just copy from there.

I've always suggested that the benefit of making such things open [and allowing easy modding] outweighs the time spent trying to do something [obfuscation] that is mathematically guaranteed to fail.

Share this post


Link to post
Share on other sites
Quote:
Original post by Telamon
I'm writing a roguelike game in C# and I would like to encrypt all of my game resources (bitmaps and XML files mainly) to prevent people from peeking into the game content and posting spoilers online.


People are going to post spoilers online regardless, it just might take them a bit longer to play through the game and get to them.


Quote:
I recognize that it's really hard to secure game resources on the client, so I'm just looking for something easy that I can do to make it harder for anyone inclined to poke around.


If you're looking for a simple way to do it, why not just compress the files with something like huffman compression? People that are inclined should be able to figure it out, but the average user won't have a clue.

Share this post


Link to post
Share on other sites
Ive done such system for myself a long time ago, and the answer is to use your own file format. It can be broken though (just like everything else), just look at tools like multi-ex commander or openmex (is that still alive?). However, you could create a very nice file format, add some compression to it (the simplest being zip). You'd still have to make the tools to compress/decompress files in your format (the best being a library, then you can make an example app like a winrar-like to not only test the library, but to make a GUI for yourself for easy handling of resources, and then you use the library itself in your game, to load them).

But, as Telastyn said, it can be hacked by experienced hands.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!