# Castle Game Engine

Object Pascal 2D/3D game engine with a visual editor, reusable components and cross\-platform build tools\.

ID: Q1270 · Revision: 1318

Type: software · License: Core: LGPL\-2\.0\-or\-later with static\-linking exception; editor: GPL\-2\.0\-or\-later; examples generally BSD\-3\-Clause\.[^license] · Status: active

Website: https://castle-engine.io/



Castle Game Engine combines a visual editor with Object Pascal APIs for 2D and 3D games and applications\. It supports reusable scene and interface designs, external model formats and platform\-oriented build tooling\. Its engine core, editor and example content have different licenses, and its web target has additional development and browser constraints\.[^features][^license][^web]

## Visual design and code

The editor assembles worlds and interfaces using components and stores designs in a JSON\-based representation\. Designs can reference other designs, supporting reusable content comparable in purpose to prefabs\. Developers can add project\-specific components and use an external Pascal IDE for application code\. This combines visual authoring and programming without making the saved design interchangeable with another engine's project format\.[^features]

## Behavior and object ownership

Castle's guide for Unity developers maps some GameObject roles to TCastleTransform and describes behavior classes for attaching logic\. It also distinguishes visual parenting from ownership: the parent controls hierarchy, while the owner participates in freeing component instances\. A viewport is itself a UI component containing a view of the world\. These differences matter when porting object lifetime, interface structure and camera behavior\.[^unity-guide]

## Model interchange

The glTF guide supports GLB and glTF files, embedded or external textures, skinned animation and selected extensions\. It explicitly lists morph targets as an outstanding feature\. For skinned animated meshes, it describes bounding\-box collision and suggests attaching more precise physical colliders to exposed joint transforms where needed\. Thus, accepting a model format is not a promise of identical animation, material and collision behavior\.[^gltf]

## Building and packaging

CastleEngineManifest\.xml describes a project's source, identity and packaged files\. The build tool distinguishes compiling from packaging and can select Free Pascal or Delphi where appropriate\. It also integrates platform\-specific dependencies and project conventions\. This helps automate delivery, but a selected target still depends on a suitable compiler and its native toolchain rather than only on the visual design\.[^build]

## Web\-target limits

The web documentation labels the feature as undergoing intensive development\. It describes a single\-canvas application model and warns that the browser must own the main loop, making certain blocking message loops unsuitable\. Persistent save data and file dialogs remain listed as TODOs\. Consequently, desktop behavior should not be assumed to carry over unchanged, especially for games that depend on persistence, multiple windows or synchronous dialogs\.[^web]

## Licensing boundaries

The core uses LGPL version 2 or later with a static\-linking exception that allows independent application modules to keep their chosen license\. The visual editor is separately GPL version 2 or later\. Example code and most example data use BSD three\-clause terms, with marked data exceptions\. These distinctions concern different parts of the distribution: using the editor to author a game is not the same as distributing a modified editor or incorporating specially licensed example data\.[^license]

## Substitution considerations

Castle Game Engine is a candidate alternative to [Unity](/unity) for teams seeking visual 2D/3D authoring combined with a Pascal codebase\. Its Unity\-oriented guide provides conceptual mappings, not a project converter\. Game behavior, reusable designs, shaders, assets and service integrations need individual migration work\. The engine's documented glTF and web limitations are especially relevant where the existing game relies on those capabilities\.[^unity-guide][^unity][^features][^gltf][^web]

## Capabilities and substitutions

### Visual scene and interface design — supported

The editor creates 2D/3D and UI designs, serializes them and supports reusable designs and custom components\.[^features]

Use case: Building 2D/3D games with visual design and Object Pascal code · Platforms: Windows, macOS, Linux, FreeBSD, Android, iOS, Web · Region: Version, build and integration requirements apply

### Object Pascal application code — supported

Application behavior uses Pascal classes and APIs, including transform behaviors and views\.[^unity-guide]

Use case: Building 2D/3D games with visual design and Object Pascal code · Platforms: Windows, macOS, Linux, FreeBSD, Android, iOS, Web · Region: Version, build and integration requirements apply

### glTF asset import — limited

GLB/glTF and several extensions are supported, but the current guide lists morph targets as missing and describes specific animated\-collision behavior\.[^gltf]

Use case: Building 2D/3D games with visual design and Object Pascal code · Platforms: Windows, macOS, Linux, FreeBSD, Android, iOS, Web · Region: Version, build and integration requirements apply

### Web deployment — limited

The WebAssembly/WebGL route is in intensive development; browser loop, storage and window limitations require project\-specific review\.[^web]

Use case: Building 2D/3D games with visual design and Object Pascal code · Platforms: Windows, macOS, Linux, FreeBSD, Android, iOS, Web · Region: Version, build and integration requirements apply

### [Substitute for Unity](/unity) — limited

Assessment: an alternative for 2D/3D games when a team accepts Object Pascal, Castle's component model and its supported deployment paths\. A vendor guide maps concepts but does not establish automatic Unity project/C\# conversion; shader, asset and service requirements need separate review\.[^features][^unity-guide][^gltf][^web][^unity]

Use case: Building 2D/3D games with visual design and Object Pascal code · Platforms: Windows, macOS, Linux, FreeBSD, Android, iOS, Web · Region: Version, build and integration requirements apply

## References

[^features]: [Castle Game Engine features](<https://castle-engine.io/features>) — Visual designs, Pascal code, platforms and reusable components (vendor; retrieved 2026-10-07T20:08:51Z)

[^unity-guide]: [Castle overview for Unity developers](<https://castle-engine.io/castle_game_engine_for_unity_developers>) — Transforms, behaviors, viewports and owner versus parent (vendor; retrieved 2026-10-07T20:08:51Z)

[^gltf]: [Castle glTF support](<https://castle-engine.io/gltf>) — Formats, extension coverage, morph\-target gap and animated collision (vendor; retrieved 2026-10-07T20:11:31Z)

[^build]: [Castle build tool](<https://castle-engine.io/build_tool>) — Manifest, compile/package and compiler selection (vendor; retrieved 2026-10-07T20:11:31Z)

[^web]: [Castle web target](<https://castle-engine.io/web>) — Intensive development, single canvas, persistence TODOs and browser event\-loop limits (vendor; retrieved 2026-10-07T20:13:04Z)

[^license]: [Castle licensing](<https://castle-engine.io/license>) — LGPL core with linking exception; GPL editor; BSD examples and marked data exceptions (vendor; retrieved 2026-10-07T20:08:22Z)

[^unity]: [Unity GameObjects manual](<https://docs.unity3d.com/Manual/GameObjects.html>) — GameObject/component authoring model (vendor; retrieved 2026-10-07T20:13:04Z)

Source revision: https://substitutefor.net/entities/Q1270?revision=1318
