Game serial number generator

Could someone tell me how to or where to find out more on how to put a serial number on my game so when someone buys my game they get emailed a key for that email and copy of the game.

I want something like Escape from tarkov does.

I am not worried about others getting in to my game or making the same game, But I want to stop them from buying my game from my website and then uploading it all over the place just to bypass my website to make me lose that money for my hard work. You can’t go around suing little kids or 30 year old kids for uploading your game because they don’t like you or think it’s funny to hurt you. I have dealt with this in the past and still do and it can be a money killer! put hours of work in and upload your beta work to your website and when in the hour it’s all over the place uploaded. Game addon mods are really bad for this.

Can’t make money off your ads on website for the work you did because it’s all over on others websites getting the ad rev.

I would put the game on steam but all it takes is a few bad reviews without testing the game and then your game is done for even if it’s the best things others really been looking for.

If you want an automated system, it’s going to take a little work, and a bit of cash most likely as well.

Presumably, you want the following features:

  • Keys can be generated
  • Keys stored in databases
  • Keys can only be activated once
  • Keys are emailed out upon purchase

First off, you’re going to need a website with a database. I recommend Wordpress, since it’s simple enough to set up, and it does user accounts for you.

Next, you’ll need to create a custom database table for your keys. You’ll want an ID, a key, an email or user ID, and an ‘activated’ column.


You’ll then need to create a few custom PhP functions.

  • One that modifies the default email sent out upon purchase to have the key sent out
  • One that generates a unique key and stores it in the database with the associated user info
  • One that can be called from within your software to activate the key
  • One that the user will ping with their account whenever they start up the software to verify they’re legit.

Once all that’s done, you can throw it together and you’ll have a fully fledged authentication system for your game :slight_smile:

What you are trying to do here is called Digital Rights Management. In particular you’re looking for a Product Key solution. That’s a totally valid way to try to stop users from stealing your software. Of course it’s important to note that nothing you can ever do will stop your users from eventually distributing your software for free anyway.

Zaeran described a good system to implement a product key solution, one that requires a reasonable amount of work and money and should be effective for a while if implemented correctly. When looking for a DRM solution, it’s fairly accurate to say that effectiveness is directly related to effort and money. For example, a less effective but simpler method would be to simply put a password on your software. But on the other end, you could implement anti-tampering software or even purchase a service to do it for you.

If you’re serious about protecting your software from being stolen you might want to find an expert. But really, in the end there’s no use. Most multi billion dollar companies can’t stop their games from being pirated in the hour.