pinball .capx download

Show us your completed creations made in Construct 2

Post » Wed Nov 21, 2012 9:47 pm

did some updates :

enjoy
Rudi2013-01-29 16:04:51
B
30
S
6
G
4
Posts: 108
Reputation: 5,602

Post » Sat Nov 24, 2012 3:41 am

some updates
read in first post
B
30
S
6
G
4
Posts: 108
Reputation: 5,602

Post » Wed Nov 28, 2012 12:04 am

online hiscore system implemented

it works ......


10 places ..

please test ...
and comment

thanks
rudi





Rudi2012-11-29 01:45:36
B
30
S
6
G
4
Posts: 108
Reputation: 5,602

Post » Fri Jan 11, 2013 12:06 am

Would you be able to upload a .Capx file with this ? I'm trying to get the flippers to work on my game but they aren't working for some reason :(
Using R238 for all examples
B
60
S
17
G
6
Posts: 363
Reputation: 9,125

Post » Fri Jan 11, 2013 9:56 pm

Ok .....i do my best ....on tablet right now ......when on pc i post a capx .......
B
30
S
6
G
4
Posts: 108
Reputation: 5,602

Post » Sat Jan 12, 2013 5:07 pm

@ emoaeden
check pm
B
30
S
6
G
4
Posts: 108
Reputation: 5,602

Post » Sat Jan 12, 2013 5:41 pm

@Rudi how did you made the hiscore system? I need to use it for a game that I'm developing but I have no idea on how to do it, could you upload a .capx with it or at least explain how did you develop that system?
B
17
S
4
G
4
Posts: 104
Reputation: 3,950

Post » Sat Jan 12, 2013 7:41 pm

hi,
i started with a tutorial i found on this site ,for some reason i cannot find it back
so i do my best to explain
note: english is not my native language
first you need a msql database ,
insert this sql
----------------------------------------------------------------
CREATE TABLE `scores` (
     `id` INT NOT NULL AUTO_INCREMENT ,
     `name` VARCHAR( 20 ) NOT NULL ,
     `score` INT NOT NULL ,
     PRIMARY KEY ( `id` )
     ) ENGINE = InnoDB;
----------------------------------------------------------------------
there are 3 php files
1 getscores
2 savescores
3 resetscores
---------------------------------------------------------------------------
getscores.php
-------------------------------------------------------------------------
<?php
header('Access-Control-Allow-Origin: *');




$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name=""; // Database name
$tbl_name="scores"; // Table name

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

// Retrieve data from database
$sql="SELECT * FROM scores ORDER BY score DESC LIMIT 10";
$result=mysql_query($sql);

// Start looping rows in mysql database.
while($rows=mysql_fetch_array($result)){
echo $rows['name'] . "|" . $rows['score'] . "|"        ;

// close while loop
}

// close MySQL connection
mysql_close();
?>
-------------------------------------------------------------------------------------------------------------------
savescores.php
-----------------------------------------------------------

<?php


$db = "";//Your database name
$dbu = "";//Your database username
$dbp = "";//Your database users' password
$host = "localhost";//MySQL server - usually localhost

$dblink = mysql_connect($host,$dbu,$dbp);
$seldb = mysql_select_db($db);

if(isset($_GET['name']) && isset($_GET['score'])){

     //Lightly sanitize the GET's to prevent SQL injections and possible XSS attacks
     $name = strip_tags(mysql_real_escape_string($_GET['name']));
     $score = strip_tags(mysql_real_escape_string($_GET['score']));
     $sql = mysql_query("INSERT INTO `$db`.`scores` (`id`,`name`,`score`) VALUES ('','$name','$score');");
     
     if($sql){
     
          //The query returned true - now do whatever you like here.
          echo 'Your score was saved. Congrats!';
          
     }else{
     
          //The query returned false - you might want to put some sort of error reporting here. Even logging the error to a text file is fine.
          echo 'There was a problem saving your score. Please try again later.';
          
     }
     
}else{
     echo 'Your name or score wasnt passed in the request. Make sure you add ?name=NAME_HERE&score=1337 to the tags.';
}

mysql_close($dblink);//Close off the MySQL connection to save resources.
?>
-------------------------------------------------------------------------------------------------------------------
resetscores.php
---------------------------------------
<?php
$host="localhost";
$username="";
$password="";
$database="";
$table="scores";

$connection = mysql_connect("$host", "$username", "$password") or die ("Unable to connect to server");
mysql_select_db("$database") or die ("Unable to select database");
$sql = "TRUNCATE TABLE `$table`";
mysql_query($sql);
echo "Table Deleted";
mysql_close($connection);
?>
----------------------------------------------------------------------------------------------------------------


----------------------------------------------------------------------------------------------------
i hope this help you out
if you need more explanation contact me
greets rudi





Rudi2013-01-12 20:42:51
Last edited by Rudi on Sun May 18, 2014 2:30 pm, edited 1 time in total.
B
30
S
6
G
4
Posts: 108
Reputation: 5,602

Post » Sat Jan 12, 2013 8:40 pm

@Rudi The .capx link seems to be down. Where can I download it?
B
17
S
4
G
4
Posts: 104
Reputation: 3,950

Post » Sat Jan 12, 2013 8:43 pm

i lil type error

solved

you can try again

greets
rudi
B
30
S
6
G
4
Posts: 108
Reputation: 5,602

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 1 guest