Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, AndrewAMD), 770 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Online Codes #465802
05/12/17 23:20
05/12/17 23:20
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline 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! laugh

Re: Online Codes [Re: preacherX] #465810
05/13/17 15:44
05/13/17 15:44
Joined: Feb 2013
Posts: 122
Maysville, Ga
Evo Offline
Member
Evo  Offline
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.zip
NOTE: 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 Offline
Expert
Kartoffel  Offline
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 Offline
Member
Evo  Offline
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 Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
Germany
Thanks for the example! laugh

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: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
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] #465829
05/14/17 15:59
05/14/17 15:59
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Just dont do it, it will take people with some more reversing skills minutes to hack your game and get all keys.
You'd need a method to check if a certain user already won a key and this is sadly not perfectly possible.

Re: Online Codes [Re: Ch40zzC0d3r] #465831
05/14/17 16:35
05/14/17 16:35
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
I think the public key encryption scheme is enough good for a game code list.

Re: Online Codes [Re: Aku_Aku] #465833
05/14/17 18:28
05/14/17 18:28
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Originally Posted By: Aku_Aku
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.
Re: Online Codes [Re: Ch40zzC0d3r] #465834
05/14/17 19:55
05/14/17 19:55
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
I think you don't know how works the public key scheme.
And that does not forbid other technic combined with that, for example HWID.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1