Results 1 to 10 of 10
  1.    #1  
    folks, i have no server experience. would someone be willing to walk me through how to 1) set up a "server", and 2) how to program a global leader board. i'll give away a free copy of the app as payment!
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  2.    #2  
    bump? no one's got nothin'? is it not that easy?
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  3. #3  
    tell us exactly what you are trying to do. Godaddy.com might be capable of satisfying your needs, depending on what you want to do.
  4.    #4  
    if possible, i would like to use my home computer to set up a server (or just a place to store the data). then, i'd like to incorporate in my game some ajax to send scores to the server, and pull the top scores down to the devices. pretty sure this is simple stuff for someone who knows what they are doing.
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  5. Tibfib's Avatar
    Posts
    345 Posts
    Global Posts
    347 Global Posts
    #5  
    I don't have experience hosting your own info... but I do have experience using godaddy hosting.

    I just bought a domain with their hosting and use ajax(client)+php(server)+MySql(storage on server) for pretty much everything.

    See PHP MySQL Introduction and SQL Tutorial for how to use the mysql.

    I can provide some code samples later if you need em.
  6.    #6  
    Quote Originally Posted by Tibfib View Post
    I can provide some code samples later if you need em.
    tibiafibia, i have a domain from google. not sure if i can do the same thing as with godaddy?

    i'll take a look at the tutorials, and let you know if i need some example code. thanks!
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  7. #7  
    You can set up your own server using apache, if that is what you want. Do you have a static IP?
  8. #8  
    if you set up your own server you need static ip, enough bandwidth to handle the connections, and I don't recommend using a computer you use on a day to day basis.
    1. Install linux or bsd. Personally I recommend freebsd or an advanced linux distro like gentoo as it makes it relatively easy to cut out the cruft in the is like networkmanager or x11.
    2. Install apache and mysql or postgres sql.
    3.this one's probably most important. To need to pick a language to write your ajax handler with and install the apache modules if applicable. I don't recommend using a hard-code language like c. Probably your best net is php or python, although I do keep hearing good things about ruby-on-rails.
    4 familiarize yourself with chosen language a bit.
    5. Write 2 scripts(or one if you feel like it) you just need to be able to accept a json object and parse it and store it in your database and then be able to pull information from your database and store that in a json object to be sent to your app. You'll also need to use some kind of security so that people can't just call up your scripts and submit whatever they want.

    for more about this you'll need to decide on your platform and do a little research through their respective communities. The main reason I recommend gentoo for your server is is that the community is really well established. Between the wiki and the forums you'll have everything you'll need.

    as a heads up. If you plan to publicly release your app then you really should use a hosting service. Depending on your needs I recommend nearlyfreespech.net, godaddy, or hostdeal. You also might try one located in your area. Just be aware that there are a lot of headaches associated with hosting a publicly available server.

    that said. I'm working on an open source game as part of a little tutorial I've been working on and setting up a global scoreboard will be part of that.
  9.    #9  
    Quote Originally Posted by unfairSurprisery View Post
    that said. I'm working on an open source game as part of a little tutorial I've been working on and setting up a global scoreboard will be part of that.
    if i went with godaddy, what would my code look like. we're talking 0 json parsing in a db experience. i know some sql (very little) and use access. that's about it. looking forward to the open source app. i'll probably release this game monday without a global leader board, and just use a local. i'll do an update later with the global (if i can figure it all out).

    thanks!
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  10. #10  
    GoDaddy offers rather wide and varied solutions. So you can set it up pretty much however you want. Here's a rough example using PHP/MySQL:

    Setup a mysql database(name it whatever you want) and in that database create a table a la:
    id - int, unsigned, auto_increment,not_null
    name-varchar(50),not_null
    score-int,not_null

    make a php script, name it something like mygame_ajax_scoreboard.php:
    Code:
    <?php
    $key = "laskdjfenino9w83929jlknldflao090923098u28unafmns"
             ."098213okjndsafoi3420909832090923poijdasnn,sdj09";
    if(!$_POST['key']||$_POST['key']!=$key){
    die("Invalid Key");
    }
    if($_POST['action']){
     $db=mysql_connect(YOUR_DATABASE_HOSTNAME,YOUR_USERNAME,YOUR_PASSWORD);
     mysql_select_db(YOUR_DATABASE,$db);
    
     if($_POST['action']=='get'){
      $result = mysql_query("SELECT name, score FROM YOUR_TABLE_NAME ORDER BY score DESC LIMIT 10;");
      if(!mysql_num_rows($result)){die("No Scores Saved");}
      $data = [];
      while($row=mysql_fetch_array($result)){
       $data[]=array($row['name'],$row['score']);
      }
      echo json_encode($data);
     }else if($_POST['action']=='submit'){
      $value=json_decode($_POST['value']);
      if(mysql_query("INSERT INTO YOUR_TABLE_NAME (name,score) VALUES (".value[0].",".value[1].");")){
       die("Success");
      }else{
       die("Error");
     }
    }
    ?>
    So, that's a (very) rough draft of the php script. To send the requests from your app use the Ajax object which is explained in far better detail than I could do here:

    Prototype JavaScript framework: Introduction to Ajax

    Just note that the above script uses POST for getting data so that's what you have to use with the Ajax requests. If you want to secure your script so that people can't just submit random scores from a web browser then I don't recommend using GET as then your users could just load up the web use log page on their router to get your key.
    There are other things you could do as well, like issuing a unique id to every instance of your game on first use, or even requiring a login. You should also probably verify that the request isn't coming from, say, Firefox using the $_SERVER['HTTP_USER_AGENT'] variable.

Posting Permissions