Jibble

Author Topic: Unique keys for a commercial game - how?  (Read 385 times)

alkis21

  • AGS rocks
    • alkis21 worked on one or more games that was nominated for an AGS Award!
Unique keys for a commercial game - how?
« on: 14 Mar 2020, 18:03 »
I searched the forum and read some topics regarding commercial games, but I couldn't find anything related to my question, so here it goes:

I've been commissioned to create an educational adventure game for 1st-6th grade students (6-12 years old) in Greece. The buyer will buy the game from a portal they intend to set up, download it and then type the key they purchased to play it. The game includes educational questions, which depend on the grade the child is currently in, so the key they are buying is restricted to a specific grade. If they want to play the game for another grade later on, they will need to purchase a different key.

The above is fairly easy to set up. My question is, how do I prevent the same key from getting used again? My clients are understandably worried that classmates will just buy a single key and all use the same one. Is there a way for an AGS game to check an internet database to see if they key has been used before? How do I do that, and what do I need to tell the web developer?

Any help will be appreciated.

Click'd

    • Click'd worked on one or more games that won an AGS Award!
    •  
    • Click'd worked on one or more games that was nominated for an AGS Award!
Re: Unique keys for a commercial game - how?
« Reply #1 on: 14 Mar 2020, 21:17 »
"portal they intend to set up"...

Serious question, why not use an existing one, like Steam, or itch? They know how to handle this.

alkis21

  • AGS rocks
    • alkis21 worked on one or more games that was nominated for an AGS Award!
Re: Unique keys for a commercial game - how?
« Reply #2 on: 14 Mar 2020, 22:48 »
I believe that they intend to create a full educational portal, with online courses etc. So they want everything to be in one place.

Re: Unique keys for a commercial game - how?
« Reply #3 on: 14 Mar 2020, 23:07 »
If they have some system set up, with database etc, the best solution would perhaps be to write an engine plugin, that contacts that system and exchanges data, keys or whatnot. There are couple of existing plugins (like Steam/GOG plugins, and sql query plugin I've seen somewhere) that could be used as an example or starting point for this, or one could write it from scratch.

Re: Unique keys for a commercial game - how?
« Reply #4 on: 20 Apr 2020, 23:05 »
Here's another area where knowing how to compile a game file without the editor would be useful. A script on the server could generate a key for that sale and then compile an executable of the game with that key built into it.

Still, I don't know how you stop people from just copying the game file and sharing it and the key with others. It has been a while since I've played a Steam game. Do you have to be logged into Steam to play your game?

Re: Unique keys for a commercial game - how?
« Reply #5 on: 20 Apr 2020, 23:09 »
Here's another area where knowing how to compile a game file without the editor would be useful. A script on the server could generate a key for that sale and then compile an executable of the game with that key built into it.

This is possible to do now, there are tools that can unpack and repack the game file: https://github.com/rofl0r/agsutils

Since AGS game data is basically a library of smaller files packed together, you can add such key in a separate file, for instance.

Not sure about safety of such approach though. Maybe it's not that good at all. Depends on where exacty in game data did you plan to put the key.
« Last Edit: 20 Apr 2020, 23:13 by Crimson Wizard »

Danvzare

  • The Man with No Name
    • I can help with AGS tutoring
    • I can help with proof reading
    • I can help with scripting
    • I can help with voice acting
    • Danvzare worked on one or more games that was nominated for an AGS Award!
Re: Unique keys for a commercial game - how?
« Reply #6 on: 21 Apr 2020, 11:49 »
When it comes down to DRM, if you want something effective, you need to completely disregard the consumer.
One way I could envision doing this is a key that's somehow generated from the computer's name or something along those lines. But another way that I think would be more effective, is to require people to be logged into that portal to run the game. That way it would be connected to the account. Then all you have to do is kick out anyone who logs into the same account on more than two machines at the same time.