Not enough? Want more features? :) See our roadmap and support us on Patreon to make it happen!

1. Summary

Visual editor

Design 3D and 2D games and user interfaces (with automatic scaling, anchors). Build and deploy the same project for multiple platforms. Integrate with various IDEs (Visual Studio Code, Lazarus, Delphi...).


A lot of components to design viewport contents (3D and 2D world, using scenes, cameras, navigation, primitives, lights...) and user interface (buttons, images, labels...).

Lots of ways to define data

Use 3D models, 2D animations, sprite sheets. Great integration with authoring tools like Blender or shops like Sketchfab thanks to using open standards like glTF and X3D.

Graphic effects

Composable shader effects, shadows, mirrors, physically based rendering, bump mapping, gamma correction...


Target any platform (desktop: Windows, Linux, macOS, FreeBSD, Raspberry Pi, mobile: Android, iOS, console: Nintendo Switch). Work on any desktop platform. WebGL and Oculus (VR) are coming as targets soon.

Clean and fast code

Native clean object-oriented programming language with modern Object Pascal. Fast builds, fast execution out-of-the-box.

Open source and friendly to continuous integration

Tooling friendly to continuous integration. Command-line build tool and Docker image. Ready files and documentation how to use with GitHub Actions, GitLab CI, Jenkins. Engine is completely open-source and can be used to make any (including proprietary) applications.

2. Cross-platform

Truly cross-platform, you can work on (almost) any platform and compile to any platform.

  • Desktop (Linux, Windows, macOS, FreeBSD). Just install the engine, compiler (like FPC) and run the application.

    2D game in editor 2D game running
  • Mobile (Android, iOS) with numerous Android services and iOS services to integrate with platform-specific features.

    "Dragon Squash" on iOS (iPhone) "Escape from the Universe" on iOS (iPhone)
  • Console (Nintendo Switch).

    "Escape from the Universe" on Nintendo Switch
  • Raspberry Pi (it’s just desktop Linux on Arm CPU).

    Raspberry Pi "The Unholy Society" on Raspberry Pi
  • Coming soon (roadmap):

  • The engine code is portable and in principle "just works" on any operating system and CPU supported by FPC or Delphi.

3. Visual editor

Editor to visually design your game 3D and 2D world and user interface around it.

  • With templates for new projects — empty, 3D, 2D. They showcase nicely engine possibilities and were designed as a good starting point for your applications.

    New project templates in CGE editor
  • Allows to easily build the project for all platforms.

    Choose target platform Choose package format
  • With file browser, with preview for data (3D models, images, sound files).

  • With easy way to execute code editor (Lazarus, Visual Studio Code or anything else you like) to edit your code.

    Lazarus to edit Pascal code Visual Studio Code to edit Pascal code
  • Designs are (de)serialized to JSON. Any component can be (de)serialized, along with it published properties.

  • Designs can refer to each other using TCastleTransformDesign or TCastleDesign, to use them like prefabs from other engines. See examples/advanced_editor/advanced_loading_designs.

  • You can define custom project-specific components available in the editor.

4. Viewport with scenes, camera, navigation and other components

Viewport with scenes, camera, navigation allows to define 3D and 2D worlds.

5. Data formats

5.1. glTF

We support standard model format from Khronos: glTF.

