Game Development Community

Obscuring Player Profile Files

by Charlie Patterson · in Torque Game Builder · 07/30/2011 (8:16 pm) · 6 replies

I'm going to make a file which holds the players progress, like what he's purchased, how much game coin he's conserved, and what level he's on. I'm curious what others do to keep a player honest so he doesn't tweak this file to his benefit. :^)

So far I'm considering integrating blowfish and keeping a single password in my game. It's not fool-proof but most people will not care to a) find the key and b) work out the file protocol and c) encrypt their own file to trick the game.

Anybody else do this stuff? Another example file to obscure would be a high-score file.

#1
07/31/2011 (4:50 pm)
Something very simple you can do, is to write a .cs file, and exec it to generate a .dso file (and delete the .cs after that). Very straightforward, although much less cryptic than blowfish.

Another intermediate solution could be to use password protected zip files.

The key thing though, is the percentage of people you keep with the hands off from the profile files, with the less possible work overhead. In this regard, any simple approach is enough unleast the game gain certain popularity, in which case you'll be happy to fix it later :)

Otherwise, unless the time to implement an encryption system be short enough, the cost-benefit will easily became unbalanced, and turn into simple feature creep.

Maybe you could consider a simple and quick solution, with space for improvement if the game proves to need, even past launch day.

#2
07/31/2011 (8:00 pm)
@Novack, yeah my goal is to avoid feature creep even if this means not obscuring the file! I wondered if TGB may have a hidden feature since I assume this situation (obscuring enough to keep the honest people honest) comes up in every game.

Can you tell me more about the protected zip option? I saw that mentioned when doing a search, but there was no detail. Does TGB support loading a zip file with a password out of the box?
#3
07/31/2011 (8:15 pm)
What I wanna know is how you plan on making the profile file in the first place!

Now, I'm no expert, but you might consider hiding the profile files somewhere where they are extremely unlikely to be found - then cause TGB to generate a red herring, with code that looks like it could possibly be the profile.

If they try to edit it, they will find that it doesn't do anything. After a while, they may just conclude that your methods make no sense - and give up trying to cheat by editing their profile files.
#4
08/01/2011 (6:10 am)
@Charlie, Zip files as a mountable filesystem I think is stock feature (although I've not incursionate into it). If that doesnt include password protecting the files, there are a couple of good resources that will do.

Im not sure what Laura means by *how to make* the file.
#5
08/01/2011 (7:53 am)
@Novack

I meant...how do you plan on saving all that in the file? Or having TGB read it?
#6
08/01/2011 (11:42 am)
Well, torquescript has a set of functions for file i/o.

Here there is a tutorial.

Also this is good to have at hand.