I’m working on a big refactor of camera and navigation API in the engine. It is not merged yet, but you can see the in-progress work in camera-refactor branch (or see the differences from master branch).
The current API of camera has a few drawbacks that the refactor addresses:
Current camera settings (“what do you see in a viewport”) are mixed with navigation logic (“how do you use keyboard/mouse to change the camera”). They are mixed within the
TCameraclass, and this causes various headaches when setting or auto-detecting them. All games need the same camera API, but various games need wildly different navigation logic. Many games want to just “roll their own” navigation code.
This is addressed in the new branch, by splitting into
SceneManager.Navigationinstances. The mechanism to auto-detect their settings (based on scene bounding box, X3D nodes etc.) can be now easily disabled by
SceneManager.Cameramay not be created before the first rendering, which is not comfortable. It causes the need for methods like
SceneManager.Camera <> nil.
In the new branch, it’s simpler. The
nil. In contrast,
nil, and it may even remain
nilforever, unless you want to use some built-in navigation logic.
Changing projection parameters using
SceneManager.OnProjectionis not comfortable. Changing projection parameters using CGE editor was not possible.
In the new branch, you can just use
SceneManager.Camera.ProjectionXxxparameters. It’s natural both in code, and in CGE editor.
Ideally, the class
TCastle2DSceneManagershould be deprecated and later removed. It should be trivially easy to get the same effect (orthographic camera, projection API comfortable for 2D games) with the base
I want to create an easy class for 3rd-person navigation. This means that input drives some character, while camera follows this character. This was requested by Robert Daniel Murphy on Patreon.
Stay tuned for more information about this:)
Note that programmers using Castle Game Engine have already more powerful ways of defining a background :), e.g. you can use TCastleSceneManager.Transparent := true and then place any UI control underneath the scene manager.
We have updated the Android SDK API level to 28, following Google requirements. Along with it, various services on Android versions were bumped. Also our Docker image was updated to include the proper tools already downloaded.
Thanks go to Andrzej Kilijański for doing this!
More articles about Castle Game Engine are available at Andrzej Kilijański site. In particular read about:
We have updated small bits in CGE code and build tool to account for the latest Free Pascal Compiler 3.3.1 behaviour (fixed iOS and Nintendo Switch using FPC
linkXXX.resfiles, avoid a flood of warnings caused by new FPC “case” completeness analysis). Also FPC version inside our Docker image was updated.