Work on X3D version 4.0 (in specification and Castle Game Engine), glTF and X3D and more documentation
This post is not strictly about Castle Game Engine. It's about X3D 4.0, which is going to be the next major version of the X3D international standard (see the current X3D standards).

X3D is a major building block of our engine. While you can use T

Third-Person Navigation (with Avatar) component in Castle Game Engine
We present a new Castle Game Engine component TCastleThirdPersonNavigation. You can use it easily with TCastleViewport to have a working 3rd-person navigation. This means that you control an avatar with keys (ASWD QE), and the mouse orbits around the avatar, who is displayed and animated in front of the camera.

FPC 3.2.0 released, compatible with CGE, Docker images updated
Great news: New major version of FPC (Free Pascal Compiler), the compiler of our game engine, was just released. New features are documented here. You can get it e.g. from SourceForge or using latest fpcupdeluxe.

Castle Game Engine is of course 100% compatible with it. I was watching and testing FPC SVN branch leading to thi

Gamma Correction and Tone Mapping
Gamma Correction and Tone Mapping are now implemented in Castle Game Engine. They can be trivially controlled by global variables GammaCorrection (by default it is on for PBR materials) and ToneMapping.

Gamma Correction is a way of making lighting calculations more correct (see e.g. here and here for explanation; my analysis of various implementation is here).

Tone Mapping is ju

Easy property to make animation blending
We introduced TCastleSceneCore.DefaultAnimationTransition property.

This is a really easy way to request animation cross-fading (blending) which makes changing animations look much smoother. Just set this to some non-zero value to have smooth animation change. It's the time in seconds, often it's reasonable to start with something small like 0.1.

This is also confi

Reading punctual lights from glTF
We can now read lights from the glTF file.

The lights have to follow glTF extension KHR_lights_punctual. It's a popular extension supported e.g. by Blender -> glTF exporter. So you can just add lights in Blender, export to glTF, open in CGE, and the lights are there!

This works for "punctual" glTF lights, which are converted in a very straightforward fashion to X3D lighting node

New useful project templates in the Castle Game Engine editor
If you click on "New Project" in the Castle Game Engine editor now, it will propose 4 useful templates:


2D game

3D FPS game

3D model viewer

I advise everyone, new and old engine user, to check out these templates. You can get the latest engine version from our main page, as usual. Just unpack and run bin

Activity Recognition on iOS
I have implemented a service that allows to easily query about the current user activity (walking, running, cycling etc.) on an iPhone.

Services are ways to enhance your applications with additional code that has platform-specific implementation and may link with 3rd-party library. See more about iOS services and Android services. You declare them in CastleEngineManifest.xml and then just bu

We have a new joysticks database in Castle Game Engine, and we need YOU to help us test it
Hello everyone!

We have a big and important, but simple request. We've reworked the handling of the joysticks and gamepads in Castle Game Engine, with a lot of new features that include serious improvement of joysticks API, access to a huge joysticks database by SDL2 w

iOS improvements: packaging, vibrations
In preparation for The Unholy Society on iOS...

Packaging of textures specific to given platform by the build tool has been fixed, to really package only textures useful on given platform.

The build tool auto-generate-clean subcommand was improved: by default it cleans only unused files in the auto_generated subdirectories. Call the castle-engine auto-generate-cle

Huge optimizations of glTF animations, pool of scenes for FPS game, limited PBR specular-glossiness support
With the help from Valgrind, I made a few significant optimizations to the engine animations, in particular affecting the skinned animation of glTF:

We update VBOs during animations much faster (we upload it more directly whe

Lots of glTF work, new X3D extensions and conversion improvements
More work on perfect glTF support in Castle Game Engine follows :)

Things done lately related to glTF:

Our engine demo examples/fps_game/ uses now glTF format for both level and creatures. So you can just export from Blender to glTF, using standard Blender exporter.

While X3D is still a great scene graph form

Fun with Sketchfab plugin in Blender, testing glTF performance
Sketchfab addon for Blender is lots of fun. You can search and download Sketchfab models straight into Blender and then export from Blender to glTF and open it in our engine. On the side you can see screenshots when I had some fun with it :)

Thank you go to Blender Guru (Andrew Price) for mentioning this cool thing in h

Testing glTF with models from Sketchfab, improved per-vertex rendering from glTF
Perfect glTF support is now my major task. It quickly became obvious that glTF is just a great asset format for our engine, it works beautifully with Blender and you can find plethora of sample glTF models on the Internet.

Sketchfab contains a lot of models in the glTF format, both fr

Castle Game Engine integration with QuickJS (JavaScript)
Coldzer0 is working on an integration of Castle Game Engine and QuickJS, a powerful JavaScript engine.

Check out this demo how to use JavaScript as a scripting language in your game. It shows how to execute a JavaScript from a Pascal program, and also provide some functions to be called from JavaScript (and handle them in Pascal). So

glTF skinned animation in Castle Game Engine
glTF 2.0 skinned animations work! You can export such animations from Blender and a lot of other software.

Sample models:

Khronos glTF sample models include some skin animations, like CesiumMan, Fox, BrainStem.

Sample skinned animation created in latest Blender (2.82a). Exported to glTF using standard Blender -> X3D exporter, without any tweaks or c

Blender exporters upgrades and fixes, glTF unlit support, castle-anim-frames improvements, loading a series of models for animation
As a great Blender fan, I was unhappy that since Blender 2.8 release we lost some integration features between Blender and Castle Game Engine. So I decided to fix the situation, and upgrade

Per-platform compressed textures and build tool improvements
When you use our auto-generated compressed and scaled textures feature, you can now indicate that certain compression formats are only useful for certain platforms.

In effect, the textures will not be distributed on other platforms, i.e. castle-engine package --target=xxx (see the build tool documentation) will automatical

Physically-Based Rendering and lots of other lighting and materials upgrades (in Castle Game Engine and X3D 4.0)
During the last few months, I was working with the Web3D Consortium to bring many material and lighting upgrades to the next version of X3D and of course to our Castle Game Engine.

I'm proud to officially announce the first result

Joystick improvements
Thanks to Eugene Loza work on the Steam release of "The Unholy Society", you can now detect when joystick is being connected or disconnected.

Simply assign your own event to Joysticks.OnConnect and OnDisconnect.

By default nothing is done. But you can call e.g. Joysticks.Initialize to reinitialize joysticks, thus automatically accounting for the newly connected or disconnected joysticks. A demo of it i

Show more

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!