|
|
|
|
|
by IIAOPSW
2017 days ago
|
|
Way back when monetized flash games were a thing, there was a problem of ad piracy (people who would decompile your game and then upload and monetize it as their own). The conventional wisdom at the time was that piracy could only be delayed, not prevented. The reasoning was that a piracy check has to read the sites URL at some point and the hacker can just search for the only command in all of actionscript which does that. My game contained a very standard check url type protection. This was not the real protection. This was the piece of code which the hacker was supposed to notice and remove. Early on in the game there was a function call to get the total number of bytes in the file and then divide it by the number of expected bytes. Ostensibly this was to calculate the size of the loading bar. I stored this information in a forgettable global variable. On the surface this looks like the sloppy coding one expects from flash devs. But the real purpose was so that I could later check if this number was not 1.0 and trigger the true copy protection. Long story short if the number of bytes were incorrect then the game becomes unplayable after a few levels. I thought that was a nice touch since these hackers usually didn't play though enough of the game to test if their hack worked. |
|
https://www.gamasutra.com/view/feature/131439/keeping_the_pi...