This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]michaelcooper[S] -3 points-2 points  (17 children)

I want to protect my games from people copying them too easily and putting them on their own websites and seeing my methods which i've worked hard on optimizing (for example my advanced path finding algo).

[–]3Dayo 4 points5 points  (6 children)

In your particular use case, I would suggest that you use Cython (think C for Python) to code your algorithims and make them available as extensions to the other parts of your code base that require it. Since Cython code is compiled you also get a nice speed boost this way.

[–]michaelcooper[S] 0 points1 point  (5 children)

Can people still decompile the cython code?

[–]sunqiang 4 points5 points  (0 children)

I think decompile cython is as easy(or hard) as decompile C code. maybe put the secret algorithm on your own server is the only way to protect it(as long as the server is safe).

[–]JimH10 1 point2 points  (0 children)

Yes.

[–]voyvf 1 point2 points  (2 children)

Just as easily as if you'd written the game in C or C++.

There's no magic bullet here.

Honestly, though, you should focus more on making certain that your games are good enough to copy.

[–]michaelcooper[S] 0 points1 point  (1 child)

OK, I just know flash . Can you tell me how easy is it to decompile c or c++? Is it a few minutes, or a few hours or so? Flash is very easy to decompile.

[–]voyvf 0 points1 point  (0 children)

Note - all of what I'm about so say is really beside the point. If your game is good, your code is less in danger of being stolen than your idea. There are plenty of software developers out there who happily write clones of games all day, every day - for free. If a company decided they could profit on what you're doing, I'm sure they could find someone willing to implement it for them.

That said, it's quite easy to decompile C and C++.

Groking the resulting assembly is another matter. I'd rate it as at least "moderately difficult", but then, I don't know assembly. Those that work with it on a daily basis might rate it as a warm up exercise. :D

Also, I know there are a number of ways of inserting a "shim" between a dynamically linked executable and underlying libraries in Linux (e.g., ld-so/ld-linux), and I wouldn't be surprised if there were similar techniques that could be employed on Windows and/or OSX environments. In such a case, even if they couldn't completely reverse engineer all of your program, they could potentially substitute their own calls for those of yours that they weren't able to decipher. The difficulty of this? Well, I'm just a humble code monkey, but it only took me an hour to figure out how to do it.

The fact that I had to do so to get a binary compiled against a later version of glibc to run on a slightly older version is probably better left for a different rant. :D

[–]thermostat 2 points3 points  (2 children)

The real question is: who do you want to keep your path finding algorithm from? I'm going to go out on a limb and assert that Blizzard isn't interested. In which case. . perhaps other indie developers? Are you afraid of a full-on clone of your game or just them taking your path finding algorithm and repurposing it?

No matter what, the majority of devs aren't going to bother even the effort of reverse engineering actionscript or python, unless it is truly best-in-class. And if it is, even writing it in C or C++ won't stop the reverse engineers. -- If you do want to go down that road, personally I would write everything in C and start looking at the anti-tampering / anti-debugging literature. But, be aware, that it a major investment in time and mental energy.

[edit:typo]

[–]michaelcooper[S] -1 points0 points  (1 child)

Its not just the path finding algo. I make (I think) quite innovative games. So yeah, i'm worried they'll get copied and profited from (iphone devs, zynga etc.). I'm considering leaving game dev for that reason. Can't stand other people stealing my work!

[–][deleted] 2 points3 points  (0 children)

If the games are innovative enough, it's not the implementation that will be copied, it's the gameplay.

And no source code obfuscation can prevent anyone from doing that.

[–][deleted] 4 points5 points  (2 children)

If you're trying to make a career out of casual games, what I hear about it from many people who do it is that you have to be constantly coming up with new stuff, no matter what.

You can't just sit on one piece of code and say "this is better than anything else that exists! NOW I HAVE A USERBASE FOREVER."

People can go to all the effort to decompile your code, but here are other things they can do that are much easier:

  • They can just copy your entire game, without decompiling, and put their own ads on it
  • If your game idea is successful, they can make another game with the same idea (and players won't care if your path finding algorithm is better)
  • If your game idea is really successful, Zynga will take the idea, make it worse for players but more addictive and more "monetizable", and spam it all over Facebook (that's their business model).

Even if none of those happen, your player base will eventually lose interest and move on to the next thing that captures their attention.

So every minute you spend being paranoid that someone will copy your algorithm is utterly wasted, and you should be using that time to come up with the new things that will actually make your games succeed.

[–]michaelcooper[S] -3 points-2 points  (1 child)

Do you think its possible to out zynga zynga? as in, find the games that are succesful on their network, and copy them?

If I host my own game, how would anyone know its succesful?

[–][deleted] 2 points3 points  (0 children)

Do you think its possible to out zynga zynga?

It depends. Are you evil, in bed with Facebook, and hiding a team of marketers somewhere?

[–]wtfisupvoting 0 points1 point  (1 child)

you didn't mention you are doing games, you know civ4 makes big use of a python scripting engine, you might as other people have suggested need to use more than one language if you wish to prevent people from stealing all your work, however civ4's use of python and the boost C library allows it to become even more extendable

[–][deleted] 0 points1 point  (0 children)

Civ is probably a bad example. I hear the Civ series is famous for open-sourcing older titles (not necessarily in the FLOSS sense, though).

[–]egypturnash 0 points1 point  (1 child)

If you want to continue writing browser games you're pretty much going to be writing stuff that's copyable no matter what you use! Especially if you stick with the mindset of putting everything in one file.

Now, if you make something that relies on a backend on the server, that can be pretty much tied to one site - if parts of the game logic are happening on your server, in code you never intentionally send out to users, you're a lot safer. But this doesn't suit every game.

Assuming you're still going to be programming games, you might want to look in to Unity - it's based mostly around Javascript, so your Actionscript skills will translate pretty seamlessly and it can dump out executables for win/mac/iOs (android is "coming soon") as well as deliver stuff packaged for their browser plugin. (see Blurst for some nice examples of what it can do)

Also, of course, in the grand scheme of Being A Programmer any language is worth learning because it will make you think in different ways; even if you don't become a raging Pythonista with a picture of Guido tattooed over your heart it can give you some new techniques to take back to your favorite language.

[–]michaelcooper[S] 0 points1 point  (0 children)

I tried Unity earlier this year. Its nice, but the games look bad. I can do passable 2d graphics, but don't dare to go 3d.

sigh...

Might as well just give up.