Cross-platform 3D and 2D game engine with a lot of graphic effects and a scene graph based on X3D
Clone or download

Castle Game Engine

"Castle Game Engine" ( ) is an open-source 3D and 2D game engine.

We have many graphic features (shadows, mirrors, screen effects...) and support many data formats for game assets (X3D, VRML, Collada, Spine...). We have a nice scene manager, with many optional components (like instant creatures with simple walking and attacking intelligence). We're cross-platform (desktop, mobile, web browser plugin).

See for the complete list of engine features.


Questions? Ask on our forum: .

Support us on .


Get Lazarus ( ) and install in Lazarus two packages:

  • packages/castle_base.lpk and
  • packages/castle_components.lpk

Also, compile (but don't install) this package:

  • packages/castle_window.lpk

Now you can compile and run all the examples by opening their .lpi files and running them as usual from Lazarus.

If you prefer to use bare FPC and the command-line, you can:

  • Use the build tool to compile various examples and your own games for many plaforms: .

    It relies on the existence of CastleEngineManifest.xml file inside your project. The build tool allows to comfortably compile and package your game for various platforms, including Android and iOS.

  • Or use scripts to compile particular programs using FPC. Use make examples in the top engine directory to simply compile all the examples.

See the "Getting Started" page on for more information.


The engine is available on the terms of LGPL >= 2 license with "static linking exception". This is the same license as used by FPC RTL and Lazarus LCL. In short, you can make commercial and closed-source games using the engine, you only have to share your modifications to the engine core. See COPYING.txt for details.

Have fun!

Michalis Kamburelis