BGE Anti-piracy System

  • November 04, 2015
  • Blender 2.7x
  • Render: Blender Internal
  • Creator: RedFrost
  • License: CC-0
You must be logged in to download.


I have been thinking about how to make an anti-piracy system for my games so that when I sell them, nobody can steal them. I devised this simple but clever method for piracy checking for games that you want to sell. What the program does is first, read a file. If it is the first time starting the game, there will be no file to read because the script did not create it. After a one second delay, it will create the file. In the file is the name of the computer. The game runs smoothly. The second time and every time after that, the file will be read because it has been created. It will get the contents of the file and compare it to the name of your computer. If they equal each other, the game will run smoothly. If not, it will add an overlay scene (which will be the piracy alert) and it will suspend the main scene so that the original file will not be re-written with the computer name and thus rendering the piracy checker useless on the following runs of the game. I hope you enjoy this game asset.



  • spenny profile picture

    clever ;)

    Written November 04, 2015
  • poifox profile picture

    Too easy to hack. :p

    To do this effectively you'll want to look into hardware detection and serious cryptography.

    Edited November 04, 2015
  • Lomar profile picture

    Hmm. Maybe it's just my fuzzy brain, but I don't see how this would prevent someone from copying the program file prior to running it. And to be effective, the "gotcha" file would have to be placed somewhere the user would not see it, yet would copy it in the course of "pirating". Also, if someone changed the name of their computer -- a legitimate thing to do -- your game would stop running.

    If I'm crazy, please correct me.


    Written November 05, 2015
  • RedFrost profile picture

    If someone would be selling the game, they would have a startup program which would handle everything in a data folder. The startup program would start the blenderplayer then have it read the blend file. You could change the directory of the Names.txt to a location deep inside a working directory hidden between python scripts. You could also change the extension from .txr to something else like .dat to make it harder to read. You are true however about changing the name of the computer though.

    Written November 05, 2015
  • Lomar profile picture

    OK, fair enough. But if someone has a habit of saving a copy of every download before opening the file, they can easily still give away copies.

    Copy protection is a touchy issue. Some very large companies have copy protection so severe it drives away honest people. Bad news. And, with the internet, many very successful businesses give away their product, then sell services to companies and institutions. Really cool, but it doesn't work for a game.

    In any event, there will always be some piracy. Copy protection works like any hardware lock: no lock can stop all comers, it can only slow them down. The tougher the lock, the more likely a thief will decide that they'll get caught before they defeat the lock, thus it's not worth the effort. Copy protection is a tough call for anyone.

    Good luck with your game! Peace.

    Written November 06, 2015
  • poifox profile picture

    I think the best way to protect your investment against losses is making something people want to buy. Piracy will happen, no matter what measures you take to prevent it, someone will find a way to hack your security.

    If you create value for your game, that is, you make it so engaging that people will want to pay for it, then you're doing things "right." Gameplay, story line, and attention to details will give you more rewards than trying to "protect" your game from being copied.

    But you have to be careful, don't promise anything if you're gonna deliver. If you make an amazing trailer for a disappointing game your players will hate it, and they're way less likely to buy things from you in the future.

    That's my two cents :)

    Edited November 05, 2015
  • MORENAVAJ profile picture

    no secure enough

    Written February 09, 2017
  • scinceman96 profile picture

    Code needs to be at least 200 or so lines long to be secure enough. This code needs an erase the software file. Loud noise , camera shakes, all light removed, and more.

    Written October 27, 2018