You can use Castle Game Engine with Free Pascal Compiler (FPC) and Lazarus IDE.
Free Pascal Compiler (FPC) is a separate thing from Lazarus IDE. To understand the difference:
FPC is a (command-line) Pascal compiler. You need to use either FPC or Delphi to compile your CGE programs. We only support these 2 modern Pascal compilers.
Lazarus IDE is an IDE (editor, project manager) using FPC.
Lazarus also provides LCL, a visual component library, along with ability to visually design LCL applications. But we do not use LCL in most CGE applications (the ones based on TCastleWindow). In effect, while Castle Game Engine integrates well with Lazarus, we don’t strictly depend on Lazarus — not like we depend on FPC.
TCastleWindow
Download and run a simple installer from the Lazarus website that will install both Lazarus (IDE) and FPC (compiler).
You should
install FPC first. It is easiest to install a package called fpc using your package manager.
fpc
Then download and install Lazarus package for Linux.
To compile the applications, install also GTK and OpenGL development libraries, from packages like libgtk2.0-dev, libgl-dev on Debian-based distros.
libgtk2.0-dev
libgl-dev
You can download packages for both FPC (download file like fpc-3.2.2.intelarm64-macosx.dmg) and Lazarus (file like Lazarus-2.2.0-0-x86_64-macosx.pkg) from the downloads on Lazarus website.
fpc-3.2.2.intelarm64-macosx.dmg
Lazarus-2.2.0-0-x86_64-macosx.pkg
Configure FPC and Lazarus locations in Castle Game Engine editor Preferences, if they have not been auto-detected correctly.
In Castle Game Engine editor Preferences, go to tab FPC and Lazarus and click on the button "Register Lazarus Packages". This will allow to compile and debug CGE applications inside Lazarus.
To improve this documentation just edit this page and create a pull request to cge-www repository.