1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Build A Cloud Based High Score System With Firemonkey

Discussion in 'Delphi Android And IOS' started by AdminDF, Mar 29, 2014.

  1. AdminDF
    Online

    AdminDFAdminDF is a Verified Member Delphifan Staff Member DF Staff

    Sarina Dupont from Embarcadero has a tutorial up which shows how to build a cloud based high score system using Firemonkey. The article was written for Appmethod but should also work with Delphi XE5 (they both use the latest version of Firemonkey). On the server side Parse.com (which is a cloud based app hosting service) is used for storing the data. The TRESTClient component is used to make an SSL REST request to the server from your Android or IOS client and gets the scores in JSON format. The returned high score list is plugged into a FBMemTable and linked with LiveBindings to a TListView component. There is no example of posting high scores to the server but that is relatively simple. You just add your PlayerName and the Score as parameters of the TRESTRequest component and then use the ExecuteAsync function to send it to the server (I recommend ExecuteAsync vs. Execute). This tutorial is very similar to the previous tutorial for accessing the Beats Music API except in this tutorial you also control the server side of the REST request.

    As a bonus if you’d rather host your own high score server and not rely on a cloud provider like Parse there is a free high score module from NovelGames that has ASP.NET and a PHP server side code. The PHP version uses MySQL for high score storage. The high score system is built for Adobe Flash but it just uses HTTP so you can easily adapt it to work with TRESTClient. Download the free server side high score system code here.

    Code:
    // PHP sample from loadScores.php
    $siteID = $_POST['siteID'];
    $gameID = $_POST['gameID'];
    $gameName = $_POST['gameName'];
    $playerScore = $_POST['playerScore'];
    $playerCustomExtra = $_POST['playerCustomExtra'];
    
    $playerID = $_POST['playerID'];
    $playerName = $_POST['playerName'];
    $playerEmail = $_POST['playerEmail'];
    $playerUsername = $_POST['playerUsername'];
    $playerPassword = $_POST['playerPassword'];
    $playerPictureURL = $_POST['playerPictureURL'];
    $playerFacebookUserID = $_POST['playerFacebookUserID'];
    Demo Topic Here
     

Share This Page