Game in browser

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the Construct Starter Kit Collection and the Student Workbook from the Workshop.
  • We are creating a gaming site.

    There will be alot off different games and all the progress off the registered players will be saved and the score compared to other players.

    The flow will be like this:

    • The Player logs in
    • He choose a game
    • Play the game and gets a score
    • The browser is redirected and the Score used in my logic

    I've been testing out different ways to do this, for example using the browser object and adding the score to a parameter in the URL, but this approach will be easy to manipulate.

    I also tried using Web storage to save the progress in the session and then retreive the score again from the web page that the game redirects to after the game end, but I was not able to retreive the Score. I used this javascript on that page

    <script type="text/javascript">

    document.write(localStorage.getItem("Score"));

    </script>

    Can anyone help me with a good and secure way of doing this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would suggest you use AJAX and the CBHash Plugin.

  • Yes. That could be an option. But by using Ajax.. I still need to keep track of wich user are loged on.

    I mean I have to post to the webservice with something like:

    usernam=user, Score=1000 and son on..

    Then I need to be ablet to get the Loged on user in the game.

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