1 registered members (TipmyPip),
18,619
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Online Codes
#465802
05/12/17 23:20
05/12/17 23:20
|
Joined: Sep 2005
Posts: 352 Germany
preacherX
OP
Senior Member
|
OP
Senior Member
Joined: Sep 2005
Posts: 352
Germany
|
Hi together, as some of you may know, my game ( http://store.steampowered.com/app/339720/Debugger_316_HacknRun/ ) will go online on Steam next month. The game will teach the basics of programming and I want to show people how to program a small game with A8 and lite-c. Hopefully it will give A8 a new push! I talked with the developers of A8, we want to give the players the opportunity to buy A8 with a discount when they finish the last boss in the game. Now the question: The team behind A8 will give me a list with discount codes and I will put this list onto my server. What would be the best method to load one code of this list into the game and delete it afterwards in the list? Script examples would be nice! 
|
|
|
Re: Online Codes
[Re: preacherX]
#465810
05/13/17 15:44
05/13/17 15:44
|
Joined: Feb 2013
Posts: 122 Maysville, Ga
Evo
Member
|
Member
Joined: Feb 2013
Posts: 122
Maysville, Ga
|
I saw your post today and it started making me curious how this could be done using 3DGS. After playing around with a few ideas, I managed to create a working example for you. Overview : 1) Connects to a PHP file that will scan a TXT file holding coupon codes. (Server Files) 2) It then saves the coupon code to a TXT file in the project folder for the player and then deletes the last coupon from the list. (Coupon will also show on screen) You can download the example below and test it through my host. There are 50 coupon strings in the text file on my server. You'll be able to test it until the list runs out. NOTE : Place findCoupon.PHP and coupons.txt on your server and change the couponDir string in the example script. Hopefully this helps to point you in the right direction and allow you to get this working on your own server. Coupon Code Example : https://evoeon.com/freeDownloads/couponReader.zipNOTE: Security not included. Have a great weekend, Brian Pressley (Evo)
|
|
|
Re: Online Codes
[Re: Evo]
#465811
05/13/17 16:04
05/13/17 16:04
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Well, you'll need some security measures to prevent people from just getting all the keys.
POTATO-MAN saves the day! - Random
|
|
|
Re: Online Codes
[Re: Kartoffel]
#465813
05/13/17 16:09
05/13/17 16:09
|
Joined: Feb 2013
Posts: 122 Maysville, Ga
Evo
Member
|
Member
Joined: Feb 2013
Posts: 122
Maysville, Ga
|
True, security is important, but it's an example that's meant as a starting point and to give him an idea of how it can be done.
If someone knows the address to the current PHP/TXT examples, they can easily show the coupon codes in the browser. You'll have to work with the security to find a safe method to use it.
Either that, or find another, more secure, method. Working with online files, especially without a secure connection or password protection can be very unsafe.
I would recommend that you just send them a coupon code when they buy your game instead of trying to connect through 3dgs.
Last edited by EVO; 05/13/17 16:53.
|
|
|
Re: Online Codes
[Re: Evo]
#465814
05/13/17 16:57
05/13/17 16:57
|
Joined: Sep 2005
Posts: 352 Germany
preacherX
OP
Senior Member
|
OP
Senior Member
Joined: Sep 2005
Posts: 352
Germany
|
Thanks for the example!  Yeah, security would be important. Does someone know something about this topic? Maybe you're right and we should send the user the code directly... I will think about this.
|
|
|
Re: Online Codes
[Re: preacherX]
#465828
05/14/17 15:11
05/14/17 15:11
|
Joined: Sep 2009
Posts: 1,032 Budapest
Aku_Aku
Serious User
|
Serious User
Joined: Sep 2009
Posts: 1,032
Budapest
|
I would not load the code into the game. Instead of that, the program should generate a number that indexes the list. With that index can select a code. For security and other reasons, the index should be encrypted. At the selection stage must decrypt the index and get the code. So, the whole process: 1. player win the game 2. the program generates the index 3. the program encrypts the index 4. the program sends the index to the server 5. the server decrypts the index 6. the server selects the code 7. the server sends back the code 8. the program shows the code
Just an idea. Use it, change it or throw it.
Last edited by Aku_Aku; 05/14/17 15:15.
|
|
|
Re: Online Codes
[Re: Aku_Aku]
#465833
05/14/17 18:28
05/14/17 18:28
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
I think the public key encryption scheme is enough good for a game code list. - You can simply create a cheat for the game to get a key - You can log the webrequest and reverse the games functions to calculate the key - You can do all of this as often as you like and steal all keys because there is no HWID check
Last edited by Ch40zzC0d3r; 05/14/17 18:29.
|
|
|
|