How to Make A Product Key to Enter in a Game

Started by G_G, August 19, 2008, 09:10:07 am

Previous topic - Next topic

G_G

August 19, 2008, 09:10:07 am Last Edit: August 23, 2008, 11:18:59 am by game_guy
Enter Product Key System
Version: 1.0
Type: Easy



Introduction

Enter a product key so that it enables it to play the game, or if you use the other version you can have a timer that allows the players to enter the product key when the timer is over.


Features


  • Makes players enter a 4 digit number 4 different times
  • Using branches you can make your own product key using this system.
  • Instead of an immediate avctivation enter, use a timer so the player has to enter the key when times up
  • Easy to use and easy to import from the demo into your game



Screenshots

I dont think screenshots are required, its just Input Numbers.


Demo

Product Key Demo


Instructions

Keys for demo are
4902 8827 9123 3549
1846 9098 6733 4001
8034 9544 5433 2459

This is really really simple, and can be done in a few ways. I like using Input Numbers, so at the beggining of the game, Make blank map and have an autorun event. This event will allow us to enter in the codes, so enter this for starters

InputNumber:[xxxx:Code 1] 4 Numbers
Ok the maximum digits allowed is 8 so we need 4 that way we can do easy variable checking later on. Normally product keys are 16 numbers long including the dash - but we cant do that unless you want to use Name Input. Now we go onto code parts 2 3 and 4. Cuz 4x4=16 Yay I know basic math! Ok so lets enter the next 3 code parts

Input#[xxxx:Code 2] 4 digits
Input#[xxxx:Code 3] 4 digits
Input#[xxxx:Code 4] 4 digits

Now when done entering that it should look like this.

Input#[xxxx:Code 1] 4 Numbers
Input#[xxxx:Code 2] 4 digits
Input#[xxxx:Code 3] 4 digits
Input#[xxxx:Code 4] 4 digits

Now comes the conditional branches. so lets make a code first,
Code 1 will be 4902
Code 2 will be 8827
Code 3 will be 9123
Code 4 will be 3549

So now we make the branches like this

Branch if [xxxx:Code 1] = 4902
  Branch if [xxxx:Code 2] = 8827
    Branch if [xxxx:Code 3] = 9123
      Branch if [xxxx:Code 4] = 35 49
         Thank you for purchasing ###game name here###
      Else
         Sorry the product key you entered was invalid.
     Else
       Sorry the product key you entered was invalid.
   Else
    Sorry the product key you entered was invalid.
Else
Sorry the product key you entered was invalid.
End


TIME TRAIL VERSION BELOW
Thanks Fantisist, and an update on an even better enter product key, have a parallel process event that has a 15 minute timer, then branch it when timer is less then 0 minutews and 0 seconds enter in a variable that counts the number of saves ay just enter this in in a parallel process,

Control Timer Start 10 Minutes
Branch if Time is less than or = to 0 minutes and 0 seconds
  Label 1
  VariableOper[xxxx:# of Saves] = to save count
  Switch [xxxx:Demo Done]ON
  Open Save Menu
  Variable Oper:[xxxx:Current Saves] = to number of saves
  Branch if [xxxx:# of Saves] is = to [xxxx:Current Saves]
    Jump to label 1
  Else
    Call Event Enter Product Key
  End
End

This way they can play a small demo of it too see if they want to buy it or not, and in the enter code when it says Thank you for buying this game, turn the switch timer off, and when it is wrong have them return to title screen and the reason for the saves, is because when it opens save menu we need them to save so it saves the switch being turned on, then on another parallel process if they try to load their game have a branch if Switch Demo Done is on then call event Enter Product Key.



Credits and Thanks


  • Creditz go to me for thinking of it
  • Creditz go to me for making it



Author's Notes
If this event code above is too confusing or one of the things isnt working just download the demo and use the event code thats already in there.

Remember to credit if you use!
Summary::
Ok so in the long run we have a timer on how long they can play, when times up, they have to save, if they dont they will keep having the save menu open until they save, they need to save so the Switch Demo Done is on so if they try to load it, it will keep calling the Enter Product Key event, if they start a new game well, let them play the demo again.

An easier way to do this without the timer:::
Have a certain point in your game, where the demo will stop and then call event Enter Product Key.

Product Key Fix::::::
The branches with the if variable code 1 is xxxx well you'll need more than one branch group, ok a branch group is a group of branches like so

branch code 1
  branch code 2
    branch code 3
      branch code 4
      else
    else
  else
else


You'll need quite a few of these unless you want one person to buy it and tell the whole world the one and only enter product key number, then be my guest but you'll need a few branch groups to actually have this work like a real product..

Off topic
Umm I ran out of medication today so I cant think all that straight right now, if there are typing errors or I didnt type something right, tell me.

Fantasist

Simple and does the trick, nice game_guy :thumbsup:
*powers up*
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Blizzard

But you won't be able to have more than one product key.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Fantasist

Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Blizzard

Interesting. I'll move this into event systems. How about you update your first post and apply the event system template? I'd move it into database if you did that.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Starrodkirby86

If only an algorithm does some product key system. In fact, if you can make a product key that is random dependent on the savefile/RPG_RT, and then put it into some confusing Variable eventing formula, I'm pretty sure you can make something that emulates the Shareware items. :) A good make nevertheless under obvious tactics.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).