[Ajax] Simple scoreboard

Get help using Construct 2

Post » Thu May 23, 2013 11:49 pm

Hi,

I have i nice idea how to make a simple scoreboard for ours games, but I do not know enough ajax/php/sql language to do it myself. So i want to please some one for help me.

It's my idea:

1. In game i make a textbox where player wrote his name. This textbox send player name to variable.
2. The second variable keeps score.
3. When the player click submit score btn then the ajax request url (example /blabla/addscore.php) (how to transfer the collected data?)
4. This addscore.php have instruction that add name and score to SQL database!

And thats all. In simple site i will show this scores.

It is possible? Please help me how this php instructions should look like.wasiu92013-05-23 23:52:26
B
6
S
1
Posts: 31
Reputation: 576

Post » Fri May 24, 2013 2:39 am

Maybe this will help.
https://www.scirra.com/tutorials/346/online-high-score-table-ajax-php-mysql
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Fri May 24, 2013 1:09 pm

Thanks You very much! It's really help my, im almost done :) Just hava a one problem.

Only 9 text elements shows data from database. Other 24 text elements shows "0". How can i solve this problem?

I think it's the problem is in Array - For each X element and his action but i completely dont understand that action so can't find a solution :/ Please help.
B
6
S
1
Posts: 31
Reputation: 576

Post » Fri May 24, 2013 3:51 pm

Well in the example the array is only set to store 10 values, so click on your array object and change the WIDTH properties to however many you need.

ArcadEd2013-05-24 15:51:46
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Fri May 24, 2013 7:02 pm

Thanks You very much!!! It's works great!
B
6
S
1
Posts: 31
Reputation: 576

Post » Sun Aug 25, 2013 5:57 pm

awesome tutorial:)
B
14
S
4
G
2
Posts: 42
Reputation: 2,046

Post » Tue Feb 04, 2014 10:50 pm

@ArcadeEd

Thanks for creating the tutorial. Will this work for Windows Phone, iOS, and Android too?
B
11
S
2
Posts: 68
Reputation: 982


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests