-
If you have Nintendo Switch console, by sure to check out Escape from the Universe on Nintendo Switch, a game released last month by Cat-astrophe Games.
The game uses our Castle Game Engine for everything, of course. It depends on CGE Nintendo Switch support. A Japanese version of the game is also coming, using CGE UI localization system.
-
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
TCamera
class, 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.Camera
andSceneManager.Navigation
instances. The mechanism to auto-detect their settings (based on scene bounding box, X3D nodes etc.) can be now easily disabled bySceneManager.AutoDetectCamera
andSceneManager.AutoDetectNavigation
. -
Currently
SceneManager.Camera
may not be created before the first rendering, which is not comfortable. It causes the need for methods likeSceneManager.RequiredCamera
or checkingSceneManager.Camera <> nil
.In the new branch, it’s simpler. The
SceneManager.Camera
is nevernil
. In contrast,SceneManager.Navigation
may benil
, and it may even remainnil
forever, unless you want to use some built-in navigation logic. -
Changing projection parameters using
SceneManager.OnProjection
is not comfortable. Changing projection parameters using CGE editor was not possible.In the new branch, you can just use
SceneManager.Camera.ProjectionXxx
parameters. It’s natural both in code, and in CGE editor. -
Ideally, the class
TCastle2DSceneManager
should 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 baseTCastleSceneManager
. -
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:)
-
1 Like