FAcebook & Online Highscore Table

0 favourites
  • 5 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hi,

    Sorry, not a very snappy title.

    This is my first post and I thought I would do something different for a noob, instead of asking daft questions I am putting something up for you all to have a look at and comment on. Please feel free to offer any advice but also keep in mind that this is a work in progress and I am aware of the many short comings of the code. I also reserve the right to ask my 3 stupid questions in the near future <img src="smileys/smiley17.gif" border="0" align="middle" />   

    Please refrain from commenting on the website as it is a mess and used as a test bed for some other software I am testing and don?t comment on the game as it is merely the tutorial used to learn Construct2.

    I came across Construct2 whilst looking for something to use on a project I will be conducting after xmas and I was very impressed with both the software and the support forum.

    So, what have I done for you to look at and comment on? Well, in a nutshell, it allows users to register and login via Facebook, play a Game and record their score, lets them know if they are in the top 100 and displays a leader board of the top 100, the flow is as follows;

    Login with Facebook button

    If user is registered ?Welcome & display?

    Else, adds to database then ?Welcome & display?

    Play button

    Displays users Facebook name (not needed, only to show what?s happening) the username is passed by the session handler and displayed in the game canvas (not stored in the Game)

    Submit Score button (end of Game)

    Canvas passes the score to the session handler along with the user information and stores them for a new user on that game or if the user has already played and gets a higher score the new high score is stored. They are then redirect to a page that lets them know their current rank

    High Scores button

    Take the user to the table of the top 100 ranked players

    I probably haven?t explained all that it does very well but I hope you get the idea. Some of the things I know need doing are:

    Tidy up the High Score table so that it is formatted appropriately

    Tighten up the security

    Update the session handler so that users can?t use F5, refresh or back

    Add a condition to the Submitted page so that the user is aware that they haven?t beaten their old score

    Add search function to top 100 page

    Add the ability for users to update their Facebook page and notify friends

    Tidy up the website <img src="smileys/smiley19.gif" border="0" align="middle" /> (lots of work)

    The database queries I have built can do quite a bit more than is outlined here but I will explain those later.

    I will leave the game and test online for a couple of weeks and would appreciate getting more than 100 users to see if the logic works as expected. As stated earlier, I would also appreciate any feedback regarding the system and I don?t mind criticism or suggestions.

    Please note that I will not use any of your information other than these testing purposes and notify you when I have deleted the stored data. Also note that as I am working on this constantly things will change on a regular basis.

    As soon as I am fully satisfied with everything I will write a tutorial for the community, however, please be patient as it may take up to a couple of months.

    Sorry for the long winded post, please feel free to ask any questions and be sure to test.bmx-tube.com/play.php to test everything out.

    Thanks

    Damien

  • No takers? <img src="smileys/smiley19.gif" border="0" align="middle" />

    Some pics and an update may help.

    User login page before logged in

    <img src="http://test.bmx-tube.com/images/scirra/login.jpg" border="0" />

    After login, shows user information

    <img src="http://test.bmx-tube.com/images/scirra/logged.jpg" border="0" />

    At the moment there is a username displayed on the game canvas, this is only for demonstration purposes. The username is passed from the database and not through the game itself

    <img src="http://test.bmx-tube.com/images/scirra/usernm.jpg" border="0" />

    At the end of the game the user clicks the submit scores button and the score is passed to the database, don't forget that the name isn't passed as it is already there.

    <img src="http://test.bmx-tube.com/images/scirra/submit.jpg" border="0" />

    The user is then redirected to the submitted page and is shown their highest score and their current ranking. If the user has had more than one go it will overwrite their scores with the new high score, if they get a lower score it doesn't do anything to the database. This is a function that I need and can be changed.

    <img src="http://test.bmx-tube.com/images/scirra/gameover.jpg" border="0" />

    The user can then go to the leaderboard

    <img src="http://test.bmx-tube.com/images/scirra/leaderboard.jpg" border="0" />

    There are still several things to complete, like tightening up the security and controlling how the user navigates through the game process to stop refresh or F5. Also the session handler needs tidying up. I would really appreciate some of you having a go so that I will be able to make sure it works as intended.

    test.bmx-tube.com/play.php

    Please feel free to make any suggestions or ask any questions.

    Thanks

    Damien

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Where are my pictures?

    Never mind I did something wrong <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Hi,

    You linked your pictures wrong, they're all linked to test/images/scirra/gameover.jpg

    I tried your website out and it' pretty neat! I like the idea of people logging in on the website, then playing the game.

    Cheers.

  • Hi,

    You linked your pictures wrong, they're all linked to test/images/scirra/gameover.jpg

    I tried your website out and it' pretty neat! I like the idea of people logging in on the website, then playing the game.

    Cheers.

    Hi andreyin,

    Thanks for having a go, and thanks for pointing out my mistake above. Its not just a case of logging in to play the game, its more what is going on behind the scenes.

    There are several tutorials on here that show how to pass the user and score from the game to a database, what I am doing is only passing the score from the game. The username is taken from the user database and then passed to the game (in my example) and then saved into a separate data table to get the highest scores.

    Then from the high scores data table I am able to show the top 100 users and also to let the user know immediately after the game their highest score and rank.

    I now know that I need to set the image size for the leaderboard thanks to you.

    Regards

    Damien

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