- Home /
Redeem / Bonus codes system
Hey guys. I was wondering what it would need to create redeem/ bonus codes system. I mean like generating random code and storing its information somewhere. And then people can insert that code for unlocks ect. Thanks :)
You $$anonymous$$ean Like "Heres A Code! Thanks, I Will Use This!" Then They Go Home Put The Code In The Game, Then They Get A "Prize"?
If So, You Could Do Something Like This
public string PossibleCode;
public string $$anonymous$$yCode;
private bool CanDoThings
void Update() {
if($$anonymous$$yCode == PossibleCode) {
CanDoThings = true;
}
else {
print("Its A Fake!");
}
if(CanDoThings) {
//DoStuff
}
}
That $$anonymous$$ay Not Work, But $$anonymous$$aybe.
Answer by xt-xylophone · Nov 05, 2013 at 01:41 AM
If you know the codes before you ship your game then you can just have them in your code or saved in a file in the game and read later to check for validity. Then you can manually distribute them when you want or have the game give them automatically at certain times.
This obviously gives the possibility of someone finding the codes in the game. You could go into encryption to secure it too or you could do it over the net.
Have a service running that validates entered game codes. Using this means you control all redeemable codes. You can add or remove or flag certain ones. This does have the downside of requiring a connection.
Your answer
Follow this Question
Related Questions
WWW class and PHP security issues 1 Answer
Unity MySql connection 0 Answers
WWW Form C# on Android 0 Answers
Requsting help with a crossdomain.xml file issue. 1 Answer
Live chat using MySQL? 0 Answers