Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: How to implement an online high score table?

  1. #11
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Or if you would rather have your web host do all the database work, you could do some PHP script that would take either POST form data or URL Query and process it to go into your database. The problem then is getting the data back as a file your game can process.

    I think if your PHP is bad or non-existent, you're better off with learning the MySQL-based Pascal library.

    Plus having a script like that could open it's self up to security leaks or falsely given data. Cheating and hacking.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #12
    You mean the game itself communicates with a MySQL database on the server? But if I want to have an online high score list I'll need another PHP script which displays the table on the web page, right? Which leads to the same problem, that I have no clue of PHP, yet. (Maybe I should read some tutorials about it, looks a bit like BASH).
    Best regards,
    Cybermonkey

  3. #13
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Well yes, if you wanted to have a web page or whole site that shows off your highscores, then yes.

    BUT, I'd recommend doing one thing at a time. First get your high scores working between database server and wherever your game runs. THEN worry about web pages that show the high scores. Your development will be all the happier for it.

    The PHP docs are actually pretty great to be honest though. When you get to that part it shouldn't be too hard to pick-up and learn PHP. I could even post a small script that you can take and copy paste and edit a few parameters and reuse to get whatever data you want to be displayed whereever you want on any PHP generated webpage.

    For now though, figure out your MySQL library access from your game side of things.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #14
    Implementing a script that would print a nicely-formatted high-sore table basing on a file or data from MySQL takes only basic PHP knowledge, and that's really easy to learn. There are a lot of people who complain about PHP, but IMO this thing is great for making small, simple things - just like shell scripts.

    Btw, why do most the packages on FPC documentation produce E404 when clicking "view interface"?

  5. #15
    Or you could use a preformated html document that is downloaded and edited and then uploaded again. You know where the different entries are, so editing the file will be easy. The Synapse units does the networking in just a few lines.

  6. #16
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Generating HTML is an option, however it wouldn't act as a solution for being able to extract those highscores for later use in any of the in-game stats.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  7. #17
    Wouldn't be the easiest solution for implementing Online High Score just by using some database. There are several database components which alow easy acces to SQL based databases.
    And since almost all WebServer providers offer you an easy way of establishing a database on their servers I don't see why not use it.
    As for the web page which will alow viewing highscore list outside your game you can simply use PHP or some Java scripts to read those records from the database and show them in a webpage form.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •