GMS 2 Coupon codes system

J

JayR

Guest
Does anyone know how I can set up a coupon codes system? Are there any good tutorials out there on this subject?

What I intend to do is have codes that unlock certain skins / get free gems / etc.

The code can only be used once (main importance).
But if the code can also be used for a period of time or a number of times would be great (secondary, not really important but good to have for flexibility/scaling).
 

NightFrost

Member
Well, in general terms limited-use and limited-time means having that information on an external service. So you need a http connection system, plus possibly a user identification / login system because you need to know who owns what, as that information really can't be trusted to be saved locally and should be checked when game starts. I haven't built http systems on GMS so someone else has to chime in on that, but your service side would check the sent code's valid date, usage count (and decrease it by one), then call your game back and tell it what to unlock / add. Same thing on game start, it calls the service and asks what has been unlocked - plus the amounts of bought consumables like gems. Since money has been paid for those, I assume, then it would be very unwise to trust what the client side might have to say about their ownership.

EDIT: oh, I didn't notice the android tag there. I haven't done mobile dev, but didn't google store have this stuff built in?
 
J

JayR

Guest
I somewhat understand the general idea of what you mentioned. But if I was to actually do it, I don't know where to being. For example: What website to host a server on? Can I host a server at home if my comp is running 24/7? Do I need to know other programming languages like python, php, etc? Are those programming languages universal across all server hosting platforms or do some use other languages like java, etc? Are there free options? Can I use Dropbox? I have a website on Squarespace can I use that?

What I just mentioned is just me not knowing where to start. Basically the technical aspect of things. Perhaps there's already a solid tutorial out there that cover these fundamentals?

Yes, Google has some of this but the Play Console is a bit hard to understand. Even if I find my way around, I need someone to write me an extension. But then there are Yoyo's own Google extensions. What if something I require isn't done by them yet?

Sorry... I just don't know where to being. I don't have the time to aimlessly watch hours of tutorials to figure things out. Worst come to worse, I'd probably pay someone to do it for me. Even then I at least need to know some basics to understand what's going on. So anyone pointing me in the right direction would really mean a lot :)
 
Top