Supported compilers and IDEs

Castle Game Engine icon

1. FPC and Lazarus

We support Free Pascal Compiler (FPC) version >= 3.2.0.

We always support and advice the latest stable release of FPC. Usually, we also support a couple of older FPC releases.

We use some modern Pascal features (like generics) in CGE, so we occasionally bump the required FPC version. We check what is commonly available, e.g. what is in the latest Debian stable (which is a baseline for many other Linux distros). Last time, on 2021-12-12, we bumped required version for Castle Game Engine 7.0-alpha.snapshot from FPC >= 3.0.2 to FPC >= 3.2.0.

For Aarch64 (64-bit Arm), as found on Android, iOS, macOS: While we support any FPC >= 3.2.0, we strongly advise FPC >= 3.2.2. That is because certain optimizations have been broken in older FPC versions. Our build tool disables optimizations in released builds when it detects Aarch64 and older FPC.

You may also find it comfortable to use Lazarus, which is an IDE (editor, debugger etc.) built around FPC with a visual classes library (LCL). Our engine can be used together with Lazarus form (LCL) though for most applications we recommend using TCastleWindow independent from LCL.

Hint: If you want to install multiple versions of FPC/Lazarus (stable, unstable, NewPascal), with cross-compilers, it is easily possible with fpcupdeluxe.

1.1. If you use sparta_Docked package

Some FPC libraries, like sparta_Docked or sparta_Generics, may contain their own copy of Generics.Collections unit and friends.

FPC >= 3.2.0 doesn't need them (it contains the Generics.Collections and friends, with the same implementation from Maciej Izak). In case of CGE, we didn't need them even for FPC 3.0.x, and CGE included our own copy of Generics.Collections.

Solution: Remove Generics.Collections and related units from any sparta_xxx or other packages. FPC includes them already. Report to authors of these packages that these units create conflicts with FPC >= 3.2.0 standard units.

1.2. If you use FPC development version (from GitLab)

We generally try to support using the latest (unstable) FPC development version to compile CGE.

You can get such FPC:

Of course please remember that this FPC version is unstable, and it changes with every commit to FPC. We cannot test or guarantee that CGE works with an arbitray FPC development revision. But we welcome testing such FPC. PRs to make CGE work with latest FPC trunk are also welcome (unless there's a temporary bug in FPC which should be rather reported to FPC devs).

On Aaarch64 (important on mobile platforms): Note that optimizations are disabled on Aarch64 when used with FPC 3.2.0, due to FPC bugs. These are fixed in FPC SVN revision 48104 (fixes available in 3.2.2, 3.3.1 and all newer). See CGE Trello ticket about Aarch64 optimizations.

2. Delphi

We moved our Delphi documentation to a separate page.

3. Code Typhon

We do not support using Code Typhon (a fork of FPC/Lazarus).

I (Michalis) strongly advice that you should rather use original FPC and Lazarus. I have much more trust in FPC and Lazarus developers doing great quality job, respecting copyrights of other projects (CodeTyphon did some murky things), and working in a transparent fashion (version control, cooperating with other projects).

Note that Lazarus comes now with Online Package Manager. And you can use fpcupdeluxe to easily install cross-compilers. I mention these, in case your reason for using Code Typhon was to get such features.