Engine news (6.5 release snapshots, improvements to editor, TCastleWindowBase, joysticks and more)

Posted on

Escape from the Universe - space map design
Escape from the Universe - space map on Nintendo Switch (mockup)
  1. You can now download Castle Game Engine 6.5 “snapshot” (build from the latest GitHub code) from here.

    Until I release a stable Castle Game Engine 6.6, this is the easiest way to test the very latest CGE features (including new GUI editor). I’m working now on making this snapshot fully-automatically updated by Jenkins, and I’ll probably make it linked from our main page soon.

  2. Many editor improvements:

    • Images of TCastleButton are now configurable in the editor.

    • Properties are split into tabs Basic, Layout, Other, All. Note that the Layout tab contains both properties list and anchors UI.

    • Properties TCastleImageControl.Clip, ClipLine, Rotation, RotationCenter are now published and configurable in the editor.

    • You can edit colors in hexadecimal notation, like AABBCC. This allows to easily copy colors between CGE editor and GIMP/Photoshop etc.

    • You can configure TCastleScene animation in the editor (use AutoAnimation, AutoAnimationLoop properties).

  3. TCastleWindowCustom / TCastleControlCustom are renamed to TCastleWindowBase / TCastleControlBase and are simpler to use now, as they by default have a defined background. Control it using the new Container.BackgroundColor and Container.BackgroundEnable properties.

    For new applications, I actually advise using TCastleWindowBase / TCastleControlBase instead of their counterparts TCastleWindow / TCastleControl.

    The downside of using TCastleWindowBase / TCastleControlBase is that you need to add a scene manager instance to them yourself (or using CGE editor). But that’s usually trivial: From code, just do SceneManager := TCastleSceneManager.Create(SomeOwner); Window.Controls.InsertFront(SceneManager);. Or just use CGE editor to add TCastleSceneManager to the appropriate xxx.castle-user-interface design.

    The upside is that you control the moment of creation of the TCastleSceneManager. You don’t have to create it right at the beginning of the application, you don’t have to keep it created until the end of the application. E.g. you can show a main menu, and only create TCastleSceneManager once user presses “Play”. You can even use our TUIState to nicely separate your application into states for this (1 state for “showing the main menu”, 1 state for “playing the game”), and our UI controls play nicely with this (whether you create them in code, or design in CGE editor).

  4. FindFiles is now reliable and cross-platform. Can search recursively in game data (using castle-data:/ protocol) always, even e.g. in Android assets or Nintendo Switch game data.

  5. TGLImage and TGLImageCore are finally merged into one class, TDrawableImage . This makes them simpler.

  6. New class TCastleImagePersistent allows to load images (TDrawableImage) with caching, and can be used to configure image in the editor comfortably. It is used by TCastleImageControl and TCastleButton already.

  7. Joysticks:

    • Refactored (moved a lot of code into platform-specific “backend” classes in separate, internal units).
    • Various API improvements. E.g. you can now just use Joysticks.Count, Joysticks[0].Axis (TVector2).
    • Joysticks work also on Nintendo Switch now.
  8. Introduced static properties TRenderingAttributes.DefaultMinificationFilter, DefaultMagnificationFilter.

    This allows to e.g. easily disable mipmaps in all scenes on some cases, by TRenderingAttributes.DefaultMinificationFilter := minLinear;

Comments on the forum ➤

Castle Game Engine supports Nintendo Switch!

Posted on

Escape from the Universe on Nintendo Switch - design
Escape from the Universe on Nintendo Switch - in CGE editor

Castle Game Engine now supports compiling your games to the Nintendo Switch console ! A modern, succesfull, indie-friendly console from Nintendo.

It is a full integration, really 100% of the engine works on Nintendo Switch. From the developer point of view, you just write cross-platform Pascal code using CGE units, and then you can recompile the application using the Castle Game Engine build tool with --target=nintendo-switch.

Note that the integration code with Nintendo Switch is not public and not open-source. It cannot be, as we are covered by Nintendo NDA agreements and we cannot disclose the technological details about how Nintendo Switch works. To develop on Nintendo Switch, you have to:

  • Become a Nintendo Developer yourself, and sign the necessary NDA agreements between your company and Nintendo. You will most likely want to buy a developer version of the console, as well.
  • Contact me (Michalis Kamburelis) through the non-public Nintendo developer forum. I can then share with you the necessary code that adds Nintendo Switch integration on top of the open-source CGE core, through the Nintendo forum, so Nintendo can confirm it’s legally OK with them. Of course you get this for free. The integration code cannot be open-source, but I still want to give it to everyone for free.

Enjoy a truly cross-platform game engine in Pascal!

Comments on the forum (4) ➤