How do I Confirm user has finished game

Get help using Construct 2

Post » Mon Apr 07, 2014 12:12 pm

Hello,

Game that I'm making is part of reward program and if user finishes game he gets button that redirects him to fill out a form. I need advice on what is the best way to inform website that user finished the game and that he can access the form to stop people accessing form just by typing URL in browser.

Can i call some javascript function, use SQL database or some third option. What would be the best way to go about it.

Thank you.
B
5
Posts: 27
Reputation: 279

Post » Mon Apr 07, 2014 12:16 pm

hmm... brainstorming:
1. when the game is finished, you could instruct the game to call a URL that creates a token, this token is passed to the form and also transmitted. So, you can only submit the form when a valid token is present.

2. Implement the form into your game. Just set up a new layout in C2 with the form and let the game transmit the form values to your database.
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Mon Apr 07, 2014 12:16 pm

If you link them to a sheet, isn´t it enough to keep the link secret? Or is it bad, or is there any need to prevent people from copying that.
Image
Check out our start-up and configure your own helmet in true 3D.
B
44
S
11
G
11
Posts: 1,154
Reputation: 9,978

Post » Mon Apr 07, 2014 12:22 pm

If I redirect anyone to link (hidden or not) anyone with little effort can check where he was redirected.
Even if link creates token because what stops that person from going to that link and getting token without playing the game.

Implementing the form in the game is one solution I'm aware of but I'm trying to avoid that if possible at all.
B
5
Posts: 27
Reputation: 279

Post » Mon Apr 07, 2014 12:33 pm

I don't think that you will ever find a 100% secure way to do it. Problem with JavaScript is, it is always executed by the browser and not the server.

Most secure way is, that you program a server side tool, where your game connects to and the example is created on the server side when the game is completed. But this isn't something you can easily do with C2.
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Mon Apr 07, 2014 12:50 pm

I think i've found the way using combination of checking on form from what address referral came from and using AJAX to call php script that run's server side.

I will test this in next week or so and post solution explanation here if it works.
B
5
Posts: 27
Reputation: 279


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION and 16 guests