How do I Confirm user has finished game

0 favourites
  • 6 posts
From the Asset Store
A complete set of Graphic, User Interface element to build 2D mobile game or PC game.
  • 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.

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)