Location, Shillong, Meghalaya, India
+91 94363 37123
sunil.arora@digitiger.com

Migrating an old Delphi 3 game to Firemonkey

Welcome to the Blog with prime focus on Delphi & Pascal

Migrating an old Delphi 3 game to Firemonkey

Recently one Sr. Delphi Professional and Maths Teacher, Omid Motahed  requested in a Delphi related forum, if any one of us having access to newer Delphi version can convert/migrate a very old Delphi 3 based open-source game project (a Chess like mind/calculation game) by  Prof. Dr. G. Keith Still  (who has been kind enough to allow me to bring this to multiple devices including iOS & Android) over to Firemonkey (Multi-Device) project.

This Project mainly used lot of calculations and canvas drawing APIs. Initially, I thought that it should not involve any significant work and took it on as a sort of OJT or practice project for myself. But I was in for a huge surprise because almost all the drawing APIs have been changed in Firemonkey implementation from old and simple VCL APIs. Then of course there were several inherent limitations of Multi-Device project like hugely differing sizes of screens from small mobile phone screens of 3 inches to big wide screens of Desktops, having mouse with 2 or more buttons in Desktop but just a finger touch/tap to a few gestures in mobiles. Also there were limitations related to Asynchronous messaging and non availability of blocking dialogs in Android/iOS and so no modal dialogs 🙁 .

But, by now I was enjoying once again of exploring, trying and learning after long long gap of several years. So with the help of widely scattered info across the web and some of hit and trial works, I was able to Migrate the project to Firemonkey after spending almost 12 hours on it (originally I expected it to take at the most 4-5 hours). Here is an screen shot of same game running on a small Android Phone

 

And here is a screenshot from my Mac

Anyone interested in trying out the project can download the Android “apk” file from here (updated after fix for Firemonkey bug due to which Square/lines were not getting drawn in Android).

I still have to optimize and clean it out a bit and hopefully improve the GUI also a bit and after that I shall publish the whole project source for public on GIT soon. I also plan to publish my experience/understanding/learning which I went through during this migration in addition to list of Commands/ Syntex differences between VCL and Firemonkey framework, which were required to make this project work like for example a button and other such controls have a property called “caption” in case of VCL but in Firemonkey they have property called “Text” and instead of plain old property called “Font”, in case of Firemonkey this is embedded inside “TextSettings.Font” ….. These are easy to find and to an extent pretty obvious ones but there are many which are not that easy or obvious …. hope to list them out soon ……. keep tuned

Your comments and feedback are solicited please…….

 

 

8 Responses

  1. David says:

    Nice post, looking forward to hearing about your learning experience, and some tips you picked up along the way. Well done!

  2. Larry Hengen says:

    I was going to install your application on my Android but it requires all sorts of permissions that are not reasonable for this type of app. Spyware?

    • sunil says:

      No Larry, this does not require ANY permission at all ! Of course the release being a development release and [at least not yet] meant for play store, is was not signed so if your device policy is strict it would surely warn you during installation that the application is not signed and not from any trusted source but it does that even for the applications which you download Amazon app …..

      In case you are getting any warning other than the above or if during install you notice that application is seeking any permission at all then I would humbly request you to please do send me the screenshot of same at QuodScreenShot@digitiger.com, I would surely look at the reasons an be thankful for that. That said, this test application has already been downloaded by 900+ users during last week or so and so far you are the first person to report anything like this …. of course being first to complain do not necessarily means being wrong and so I would look forward to your next response ….

      Regards

      Sunil

  3. broderie says:

    Simply desire to say your article is as astounding. The clearness on your post is simply spectacular and i could assume you are an expert in this subject.

    Fine with your permission let me to clutch your feed to stay updated with drawing close post.
    Thank you a million and please carry on the gratifying work.

  4. I am actually delighted to read this webpage posts which carries
    tons of valuable information, thanks for providing these kinds of statistics.

  5. health says:

    I’d like to find out more? I’d love to find out more details.

  6. Serik escort says:

    I am reallyy thankful to the owner of this website who has shared
    this fantastic article at here.

  7. Thanks for a marvelous posting! I truly enjoyed reading
    it, you could be a great author. I will remember to bookmark your blog and definitely will come back later in life.
    I want to encourage continue your great job, have a nice morning!

Leave a Reply

Your email address will not be published. Required fields are marked *