Panda python code issue

Return to General Discussion

Panda python code issue

Postby candam » Wed Mar 28, 2012 7:26 am

Hello Guys I'm very new to panda3d but I started to learn python and it's ok for now but I have problem
is there a way that I can comiple my panda3d python code
if there is not then it would be terrible because my code would be reaveled for everyone I hope there is a solution and thank you in advance
candam
 
Posts: 9
Joined: Tue Dec 20, 2011 6:17 pm

Postby DangerOnTheRanger » Wed Mar 28, 2012 10:42 am

I think the two easiest ways to accomplish what you're looking for are:

  • Use the compiled .pyc files Python generates when it runs a Python script and distribute those in place of your .py files
  • Use Panda's built-in tools that basically automate the first option for you


That being said, I think you shouldn't use Panda until you've learned Python to the point where you're comfortable with it - it will save you a lot of time and trouble in the long and short run.
Free + open-source game development kit: http://openblox.sourceforge.net

My blog: http://dangerontheranger.blogspot.com
User avatar
DangerOnTheRanger
 
Posts: 240
Joined: Fri Aug 27, 2010 4:59 pm

Postby flavio » Wed Mar 28, 2012 11:43 am

DangerOnTheRanger wrote:Use the compiled .pyc files Python generates when it runs a Python script and distribute those in place of your .py files

Small addition: afaik pyc files are version-specific (you can't use pyc files built by Python 2.x with a Python 2.y interpreter, with x != y), so DangerOnTheRanger's second suggestion is way better.
Image - Image
flavio
 
Posts: 546
Joined: Fri Apr 16, 2010 12:45 pm
Location: Rome, Italy

Postby candam » Wed Mar 28, 2012 12:47 pm

guys thank you for help but I don't understand is panda supporting something that can protect your code privacy ?
candam
 
Posts: 9
Joined: Tue Dec 20, 2011 6:17 pm

Postby flavio » Wed Mar 28, 2012 1:07 pm

pyc files are compiled files, you asked for compiled files in the OP, and both solutions rely on pyc files. Ok, pyc files are weak (from an obfuscation point of view), anyway your code can be attacked by reverse-engineering whether it is a pyc file or an executable file, ... Executables produced by Panda's deployment tools are executables which contain pyc files, and you could obfuscate them. Anyway your code could be still attacked, there aren't client-side solutions. The only solution is to store important code on server-side. The pragmatic approach is to not waste time in protecting code (face the problem only if this is crucial).
Image - Image
flavio
 
Posts: 546
Joined: Fri Apr 16, 2010 12:45 pm
Location: Rome, Italy

Postby ThomasEgi » Fri Mar 30, 2012 7:49 am

long story short: no. the second you ship your game, you lose control over your code. there is absolutely _no_ way around it. it is, physically, flat out impossible.

if someone want's to mess with your code, he/she will do so, no exceptions.

wasting time to get around laws of physics is not recommended. if you use pyc files and panda's packing system that should hide your code from most unskilled and curious eyes. but that wont prevent serious hacking.

if you have a multiplayer game there are a few simple rules:
1.) never trust a client
2.) never ever trust a client
3.) try to make sure that a messed up client wont hurt other people's gameplay experience.

for single player games, just don't care.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby Nemesis#13 » Sat Mar 31, 2012 1:28 pm

There is absolutely no need to be shy about code. If it works, it's good! You'd wonder how people sometimes change their mind from "bad code" to "good code" once they actually use the program.

If you speak about hiding as in obfuscating in context of copying games in binary form, then there is no real solution and you shouldn't really care until you earn serious money with your game. Milion-heavy publishers try making their games copy-safe and spend much money and time for that - the result is a new one-week-challange for a cracker and a new entry on file sharing sites.

Most projects die not because of opponents copying code, but because of not finishing anything. And one reason people don't come up with anything is caring about things like this instead of concentrating on what's important.
User avatar
Nemesis#13
 
Posts: 1041
Joined: Mon Aug 04, 2008 8:09 pm
Location: Germany


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests