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.
IdentComplIncludeKeywords
.
Hint: If you want to install multiple versions of FPC/Lazarus (stable, unstable, NewPascal), with cross-compilers, it is easily possible with fpcupdeluxe.
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.
We generally try to support using the latest (unstable) FPC development version to compile CGE.
You can get such FPC:
Directly from GitLab (use main
branch to get really latest and unstable version)
or using FpcUpDeluxe
or using our Docker image.
Although by default we use latest stable FPC inside our Docker image, but you can get FPC unstable using the tag cge-none-fpc331
when requesting the image. So the full image name to get it from Docker Hub would be kambi/castle-engine-cloud-builds-tools:cge-unstable
.
The exact FPC revision included is the one listed in the Docker build script. This is updated manually from time to time (do you think we should bump it now? let us know).
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.
We moved our Delphi documentation to a separate page.
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.
Copyright Michalis Kamburelis and Castle Game Engine Contributors.
This webpage is also open-source and we welcome pull requests to improve it.
We use cookies for analytics. See our privacy policy.