Castle Game Engine icon

Supported compilers and IDEs

1. FPC and Lazarus

You need the Free Pascal Compiler (FPC) to use our engine. We always support and advice the latest stable release of FPC. Usually, we also support a couple of older FPC releases.

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 components can be used together with Lazarus forms (although we also have an alternative window classes, independent from Lazarus LCL). Currently, we don't have any special requirements on the Lazarus version. Just use Lazarus with a sufficiently up-to-date FPC version.

We also support using NewPascal, a very nice fork of FPC+Lazarus with some new features.

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. In case you use sparta_Docked package...

If you use FPC 3.0.x (not newer), and you use sparta_Docked package (or some other package that depends on sparta_Generics package), you will encounter errors when trying to install CGE packages. That's because CGE (only when compiled with FPC 3.0.x) includes our own copy of Generics.Collections and friends, and compiler is confused because it sees two possible versions of this unit.


  1. Remove the directory src/compatibility/generics.collections/ from your CGE source.
  2. Add sparta_Generics as a dependency of castle_base package.

This is a temporary problem. New FPC versions include Generics.Collections implementation as a standard unit, and thus everyone will just use it, and such problems will disappear :)

1.2. In case you use proprietary NVidia OpenGL on Linux...

For Linux/x86_64 with NVidia proprietary OpenGL drivers, it is best to use FPC >= 3.1.1, revision >= 38400.

Older versions of FPC (including stable 3.0.4) on Linux contain a bug that may cause a SIGSEGV when the application exits. This is in particular reproducible with NVidia proprietary OpenGL implementation on Linux/x86_64. The details are in the FPC bugreport #0033311 (SIGSEGV during game shutdown with hedgewars 0.9.23 (hwengine)) and reports linked from it.

The crash isn't very critical from the point of view of a typical application end-user, since it happens at the very end of the application, after everything else closed. But it is quite bothersome during development, as the exception is visible, application exit status is non-zero, debugger activates etc.

There isn't a simple workaround for it in CGE. So if this bug affects you — simply use newer FPC version. At least revision 38400 (FPC 3.1.1), when this bug was fixed.

2. Delphi (coming soon)

We do not work yet with Delphi. But we're working on it! Some base units are already compatible with Delphi, you can test it by opening in Delphi and running examples/delphi/base_tests/base_tests.dpr included in the engine.

We are an official Embarcadero Technology Partner. What this means, in simple terms, is that Michalis has full access to the latest Delphi version, with all the Delphi platforms (including Android and iOS), for free. For testing CGE compatibility.

So, Delphi compatibility is happening. It just takes time. You can support me to make it happen quicker!

As for the Delphi version supported: Right now I focus the port on the latest Delphi, 10.2. But we should be able to support older Delphi versions as well. Any Delphi version that includes support for generics (as we use them heavily) should be OK, which in principle means that we can support Delphi >= 2009.

3. Code Typhon

You can also use Code Typhon, a fork of FPC/Lazarus.

But I (Michalis) advice that you 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).

Lazarus comes now with Online Package Manager and you can use fpcupdeluxe to easily install cross-compilers — these cover some often-mentioned Code Typhon advantages.