New Castle Tester – running all engine automatic tests on all platforms (desktop, mobile, Nintendo Switch…) with all compilers (FPC, Delphi)

Posted on

Castle Game Engine Automatic Tests

This screenshot will not win the #screenshotsaturday hashtag, but it took a lot of effort to achieve 🙂

Thanks to Andrzej Kilijański we have a big upgrade to our automatic tests application, available as always in tests/ subdirectory of CGE. Instead of using FpcUnit, the application can now use our own testing framework CastleTester that

  1. Is deliberately very compatible with FpcUnit (in fact, using some of its code).

  2. Tightly integrated with CGE, providing easy UI using CGE to run and display all tests results, and some extra utilities like CreateWindowForTest.

  3. Compiles and runs with both FPC and Delphi. All our tests now pass with both compilers. We made a number of fixes to Delphi support thanks to this (FPC support was being tested and flawless since a long time).

  4. Compiles and runs for all platforms we support. E.g. you can run the testsuite on Android, iOS, Nintendo Switch this way, by building the castle-tester for these platforms — just like any other CGE application.

As always, both Jenkins and GitHub Actions run all these tests automatically after every push. Jenkins even runs them with both FPC and Delphi 11.

Comments on the forum ➤

Google Play Billing Library upgrade

Posted on

unholy_iap

To implement in-app purchases on Android, under the hood we use Google Play Billing Library. We have just upgraded the way we use it, to follow the latest API (no AIDL, and use built-in asynchronous methods).

This is important if you use in-app purchases on Android. Since November 2021 (in one month) Google will no longer allow uploading Android builds (APK, AAB) that use the old API.

There’s no change to the Castle Game Engine public API. Just use the Pascal unit CastleInAppPurchases, following the documentation how to implement in-app purchases on both Android and iOS. Both consumable and non-consumable in-app purchases are supported.

The Unholy Society is already using the new API for our only purchase in the game.

Comments on the forum ➤

Various asset improvements: Wavefront OBJ texture options and possible PBR, Spine free form deformation with curve animation, fixes for creaseAngle in X3D and OBJ

Posted on

Oak Wavefront OBJ model
Spine FFD animation test

Various improvements to various asset formats:

  • We now implement Wavefront OBJ texture options. They are all parsed correctly, and the scale, offset, clamp are actually handled.

    We can also generate PBR (physical) materials when reading Wavefront OBJ files. This feature is for now experimental, and you have to toggle global WavefrontPhongMaterial in X3DLoadInternalOBJ unit to false. In effect, we will create X3D PhysicalMaterial nodes from Wavefront materials, and we’ll use Pr for the PhysicalMaterial.MetallicRoughnessTexture. See the X3D specification of PhysicalMaterial for details what it implies.

  • We now support curve animation for Spine free form deformation. Thanks go to Kagamma (Trung Le) for implementing this!

    The testcase is in our demo-models, open spine/free_form_deformation/exported/skeleton.json and run head_curve animation.

  • Fixed important bug on all 3D models that could use automatic normals generation based on creaseAngle (like X3D and Wavefront OBJ by default).

Comments on the forum ➤