Hacker News new | ask | show | jobs
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.

1 comments

This reminds me of the write-up I saw about the Spyro games for Playstation. It has a similar result where a copied game would progressively become harder and impossible to beat. They had the same reasoning, most people pirating/patching the game won't play it all the way through before releasing their results.

https://www.gamasutra.com/view/feature/131439/keeping_the_pi...