New Features in Castle Game Engine 7.0
This page is a draft of Castle Game Engine 7.0 news announcement. It documents new features since the last 6.4 release.
- Run it by simply executing "castle-editor" binary in the "bin/" subdirectory of our release zip.
- Editor allows to visually design TCastleUserInterface (like TCastleButton, TCastleLabel) and TCastleTransform (like TCastleScene) hierarchies.
- Editor also manages (creates, compiles) Castle Game Engine projects, using our build tool underneath.
- Integrated with our tools (runs view3dscene, castle-view-image etc. when double-clicking), can preview data (models, images, sounds).
- Runs a configured FPC/Lazarus (in preferences).
- Expect more improvements to editor in the future releases. My plans are on https://github.com/castle-engine/castle-engine/blob/master/tools/castle-editor/README.md --- some of these plans are implemented, some not yet. There also a huge TODO file specifically for the editor :)
Much better API for viewports and cameras.
- To display
TCastleViewport, always. It is a normal user interface control, you can set it's size/position as any other UI control.
- The concept of camera (where are you looking at) and navigation (whether we handle some keys/mouse to move the camera) was split.
TCastleViewport.Camerais always created, and corresponds 1-to-1 to the parent viewport.
TCastleViewport.Navigationis optional, you can explicitly create an instance of
TCastleWalkNavigationand assign them there.
- Auto-detection of camera is by default off. This way you can reliably use
Viewport.Camera.Position := ..., without worrying that some auto-detection will override them. Use
Viewport.AutoCamera := trueto explicitly request this auto-detection.
- Auto-detection of navigation is by default off. This way you can reliably set
Viewport.Navigation := ...(or leave it
nildeliberately) without worrying that some auto-detection will override it. Use
Viewport.AutoNavigation := trueto explicitly request this auto-detection.
- See news 1, news 2. See view_3d_model_basic example.
- To display
Big user interface classes improvements.
- Easy functions to serialize / deserialize TCastleUserInterface and TCastleTransform hierarchies (see CastleComponentSerialize unit) as JSON files.
- CastleSettings.xml file to easily define scaling and default font.
- New controls: TCastleCheckbox, TCastleDesign, TCastleHorizontalGroup, TCastleVerticalGroup.
- Float positions / sizes for everything.
- All existing controls significantly reworked and improved. So many improvements to our user interface hierarchy happened that it's impossible to list it in short -- see news 1, 2, 3, 4, 5, 6, 7.
Nintendo Switch full support from CGE. https://github.com/castle-engine/castle-engine/wiki/Nintendo-Switch
glTF 2.0 initial support.
- Static textured models are supported.
- Animations of transformations supported.
- See https://castle-engine.io/creating_data_model_formats.php for details of glTF 2.0 support.
- Expect more work here soon: Physical Based Rendering, morph targets, skinned animations.
castle-data:/protocol (more advised than previous
ApplicationDatafunction). The “data” directory is documented https://castle-engine.io/manual_data_directory.php in a new manual page. It is also listed on a reworked manual page about networking, downloading and URLs https://castle-engine.io/manual_network.php.
Optimizations and profiling features:
- Built-in simple profiler (TCastleProfiler, use through the Profiler singleton). See https://castle-engine.io/wp/2018/08/25/headlight-built-in-simple-profiler-more/
- Built-in frame profile (TCastleFrameProfiler)
- Integration with Nintendo profiler
- Large speedups, see news: https://castle-engine.io/wp/2019/10/13/numerous-optimizations-and-dynamic-batching/ .
- Dynamic batching now available.
- Loading optimizations (see here).
- Everything described in the updated optimization docs on https://castle-engine.io/manual_optimization.php
- New screen effects API, you can now make screen effects over any UI control (just place it as child of https://castle-engine.io/apidoc-unstable/html/CastleScreenEffects.TCastleScreenEffects.html), and they are much friendlier to use. See https://castle-engine.io/wp/2018/07/29/new-screen-effects-api-and-demo-text-node-optimizations-multi-texture-modes-fixes/ .
- Easy mirrors on flat surfaces (see https://castle-engine.io/wp/2018/10/08/simple-water-using-castle-game-engine/ )
- SeparateDiffuseTexture for prettier look.
- Shadow maps, clip planes available with OpenGLES renderer (this improves all platforms using OpenGLES by default: Android, iOS and Nintendo Switch).
- ASTC (Texture Compression) Support
- Two methods, with demos: https://castle-engine.io/manual_text.php
- CastleLocalizationGetText allows to easily translate UI design (created e.g. using CGE editor), including generating template for translators to translate UI design.
- See https://castle-engine.io/wp/2019/07/21/localization-improvements-and-a-japanese-version-of-escape-from-the-universe/ and https://castle-engine.io/wp/2018/04/25/engine-improvements-localization/ .
- Animation blending (https://castle-engine.io/wp/2018/03/21/animation-blending/)
- Many new features related to PlayAnimation. TPlayAnimationParameters allows to specify things like StopNotification callback, playing backward etc. (see https://castle-engine.io/wp/2018/04/21/engine-improvements-rejuvenated-playanimation-method-easily-play-animations-backward-with-blending-stop-notifications/ ). Additional methods like StopAnimation, ResetAnimationState.
- Ability to easily play simultaneous animations using TTimeSensorNode.Start/Stop.
- See https://castle-engine.io/wp/2019/06/22/many-animations-improvements-gltf-simultaneous-anims-view3dscene-panel-optimizations/
Notable new examples:
- tiled/strategy_game_demo/ - Complete working strategy game, with maps designed using Tiled, working equally well with hexagonal/orthogonal/isometric maps (thanks to new Tiled API), user interface designed using Castle Game Engine Editor and TUIState. See also https://castle-engine.io/wp/2019/01/06/strategy-game-demo-using-cge-and-tiled/ , https://castle-engine.io/wp/2018/12/28/tiled-maps-improvements/ .
- tiled/map_viewer/ - Simple viewer for Tiled maps. You can pan and zoom maps, and load any Tiled map.
- headlight_test/ - Shows new TCastleSceneManager.UseHeadlight property.
- audio/play_sounds/ - Test mixing sounds.
- localization/gettext/ - Localization example, translating resourcestrings and UI designed in CGE editor.
- screen_effects_demo/ - New screen effects API demo.
- --target=android to build both 32-bit and 64-bit binaries.
- New services, like facebook, apps_flyer, freetype, download_uri etc.
- Many upgrades to build infrastructure (new Gradle version etc.)
- AdMob upgraded, and supports TAdWatchStatus that reports why user did not watch the ad.
- Collision detection (TRigidBody.GetCollidingTransforms, OnCollisionEnter, OnCollisionExit).
- Triggers and physics settings
- And more, see https://castle-engine.io/wp/2019/06/15/physics-collision-detection-and-new-properties/
- Split into multiple backends, and FMOD backend added, see https://github.com/castle-engine/castle-engine/wiki/FMOD .
- More features for sounds XML files, like aliases and groups. See https://castle-engine.io/wp/2019/04/29/new-sound-features-alternative-backends-new-demo-aliases/
- LoopingChannel, to easily play multiple sound tracks, ambience tracks etc.
- Sound streaming.
Last but not least, stuff "around" CGE:
- Docker image with docs: https://castle-engine.io/wp/2019/02/16/using-castle-game-engine-with-docker/
- New forum https://forum.castle-engine.io/
- License simplified. The engine is "LGPL with static linking exception" (i.e. you can use it in commercial applications) out-of-the-box. See https://castle-engine.io/wp/2018/05/30/nurbs-simplified-license-just-lgpl-out-of-the-box/ and https://github.com/castle-engine/castle-engine/blob/master/COPYING.md for details.
- API searching, switching betwen stable/unstable API docs.