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

1. Screenshots

Multiple viewports with a DOOM level in view3dscene Bump mapping and shadow maps from multiple light sources Lights editor on a scene with shadow maps Close up shadows on the tree. Notice that leaves (modeled by alpha-test texture) also cast correct shadows. Real-time water with caustics, reflections, shadows Volumetric fog RenderedTexture Terrain 1 Fixed-camera game Mountains Of Fire - split-screen coop game "Little Things" game with screen effects Precomputed Radiance Transfer

2. Summary

  • Cross-platform (desktop, mobile, console). Target any platform, work on various desktop platforms. WebGL and Oculus (VR) are coming too.

  • Lots of ways to define data: 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.

  • Visual editor to design 3D and 2D games and scalable user interface with anchors.

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

  • Tooling friendly for continuous integration. Build tool, Jenkins, GitHub actions.

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

  • Mobile (Android, iOS) with numerous Android services and iOS services to integrate with platform-specific features.

  • Console (Nintendo Switch).

  • Raspberry Pi (it’s just desktop Linux on Arm CPU).

  • Coming soon (roadmap):

    • Oculus (VR) (we have the hardware to test)

    • WebGL (FPC can compile to WebAssembly)

    • XBox (we have the hardware to test).

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

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

  • Allows to easily build the project for all platforms.

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

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

5. Viewport with scenes, camera, navigation

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

5.1. glTF support

Support for standard model format from Khronos glTF.

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

Support for 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 view3dscene allows to convert various models to X3D.

5.3. Sprite sheets

Support for sprite sheets.

  • In Castle Game Engine, Starling and Cocos2D formats.

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

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

5.4. Spine support

Support for Spine with skeletal 2D animations.

5.5. Graphic features

We feature multiple graphic features:

6. Images

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

7. User interface

  • 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 states. Each state 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.

7.1. Text and fonts

8. 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 deploy CGE applications e.g. from Jenkins or GitHub actions.

  • Ready instructions to use GitHub Actions with your project.

9. Native and fast code using modern Pascal

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

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

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

10. Networking

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

11. Optimization and profiling

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

12. Sound

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

  • Supports for various sound backends: OpenAL or FMOD, on multipe 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.

13. Physics

You can use physics.

  • Define rigid bodies and colliders on your objects.

  • Allow gravity and collisions to automatically have an effect.

  • Register events on collisions or triggers.

  • We use Kraft Physics Engine under the hood.

  • Coming soon (roadmap): designing colliders, rigid bodies and joints using code or by CGE editor. See teaser movie, 1st PR.

  • You can perform easily collision queries to determine…​ whatever you need. Just set TCastleSceneCore.Spatial to at least [ssDynamicCollisions] to make collision queries treat your scene as more than just a bounding box. Then use routines like Viewport.Items.WorldRayCast or Viewport.Items.WorldBoxCollision to query whether something collides. Note that this, as of now, does not use the "proper" physics engine (like Kraft or planned Bullet), instead it uses custom octree implementation, but this will change in the future.

14. Tiled integration

You can design game maps using Tiled.

  • Tiled maps (TMX files) can be loaded into TCastleTiledMapControl for 2D display.

  • Or they can be loaded (work in progress) into TCastleScene for 3D display and easy integration with other scenes on top of it, like sprite sheets for units on the map.

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

15. Free open-source software

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

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.