PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Having a protection in new game?

Dear all,

Do you think it is necessary to add protection routine (such as checksum) for prevent program from cracking? If so, I wonder if someone can tell me how to start.

JoJo
I personally vow that if I ever have copy protection in games, it will not at all hassel the people that actually paid for it. With that said, Id say put enough in to make the casual user not be able to beam it to a friend, but reguardless it WILL be cracked. When it is cracked, its easy for a person to beam it around at will.

I think the best way to create a copy protection is generate some sort of key by username. That way no matter how many new devices a person gets, thier name never changes and neither will the code.

The stuff that generates codes per ppc serial is what really gets me aggervated.
Although I agree that protection will always be cracked no matter what you do, I think there is a certain amount of prudence in putting something in. If you can fend off the pirates for a few days or, with luck, a week or two, that helps sales, and it's about all you can realistically ask for. Well, I suppose we could realistically ask people to not do unethical and illegal things, but let's not start THAT thread again! ;)

As DillRye said though, you have to make sure it's not inconvenient for the user. That will kill you worse than being pirated.

I'm currently toying with some ideas for my next game release, but I haven't made any decisions yet... What I've come up with is this (feel free to steal the idea if you want)...

When you purchase the game from Handango (which will be the only distributor it's available from for reasons you'll see later), the user will download essentially a trial version, or they would have done that already, either way is fine.

When the purchase occurs, Handango sends an eMail to alert me of the sale. I now have an automated process set up that is activated when that eMail is recieved.

Based on the Handango sales number (which is a God-awful long-ass number, that's why I said only they would distribute for me) I create a 10-digit code based on my own custom algorithm. I then send this number to the user via the eMail address they entered. They can also at any time log on to my web site, enter their name and purchase number, and retrieve the code (in case the return eMail doesn't go through).

Once they get this, they enter it and off they go. eMail is fairly reliable in general, and Handango seems to send the notification eMails immediately, so I would expect a user to not wait more than a minute or two before they get their code. I will of course inform them of all this at the time of purchase. In addition, Handango sends a nightly file containing all your purchases. I will have a process that compares this with what got added throughout the day, make sure nothing got missed.

Now, the protection itself is checked at numerous points throughout the game, using variations on the check code, so a would-be cracker would have a little tougher time of it. It also stores the values that are checked to indicate the game is registered in a number of locations (registry, various files, datastore, etc.). Lastly, I do a custom checksum check on the executable and check this in various spots throughout the program, again with varying code. Should make it tougher to tamper with the executable.

I know that sounds like a lot of work, but a while back I wrote a program that takes in source code and basically re-writes it randomly. It winds up being functionally equivalent, but it usually looks totally different each iteration, so I'm really just writing the code once or maybe twice and using this process on it after.

This to me seemed like a reasonable compromise in convenience and protection. Again, it's not going to stop anyone cold, but I do believe it would slow them down. It's elaborate enough to give crackers headaches for a while, but not such an inconvenience on me to implement or end-users to deal with (I think).

In addition, should a code be released, one of two things is true: either (a) they figured out my algorithm and wrote a keygen, or (b) someone bought a copy and gave out the code. In the second case, I at least theoretically know something about the purchaser and could potentially do something about it, but chances are they used fake information, so it'd probably be a dead-end anyway.

I suppose the web site could be hacked too, but presuming I'm a half-way decent admin and web developer, that shouldn't be a huge concern. Besides, you can't cover EVERY base I figure.

Like I said, these are just ideas I'm tossing around, what I've implemented already wasn't actually done specifically for this protection scheme, so I've basically put no real work into this yet. Feel free to use the ideas, or derivates, if you want.
I found this on The Register today:

http://www.theregister.co.uk/content/4/29619.html

In the last paragraph, one particular european firm that has developed a copy protection mechanism for software says..

Says the company: "Usually games publishers use copy protection to keep the maximum sales during the first two-three weeks after release." Which seems about achievable...

Which seems to be along the lines of what fzammetti is saying.

