1. Castle Game Engine Installation

  1. Download the latest Castle Game Engine. Unpack the engine ZIP wherever you like.

  2. Run the Castle Game Engine editor: open the unpacked castle_game_engine directory, open the subdirectory bin inside and run the castle-editor executable.

2. Install compiler and IDE

Next, you should install

  • a Pascal compiler (we support FPC and Delphi)

  • and a Pascal IDE (like Lazarus, Delphi, Visual Studio Code, or any other text editor you prefer).

For a fully open-source cross-platform environment we recommend FPC and Lazarus.

2.1. FPC and Lazarus

  1. Install FPC and Lazarus.


    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.

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


    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.

    Lazarus website

    You can install FPC and Lazarus in other ways, for example using FpcUpDeluxe.
    If you prefer other IDE than Lazarus, you can install only FPC and use any Pascal code editor you like, like Visual Studio Code.
  2. Configure FPC and Lazarus locations in Castle Game Engine editor Preferences, if they have not been auto-detected correctly.

    Castle Game Engine Editor Preferences

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

    Lazarus packages registration confirmation

2.2. Alternative: Delphi

  1. Download Delphi.

    Free Community Edition is fine. Though it doesn’t have a working dcc compiler, so compiling using F9 in CGE editor will not work. But you can simply open the project in Delphi and use F9 from Delphi.
  2. In Castle Game Engine editor, open Preferences dialog. In both the Code Editor and Compilation tabs set Delphi, if it was not auto-detected automatically.

To improve this documentation just edit the source of this page in AsciiDoctor (simple wiki-like syntax) and create a pull request to Castle Game Engine WWW (cge-www) repository.