Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Me and my (new) company want to sell a very simple game, but we want it so that only the person that buys it can play it.

I want to know if it's possible to make a "registration" window pop up when the game either first starts or when it is being installed (still haven't decided whether or not to use an installer or not). It would require the person to input a registration key and it would then check that key against a database to 1. check to see if it's actually there and 2. to see if it has not been used already. If both are true, it lets you install or play the game an infinite number of times on that computer up until it is uninstalled.

Is this possible in the c#/xna code, or would i have to use some advanced form of executable programming?

share|improve this question
And if the user accidentally uninstall the game? And if the user have to format his computer? Will he have to buy the game again? – Gustavo Maciel May 24 '12 at 3:06
have you considered a unique key system (a key is generated upon say download, and then that key is given in the receipt) though this might raise the issue of one installer- infinite installs – gardian06 May 24 '12 at 5:13
@Gustavo No. I want it so that when the person uninstalls the program, the key frees up again for them to use, but it dooesn't give out that exact code to someone else buying the game. – Adam Geisweit May 24 '12 at 10:18
@Adam Such a system would need to account for a user who has a hard drive crash and gets a new computer without having a chance to uninstall the game from the old computer. In my opinion, most DRM schemes are too complex to make up for the trouble to the user and the guarantee that they will get cracked. – Gregory Avery-Weir May 24 '12 at 13:08
You can use HTTP communication and server-side code for that , .NET provides webClient class that provides simple HTTP communication – Shvelo May 24 '12 at 18:40
up vote 9 down vote accepted

Your method sounds like it could be detrimental to paying customers. Rule #1 about DRM: Never screw paying customers. Sure, you may lose more copies to the pirates, but your paying customers will thank you.

That said, I'd look at either getting your game accepted to a platform like Steam or XBox Live that already does this user checking. Failing that, I would recommend maintaining a database on your own web server and require that users create an account and have to log in to play. There are additional security concerns when you are storing customers' private information though, so do some research before you get rainbow hacked.

The above methods will require an internet connection, but any client-side serial key mechanism you may conjure up can be cracked open by nearly any kiddie scripter. I would just steer clear of client-side serials if you were trying to follow rule #1.

share|improve this answer
I would argue that any kind of DRM beyond a one-time, local serial check at install time screws the paying customer more than it should. +1 for recommending Steam etc., but I've seen quite a few indie game companies that not only offer Steam versions, but also DRM-free versions via their websites alongside a Steam copy, bundled for the price of one. That way you get the best of both worlds: no DRM whatsoever, plus the unlimited availability and support via Steam. If I were to release a game, that's the model I would aim for, because it doesn't get more customer-friendly than that. – Hackworth May 24 '12 at 22:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.