Merry Christmas, some summaries and API improvements

Posted on

Castle Game Engine Christmas postcard
Castle Game Engine Christmas postcard
Castle Game Engine Christmas postcard

As we get near the end of 2023, I want to simply thank everyone who supports Castle Game Engine in whatever way — on Patreon, by making games, by code contributions, by feedback, or just by simply being here and looking what we’re doing šŸ™‚

The end of this year was a bit busy for me, admittedly, and I didn’t achieve yet some of our big goals I hoped for 2023 (like 7.0 release, or even 7.0-alpha3, or Delphi/Linux finish, or review of some very important PRs like Steam, new navigation components, Tiled improvements). But I hope to get there, there’s still one more week! šŸ™‚ And we did a lot already, making the engine both more functional and also easier to use in many departments. See all things we added for 7.0-alpha3. We also have lots of new up-to-date training material, starting from “Bad way to play chess” 2 tutorial articles, though many manual updates, Pascal learning materials and finally slides and examples from all conferences I attended in 2023. I hope you enjoy this steady progress.

Onward with a description of most important recent API updates:

  • Undeprecated and made read-only TCastleTransform.RigidBody. This is just a shortcut for Transform.FindBehavior(TCastleRigidBody).

  • Temporary but important TCastleTransform.InternalMovesPhysicsBodies — workaround for some cases when using physics, and moving parent object from code whilst children objects have physics rigid bodies.

  • New TCastleComponentFactory — load a serialized component and instantiate multiple times.

  • New ComponentClone — deep-copy (clone) any component.

  • Some long-deprecated CastleSoundEngine API removed (or moved to private, so not accessible): SoundEngine.Sound, SoundEngine.Sound3D, SoundEngine.PlaySound, SoundEngine.LoadBuffer, SoundEngine.FreeBuffer.

    Since a long time, we have better alternatives: play sound using TCastleSound, TCastlePlayingSound, TCastleSoundSource, TSoundEngine.Play. See the sound engine documentation. These new classes provide much improvement (are easier to use from code, and are possible to setup in editor too).

    If you have any questions how to upgrade old API usage, consult above manual, and talk to us! A short map:

    SoundEngine.Sound can most usually be just replaced with SoundEngine.Play

    SoundEngine.Sound3d replacement is more involved, you need to use TCastleSoundSource attached to some TCastleTransform.

That’s it for today, but I hope to have bigger news very soon — hopefully still in 2023 šŸ™‚ Have a good Christmas, holidays, and a happy New Year everyone!

And since this was a year of AI boom, enjoy 3 AI-generated CGE + Christmas themed postcards attached to this news post šŸ™‚

Start the discussion at Castle Game Engine Forum