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

Re: [pygame] Save files



Oops, looks like Christopher already mentioned that. Sorry.

Anyway, you can prevent people peeking at  the source code with py2exe (to some extent -
py2exe doesn't actually compile the source code, it just packages it with a python interpreter in a
handy executable - people can still look at it without decompiling. I'm not sure if
variable names and the like are preserved).

On Mon, Nov 14, 2011 at 6:09 PM, Scribble Master <scribbler95@xxxxxxxxx> wrote:
I'd just like to note that for any game you write in pygame, your source code will be
completely exposed unless you use py2exe or some sort of automated obfuscation.
Barring that, any tricks you use will be easily bypassed by sticking things into the source code itself.


On Mon, Nov 14, 2011 at 12:59 PM, Ryan Hope <rmh3093@xxxxxxxxx> wrote:
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