[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Save files



Python's struct module is really nice for going to and from binary data.

On Mon, Nov 14, 2011 at 11:49 AM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
> Well, there are two approaches.
> The first, not caring, is probably easiest--and your players will appreciate
> it, too. ÂYes, they can max out their stats. ÂThat's the point.
> The second is to do some kind of encryption. ÂIdeally, you make your game
> with plaintext data files, and then add some light encryption on top when
> you're ready to release. ÂThis can be as simple as reversing the bits of
> each data byte, or even a Caesar Cipher. ÂMost gamers ready are pretty lame
> about this sort of thing. ÂYou can use RSA if you really want to make it
> statistically impossible to break, but honestly, I think that's overkill.
> Keep in mind that you'll need to be careful about how you do this. ÂFor
> example, .py files are easily read, and so no matter what you do, a person
> would be able to undo any encryption you can come up with. Â.pyc or .exe
> won't save you, in some cases--string literals (i.e., your encryption key)
> are easily extracted from these files.
> Ian



-- 
Ryan Hope, M.S.
CogWorks Lab
Department of Cognitive Science
Rensselaer Polytechnic Institute