Village scene with outlines from Sketchfab, <a href="https://sketchfab.com/3d-models/ftm-0970f30574d047b1976ba0aa6f2ef855" class="bare">https://sketchfab.com/3d-models/ftm-0970f30574d047b1976ba0aa6f2ef855</a> by Luis Fernandez, <a href="https://sketchfab.com/luyssport" class="bare">https://sketchfab.com/luyssport</a> Helmet from glTF (sample from Khronos) Invincible - Mark Grayson (3D model rendered using Castle Game Engine), <a href="https://sketchfab.com/3d-models/invincible-mark-grayson-698c1106da924ab1a26392247e697f79" class="bare">https://sketchfab.com/3d-models/invincible-mark-grayson-698c1106da924ab1a26392247e697f79</a> , by ASideOfChidori Cars 3D models from Sketchfab, <a href="https://sketchfab.com/3d-models/pony-cartoon-885d9f60b3a9429bb4077cfac5653cf9" class="bare">https://sketchfab.com/3d-models/pony-cartoon-885d9f60b3a9429bb4077cfac5653cf9</a> Pony Cartoon by Slava Z., <a href="https://sketchfab.com/3d-models/free-1975-porsche-911-930-turbo-8568d9d14a994b9cae59499f0dbed21e" class="bare">https://sketchfab.com/3d-models/free-1975-porsche-911-930-turbo-8568d9d14a994b9cae59499f0dbed21e</a> 1975 Porsche 911 (930) Turbo by Karol Miklas
  • Great integration with Blender that can export to glTF.

  • Lots of glTF models on the Internet, e.g. on Sketchfab.

  • Skinned animation.

  • Physically Based Rendering.

  • Metadata support (which can come e.g. from Blender custom properties).

5.2. X3D

We support standard model format from Web3D: X3D and VRML.

  • Support for X3D 4.0 with Physically Based Rendering and lots of possibilities for shapes, textures, animations etc.

  • The TCastleScene is a set of X3D nodes. We implement extended set of X3D nodes.

  • You can build and process scene graph of X3D nodes. Procedural generation of models, any pre/post-processing of models is possible.

  • We can save the X3D graph back to file in X3D format, see TCastleSceneCore.Save, SaveNode.

  • You can write model conversion utilities. Our Castle Model Viewer allows to convert various models to X3D.

5.3. Sprite sheets

We support sprite sheets.

  • In Castle Game Engine (.castle-sprite-sheet), Starling and Cocos2D formats.

  • Own sprite sheet editor to visually create sprite sheets from texture atlases.

    Sprite Sheet Editor
  • See the platformer example - complete platformer game using sprite sheets. Also released on itch.io.

    Platformer demo

5.4. Spine

We support Spine skeletal 2D animations.

Dragon in Spine Same dragon rendered by Castle Game Engine
  • We have own Spine importer in Castle Game Engine that reads Spine JSON (not relying on any official Spine runtime).

  • Spine animations and rendering features are converted to standard engine animation nodes (same nodes as used by glTF and X3D) so they play consistently within the engine, with animation cross-fading etc.

  • Spine skins are suported.

  • Loading Spine JSON files from various Spine versions, up to and including Spine 4, is supported.

  • Spine texture atlases with all advanced options (e.g. stripping whitespace, rotating) are suported.

  • Alternative: Spine runtime for Castle Game Engine is an alternative approach to load and render Spine models. It supports some additional features by "offloading" some work to the Spine C runtime.

6. Graphic effects

RenderedTexture Precomputed Radiance Transfer
  • Modern approach to OpenGL and OpenGLES usage:

    • Using modern OpenGL (OpenGL 3.3 "core" profile).

    • Possibility to use ancient OpenGL (even 1.1) if we have to. To support ancient, buggy systems or virtual machines. See TGLFeatures.RequestCapabilities for information how to test it.

    • We can leverage some OpenGL ES 3.0 features (for shadow maps, 3D textures, occlusion culling…​), but any OpenGL ES 2.0 system works.

    • On desktops we can use both OpenGL (default) and OpenGLES. On mobile, naturally only OpenGLES.

    • Easy OpenGL debugging (TGLFeatures.Debug allows to get rich logs and exceptions from GL).

7. Images

Easily display display images as user interface or in a viewport.

8. User interface components

Inspector UI Images
  • User interface library providing cross-platform UI controls that work on all platforms, like buttons, labels, images.

  • Their look can be adjusted to match the style of your game.

  • Your game is organized into views. Each view can have a design (created in editor) and an associated unit where you can handle various events, like a key press.

  • Automatic UI scaling to adjust to any screen resolution and aspect ratio with anchors.

  • Powerful masks: manual, API reference, example.

8.1. Text and fonts

9. Networking

The engine uses URLs, allows to download contents of URLs, and can be integrated with various networking libraries.

