kvelland's Forum Posts

  • 9 posts
  • I try to set a score to webstorage, I tried both local storage and session storage.

    I would like to set the score, redirect the page and then access the session/local variable using javascript.

    It should be like SessionStorage.getItem("score")

    but not working, anyone?

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

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

  • So easy.. Was searching the forum for the same problem. Thanks

  • I figured it out. It was the MINE types on my IIS server. Thank you very much :)

  • Thank you. I sure have to look into this a little more. I got it to work using the browser plugin. But posting score like this will result in my game beeing really easy to cheat in.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When I run my project locally the sound is working fine. This is just imported audio files bound to different events.

    as soon as I copy to the server the sound are gone.

    I tried using IE, Firefox, Chrome.

    Anyone got any ideas?

  • When a user goes to a page where the game are to be played he gets an unique ID that I save in a hidden field.

    When the game is finished I would like to redirect the browser to another page. Something like this:

    ..../GameSummary?UniqueID=23123123123&score=434

    I need to be able to:

    1. Get the unique ID that is in the web page

    2. Get the score that are in the game

    Thank you

  • Hello

    Im a developer primary used to working with c# and other serverside tech. Im now loking into creating some small and easy javascript/html5 games for a project me and my kod are doing together :)

  • 9 posts