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…….