How to create a code generator in gs? How apple gives promo codes?
famekrafts
Member, BASIC Posts: 834
Just like a serial code or promo code with text string, like what you get when you buy any software online, random, and gets generated only once.
Has anyone tried this in gs? I want to create such unique promo codes in side the game, unique for each device, maybe use random text, time, date and device id( if gs can read it) and mix them up to create a unique code, which gets showed only once.
Also can anyone enlighten me about how apple app promo codes are generated? I have not reached distribution part yet but if we can put our own promo codes when publishing, that might really help, instead of using the generator above. Is there any limit to promo code?
Has anyone tried this in gs? I want to create such unique promo codes in side the game, unique for each device, maybe use random text, time, date and device id( if gs can read it) and mix them up to create a unique code, which gets showed only once.
Also can anyone enlighten me about how apple app promo codes are generated? I have not reached distribution part yet but if we can put our own promo codes when publishing, that might really help, instead of using the generator above. Is there any limit to promo code?
Comments
They pretty much randomly generate unique strings. Who knows what method, but there isn't a format pattern.
It would be easy for you to do the same using device milliseconds, but the questions is if you want to check if it's unique. In that case, you can't do that between many devices. However, you COULD do that inside one device by storing in a table.
1. You can have an attribute with a predefined list of codes, but these should not be your actual codes - just the "CRC", since it is very easy to extract those from the gamesalad project (even when it is on the App Store).
2. Define your formula to construct the code from the CRC
3. Build the reverse logic to check your code
As there is no inapp purchase for now in my games, just getting the promo code work will be good enough.
so when we start the game we will load the promo code which will be 0 or invisible for now., make the attribute code to true
once the code is generated and shown, it will get saved and the code will become false, so next time the game starts it will not be regenerated.
the logic sounds fine? its just I cannot create a backtracker, the reverse logic part for this, as there is no guarantee what system time is on the player device.
The problem is how will I check whether the promo code has been given away or not? Manually can be troublesome if there are many thousand downloads.
You are just gonna have to accept that you can't verify if a code has been given away or not. In fact, because of this, if you give away codes such as "remove all ads" or "get this and this" you run the risk of any player you give the code to, giving it away or posting it online for the world to use.
Because of this, you have to decide if that risk is worth it and/or make the promo's gifts you give away acceptable to be had for free.
OH HOLY !@#$%!! I THOUGHT OF A WAY!! SORT OF!!
brb, gotta code some !@#$%.