Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodDelphiDemoFiremonkeyIOSOSXWindows

Build A Cloud Based High Score System With Firemonkey On Android And IOS

Delphi XE5 Firemonkey Appmethod Cloud High Score SystemSarina 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.

Head over and read the full tutorial about building a high score system using a cloud provider.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

AndroidC++BuilderDelphiFiremonkeyIOSLiveBindingsOSXWindows

Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

Leave a Reply