<SOAPBOX>
Software piracy is the number one reason why I'm not spending my spare time developing Pocket PC games. It would really piss me off as a developer to know that the sacrifices I made in my personal life to spend my nights and weekends designing, coding, and debugging a game would be for nothing. Anyway, that's how I deal with the piracy issue - I don't.
</SOAPBOX>
fzammetti, you also don't want your program to become such a challenge to hackers that it becomes some kind of prize to find a way to hack it, a target for the crackers.
Digby: That's an awfully gloomy way to put it. It's like if all the car manufacturs (yes I can't spell) all walked about because they didn't want their cars broken into.
Conan · 06 Mar 2003, 23:13 UTC — Protection methods etc
The good news (believe it or not) is that there are lots of people willing & able to purchase software. Regular honest people exist & outway the kids with their dad's old PocketPC who frequent warez sites. Just make sure that your protection is good enough to stop the casual hacker.

I'm not offering any new ideas but there are a few mention on this board. Do a search.

Whatever approach you take make sure you look after the registered users so that they get a better experience than the 'wankers' who can't bring themselves to pay for other people's labour.
I think the best compromise is to do what it will take to keep the honest people honest. Similar to locking your front door it keeps most people honest, but a determined criminal will be able to get past your lock or get in another way.

The majority of tricks you can attempt are worthless if the cracker can just put a nop in place of it and subvert the check/protection. For instance any sort of CRC for checking the binary is simple to bypass, so doing that to prevent a cracker from actually changing any other check (like a serial) is worthless since the cracker is modifing the code already and rerunning it after a crack will catch your CRC. You can delay this by not doing it initially, but eventually someone will find it, and then the cracker will remove it.

Just using a name based serial can prevent the average user from distributing it online, since its assumed that you could find the serial reference and hence the name of who owns that serial. But this person could still give it to their trusted friends and use it multiple times themselves on different machines. Using a machine based serial prevents both trusted friend sharing and multiple machines, but annoys the non-criminal user who upgrades to a new machine.

I generally dislike serials because it requires input from me, and they are usually way longer than they need to be. If you expect a billion users then 20 digits might be needed, but the rest of the software in the world you need far less. And in light of what I just said, your serial (usually removed completely) will be cracked so you only annoy a valid customer with its length.

I also don't think there are technical barriers for cracking, you either know what you're doing or you don't. Making a more difficult serial doesn't cut off any cracker skill level. What you see most often is many checks, or a lot of obfuscation, all this does is delay the process. If 1 check takes 10 minutes, then 10 checks at most take 100 minutes. What can delay a considerable time is using the game to delay the process. If its a 20 hour game, doing a check after 10 hours buys you a day, maybe.

I haven't seen any real evidence any of this does anything to reduce real piracy. When I was young and pirated software, it was never a question of I want game X, if I can't find a pirated version I'll go buy it. It was always, what pirated games can I find, I will play them. In other words I don't believe any of this can matter for your bottom line, a pirate is a pirate, if he can't play your game he will play another. I don't mind if a pirate plays my games, so my protection is minimal or directed at casual piracy only.
James, I thought of that too, but the way I see it, assuming the software doesn't suck, they are going to crack it pretty quickly anyway (I know because back in the C64 days, I was an active member of the pirate scene... I know how it works pretty well). So, whether it's a challenge to them or not, it's just a matter of time.

You know, come to think of it, there's the perfect copy protection: just write software that absolutely sucks! Yeah, no one will bother to crack it then! :)
Not even that is enough, Emcom apps get released :P
Smirk Has the right idea, keep honest people honest. Don't try to fight a war. Most of the people who will pirate your game probably wouldn't have bought it anyhow. You hear about people with gigs and gigs of pirated material, but honestly I can't see them using it all. It ends up being a prize. Good games make good money, if someones game isn't making money, most people blame it on pirates, I think this is a never ending cycle of blame that gets me a little aggervated.

Personally I don't have a single app on my PPC that is pirated, Im not condoning pirating at all, its definatly wrong. Alot of people end up blaming thier lack of sales on this when its actually a much simpler answer.
Conversely, whenever I see someone say that piracy doesn't have an impact, I get a little aggrevated.

But again, let's not start that particular thread again.
It has an impact but it's not going to make a game sink or swim. Warez is a constant, not a variable factor.
I am a bit curious, do you blame lack of sales on warez?

Oh and for the Emcom games, I can almost in perfect confidence say no one would have bought them anyway :)
I'm with Digby on this one.

As a part-time PocketPC "game developer", I'm not exactly rushing to produce stuff either - somewhat because of the piracy issue. As Digby said, at least for a lone-wolf developer, it would take an awful lot of effort to build a game (bear in mind, I mean a "proper" game with decent content, not another connect-4 clone or whatever)... and within days of going on sale it would be hacked and distributed.

For a big company selling a PC game, hey, that's life, they can factor it in. For a lone-wolf on a small platform it's a death-sentence (IMHO).

Once in a game (it was a game called FireTrack on the BBC Micro), a coder had embedded the comment:

"If you pirate this, you're STEALING MY WHOLE LIFE'S WORK ...if you won't buy FIRETRACK, what WILL you buy?????"

