FAcebook & Online Highscore Table

Discussion and feedback on Construct 2

Post » Sat Dec 08, 2012 12:23 pm

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    

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 dont 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 whats 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 havent 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 cant use F5, refresh or back

Add a condition to the Submitted page so that the user is aware that they havent 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 (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 dont 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 http://test.bmx-tube.com/play.php to test everything out.

Thanks

Damien
               chuck8082012-12-08 12:27:14
B
4
Posts: 13
Reputation: 426

Post » Thu Dec 13, 2012 10:55 am

No takers?

Some pics and an update may help.

User login page before logged in



After login, shows user information



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



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.



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.



The user can then go to the leaderboard



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.

http://test.bmx-tube.com/play.php

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

Thanks

Damienchuck8082012-12-13 12:47:12
B
4
Posts: 13
Reputation: 426

Post » Thu Dec 13, 2012 10:56 am

Where are my pictures?

Never mind I did something wrong chuck8082012-12-13 12:47:55
B
4
Posts: 13
Reputation: 426

Post » Thu Dec 13, 2012 12:34 pm

Hi,

You linked your pictures wrong, they're all linked to http://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.
B
106
S
35
G
37
Posts: 796
Reputation: 25,211

Post » Thu Dec 13, 2012 12:54 pm

[QUOTE=andreyin] Hi,

You linked your pictures wrong, they're all linked to http://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.
[/QUOTE]

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
B
4
Posts: 13
Reputation: 426


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests