Visitar URL original
Delphi | Manual | Castle Game Engine

Delphi

1. Introduction

We support Delphi, a powerful commercial Pascal IDE and compiler.

Any Delphi tier, including free Delphi Community Edition, is fine.

We are an official Embarcadero Technology Partner. This means that engine developers have full access to the latest Delphi version, with all the Delphi platforms (including Android and iOS), for free. For testing CGE compatibility.

If you like Delphi compatibility, and want to see more of it (e.g. more platforms or Delphi-specific integration tools), please voice your needs and if you can — support us on Patreon!

Castle Game Engine API in Delphi Castle Game Engine and Delphi

2. Configure Castle Game Engine to use Delphi

In Castle Game Engine editor, open "Preferences" dialog. In both the "Code Editor" and "Compilation" tabs set "Delphi", if it was not auto-detected already.

That’s it. CGE editor is now integrated with Delphi. You can test it:

  • Press F9 to compile the project from CGE editor (using CGE build tool which will use Delphi command-line compiler under the hood).

    Note
    In case of Delphi Community Edition: It doesn’t have command-line compiler, so you have to compile the project using F9 from the Delphi IDE.
  • Double-click on Pascal files to open them in Delphi.

  • Use "Code → Open Project in Code Editor" menu item to open project in Delphi.

3. Presentations

4. Platforms supported with Delphi

  • We support Windows (both 32-bit and 64-bit), Linux, Android and iOS. You can compile and run applications using all Castle Game Engine features on these platforms using Delphi.

  • On all supported platforms, you can use either TCastleWindow or TCastleControl for rendering.

  • The only platform not fully supported with Delphi is macOS. It is still supported partially:

    Rendering on macOS doesn’t work, but basic units compile and 3D loading/processing works. You can test it with a command-line scene_information_cli_tool from our examples. It can be built and works as a command-line tool on macOS.

5. Delphi versions supported

The engine is tested and supported on Delphi versions listed below.

  • They all include the free Community Editions versions.

  • We always recommend the latest Delphi version, and we support all platforms with it.

  • We test both manually and automatically using continuous integration (CI). If we missed anything, if some example does not work as expected, please report it.

Delphi versions supported:

Windows (32 and 64-bit)

Delphi >= 10.2.1 (or C++ Builder >= 11.3).

Linux

Delphi >= 11.3.

Android

Delphi >= 10.4.2 (read here why, and how you can bend this rule to go as far back as "10.4.0 with patch 1").

iOS

Delphi >= 13.1 (read here why, and how you can bend this rule to go as far back as "10.4.2").

macOS

Delphi >= 13.1 (same reasons as iOS).

Note

Older Delphi versions didn’t support "project welcome page in a Markdown format". And most of our examples use this feature, to show a nice README.md of the project when you open it in a newer Delphi version.

This causes harmless warnings when opening our examples in older Delphi versions, like 10.x — upon opening the DPROJ, it will propose to open README.md in a default associated Windows application, like a text editor. Just ignore the dialog about README.md and Markdown, the project will still work correctly.

5.1. Why these Delphi versions? Can we support older Delphi version for some platforms?

In general: the answer is always "maybe, let’s talk", and it never hurts to ask us :) If you have a strong use-case, e.g. an existing cool project and it is really impossible to upgrade the Delphi version — contact us, tell us about it.

That said, we did research for each of the requirements above, so it’s not easy.


To improve this documentation just edit this page and create a pull request to cge-www repository.