And as a lone-wolf I'd feel very similar.

I write stuff because it's fun to code. I don't know how to explain it, but you've got to see that from a developer's point of view (mine, maybe others), writing a PocketPC game just to have it stolen isn't "profitable" (either fiscally or emotionally).

It's like if all the car manufacturs (yes I can't spell) all walked about because they didn't want their cars broken into.


Bad analogy, IMHO. Take a small, independant car-company that doesn't produce very much (but when it does it's high quality) - and steal one of their cars. Break into it. Duplicate it upon request and give it away for free.
It is great to have so much feedback.

Personally, I believe that a software will be cracked very soon.

My idea is that we do not only sell software but also our service. It makes a cracked software less valuable.

I want to combine low price and frequency update for improvement with some ways to delay cracking. It may make cracking valueless because cracked version gets only, says 2 weeks, life time. Of course, it means that I have to keep working on the program and it may not be a easy task.

For the checksum routine, I tried to get a checksum of a function in the program but I find that it always change whenever I make a change. I also find that the checksum show with breakpoint enable is different from normal execution. I wonder if someone can tell me how to fix it.
JoJo wrote:
For the checksum routine, I tried to get a checksum of a function in the program but I find that it always change whenever I make a change.


The easiest method would likely be binary modification. Write a seperate app that will look at your binary for a particular string, then put your checksum there. When running you revert the string and compare it to the checksum. You can use the same program to produce your checksum'd app as long as you use the same string to search for, and you can use the same code in your application to actually check the checksum.

Doing something like this you won't want to enable it until you are finished or it will be a big pain in the ass. What you will have to do is run your checksum building app on your final version, and then it will run. Prior to doing this your app would only find the search string in the checksum's place, and then fail to be validated and then do what you intend. For the last point I would not just quit, thats way to easy to track and disable.
http://slashdot.org/articles/03/03/07/0 ... ml?tid=127
THIS is what needs to be done, while the bonus CD will just get ripped, the extra downloads available to members with a valid CD-KEY are a great way to deter pirates who want to seriously play the game.
Speaking of hacking where are all these "warez PDA" sites, I wanted to see if any of my software was on them? (Dont post it, email me please)

The 2-3 week theme seems to exist in the PDA community, but I'd say its more like 6-8 weeks before std games come onto the warez market. But then again it depends if it's a hack or a serial post... and on the quality of the software, both in protection and "play-a-fun-a-popular-bility" :-)

-B
Dave Johnston · 09 Mar 2003, 11:25 UTC
Briefly going back to protection methods...

I like the idea where a serial/key is given to the user and then undergoes a basic check (on the client machine) to confirm its a legal key conforming to some function on it. However, the key would also contain data required by the game to set up certain variables for monster damage and so on. Then, a cracker might be able to pass the key check, but without a legal - properly calculated - key, the game will behave oddly since it would have been initialised with the wrong variables.

ie.

Key 'rule' is that all digits add up to uhh, 30.
Legal keys:
652142711, 299211141, 473214942...

Now for example lets consider a weapon in the game that does 11 points of damage each time it hits an enemy... this value is read from the sum of the first two digits in the key (6+5, 2+9, 4+7 etc...).

Obviously then, there are lots of keys that add up to 30, but many fewer who have the first two digits adding up to the required number (11) needed for the game to behave properly. A key like 218134533 would happily pass the authentication process, but in game would cause the weapon to do only 3 points of damage!

With more game variables created/modified in that way, the game would become impossible to play.


Any real implementation would obviously need to be more complex than this silly example, but it's a great way to get around some of cracking process. Of course there's still the problem of illegal key distribution...

(This method was first mentioned on the board a while ago, so full credit to them for it - I forget who it was... sorry!)
Very interesting way, but it may cause bad word to spread about the game (OMG TAHT GAEM SUXXX!!1111) but it would work pretty good.

Sounds a bit similar to what C&C; does - if the copy-protection is triggered, your buildings blow up about 30 seconds into the game.
Dave Johnston · 09 Mar 2003, 20:49 UTC
sponge wrote:
Very interesting way, but it may cause bad word to spread about the game (OMG TAHT GAEM SUXXX!!1111) but it would work pretty good.


That's the problem. Support issues. You need a check that is complete enough to stop users entering any old key, but not complete enough to give crackers room to create valid codes. It would still be possible for them to find a valid code by trial-and-error... but IMO it's a better approach than the common 'key fits hole' idea - more an extension than anything else :)

The only difficult bit comes in the maths... and we all loves maths, don't we?
I must say, I do!