Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.064 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'nasty': 0.07; 'can.': 0.09; 'pm,': 0.11; 'server,': 0.12; 'wrote:': 0.14; 'subject:python': 0.15; 'cheat': 0.16; 'cheaters': 0.16; 'cheating': 0.16; 'computation': 0.16; 'subject:distribution': 0.16; 'such,': 0.16; '16,': 0.16; 'things.': 0.16; 'users.': 0.18; 'fair': 0.19; 'code,': 0.20; 'interface': 0.20; 'header:In-Reply- To:1': 0.22; 'mon,': 0.22; 'subject:code': 0.23; "what's": 0.24; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'server': 0.29; 'server.': 0.31; 'does': 0.31; 'called': 0.32; 'to:addr:python- list': 0.32; 'screen': 0.32; "i've": 0.33; 'someone': 0.33; 'bit': 0.33; 'data.': 0.33; 'using': 0.34; 'latter': 0.35; 'doing': 0.36; 'running': 0.36; 'variety': 0.37; 'received:209.85': 0.37; 'other,': 0.38; 'playing': 0.38; 'steven': 0.38; "who's": 0.38; 'received:google.com': 0.38; 'user': 0.38; 'but': 0.38; 'on-line': 0.39; 'to:addr:python.org': 0.39; 'could': 0.39; 'where': 0.39; 'received:209': 0.39; 'would': 0.40; 'header:Received:5': 0.40; 'performance.': 0.60; '2011': 0.62; 'graphics': 0.63; 'benefit': 0.66; 'ways,': 0.68; 'money.': 0.71; 'anything.': 0.72; 'ship': 0.77; 'lose': 0.84; 'acceptable",': 0.84; 'client-side': 0.84; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84; 'casino': 0.93; 'safe.': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=D+eXp6oHuvDqnJaQUNhmkhXpRQKnfWnfed3UoZNjUAo=; b=QCacSlXjvfEijKwXGASZ8mC/I1sKXCyVzx9G+0F+gh+iFkLWc3xMhqbeenx7H3Y8d4 sEAsZoBP0pyVkoR0lINgfWIJMCake/W6r3WztuqtGQGwCQQB6KZERNO8V0Pj0pwOcWQR hQ1O/ft9T+IHXsQPaJOSm6eNOH3Er/34yWKvE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=l+RDyBoqRC/E6vdX57VNc2ZT7UwHwC2cSzwBsOfYeH4m4ArY8opAMxNHOSGFkj2xTO kwaeDASIRZxmB33Nbdi0tI2rAst14Fu6VDRg2zNS4Uw11ejoNTdafDJ3DWjzGF/mRIg8 fzE1U8agDOUIr8re+BAO0391BtR226neD1Zrk= MIME-Version: 1.0 In-Reply-To: <4dd0e507$0$29983$c3e8da3$5496439d@news.astraweb.com> References: <87boz3gw5u.fsf@benfinney.id.au> <4dd0a1fc$0$29983$c3e8da3$5496439d@news.astraweb.com> <4dd0e507$0$29983$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 16 May 2011 19:10:20 +1000 Subject: Re: obviscating python code for distribution From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305537023 news.xs4all.nl 41110 [::ffff:82.94.164.166]:38108 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5504 On Mon, May 16, 2011 at 6:49 PM, Steven D'Aprano wrote: > If your answer is "No cheating is acceptable", then you have to do all > the computation on the server, nothing on the client, and to hell with > performance. All your client does is the user interface part. > > If the answer is, "Its a MUD, who's going to cheat???" then you don't > have to do anything. Trust your users. If the benefit from "cheating" is > small enough, and the number of cheaters low, who cares? You're not > running an on-line casino for real money. The nearest I've seen to the latter is Dungeons and Dragons. People can cheat in a variety of ways, but since they're not playing *against* each other, cheating is rare. As to the former, though... the amount of computation that you can reliably offload to even a trusted client is low, so you don't lose much by doing it all on the server. The most computationally-intensive client-side work would be display graphics and such, and that's offloadable if and ONLY if there's no game-sensitive information hidden behind things. Otherwise someone could snoop the traffic-stream and find out what's behind that big nasty obstacle, or turn the obstacle transparent, or whatever... not safe. There's an old OS/2 game called Stellar Frontier that moves sprites around on the screen using clientside code, but if there's a bit of lag talking to the server, you see a ship suddenly yoinked to its new position when the client gets the latest location data. That's a fair compromise, I think; the client predicts where the ship "ought to be", and the server corrects it when it can. Chris Angelico