"Not Quake" demo - real-time network game "Not Quake" demo - real-time network game "Not Quake" demo - real-time network game "Not Quake" demo - real-time network game

10. Optimization and profiling

We have extensive optimization documentation and a number of features to help you make your game faster.

11. Sound

You can play sound, spatial (in 3D) or not.

3D game sound demo - TCastleSoundSource
  • Supports for various sound backends: OpenAL or FMOD, on multiple platforms.

  • Sound streaming is done, for efficient playback of music tracks.

  • WAV and OggVorbis file formats are supported with all sound backends.

  • Sound components TCastleSound and TCastleSoundSource can be designed and tested also in editor.

  • Automatic sound source management based on priorities.

12. Physics

Bunch of physics rigid bodies Physics with mesh collider Physics 2D

Use physics to calculate and react to collisions between objects.

13. Tiled integration

You can design game maps using Tiled.

Tiled snow map (with animations) Tiled beach map (with animations) Tiled isometric map Tiled hexagonal map in "Strategy Game" demo Tiled isometric map in "Strategy Game" demo Tiled orthogonal map in "Strategy Game" demo
  • Tiled maps (TMX files) can be loaded into TCastleTiledMap for an efficient 2D or 3D display in a viewport.

  • Viewport display means they can be combined with other scenes on top of it, like sprite sheets for units on the map.

  • We support various map types (orthogonal, isometric, hexagonal), layers (you control which layers are displayed), animations and more.

  • See the manual about Tiled map.

  • See examples/tiled/strategy_game_demo for a complete strategy game in CGE using Tiled maps.

14. Particles

Particle systems are not yet part of the core Castle Game Engine units. However you can use additional open-source components that add this capability to the engine:

Particles Particles Particles
  • Particle Emitter: Particle system for 3D and 2D that supports editing right inside CGE editor. Particles are calculated with GPU acceleration (transform feedback). By Trung Le (Kagamma).

    Particles editor
  • Effekseer Integration: Integration with Effekseer, a full-featured open-source particle effect creation tool. Also by Trung Le (Kagamma).

    Effekseer Integration

15. Native and fast code using modern Pascal

The engine, as well as your games, are written using modern Object Pascal.

FPC, Delphi, Visual Studio Code
  • We support FPC and Delphi compilers, see Supported compilers and IDEs.

  • Pascal as a programming language is

    • elegant (type-safe, OOP, generics),

    • full-featured (big existing codebases can be used, e.g. Pascal and C, C++ libraries to connect your games with database, AI, networking),

    • native (compiled to native code that runs fast out-of-the-box).


      To interact with a library using C++ classes (and other features that only C++ compilers understand) you generally need to write a "wrapper" library that exposes the equivalent API in plain C. This is exactly the same as trying to use C++ library e.g. from C#.

  • The same programming language that is used to make the engine is used for your applications — this results in simplicity (it’s easy to contribute) and speed.

  • Fast execution. It’s a language that compiles to fast native code, while staying elegant and type-safe.

  • Fast compilation.

  • Native debugging. It’s just a native application using native debugger. Debugging is integral part of the Lazarus IDE.

16. Build tool and continuous integration

Build tool to manage your project from the command-line or in batch mode (good for continuous integration). The build tool, just like editor, reads project information from CastleEngineManifest.xml file.

  • Build tool can build, package, run your application and autogenerate compressed textures (and more).

  • You can build for any supported target platform. You may need to install cross-compiler (e.g. using fpcupdeluxe), some platforms may also require additional tools (see their docs like Android).

  • We can build ready applications, like APK / AAB for Android, IPA for iOS.

  • Docker image with CGE and prerequisites (FPC, Android build tools, texture processing tools) to easily build CGE applications.

  • Ready instructions to automatically build CGE projects using:

    Enjoy modern continuous integration, for free, however you host your code!

Open source, integration with Jenkins, integration with GitHub Actions

17. Free open-source software

The engine is licensed on "LGPL with static linking exception" license, similar to FPC and Lazarus standard libraries.

  • In short it means that you can create commercial closed-source applications with it without any issues.

  • See license for details.

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