Lots of improvements for developers: iOS, Android, camera NavigationType, T3D.Visible, more!

Posted on

sdr

Lots of new things for developers! ๐Ÿ™‚

  1. Improvements for iOS application building:

    • Additional attributes in CastleEngineManifest.xml for iOS: team identifier, overriding qualified name and version for iOS, specifying uses_non_exempt_encryption.

    • Loading music from OggVorbis (using Tremolo customized for iOS).

    • Compilation fixes (workarounds for some FPC problems) to work in release mode.

    • Fixed touch up (mouse up) event. Test multi-touch with our drawing_toy example.

  2. Fixed Android building from Windows.

  3. Large camera API simplification:

    In short: TUniversalCamera class is now gone. Change the navigation type using the new SceneManager.NavigationType property.

    Details: I came to a realization that the TUniversalCamera class is a needless complication. We now expose NavigationType at TCastleAbstractViewport (ancestor of TCastleSceneManager and TCastleViewport).

    We also expose methods ExamineCamera and WalkCamera at TCastleAbstractViewport. They create the camera instance, and can switch the navigation as requested.

    So now you can do

    SceneManager.NavigationType := ntWalk;
    

    instead of the previous (ugly):

    (SceneManager.RequiredCamera as TUniversalCamera).NavigationType := ntWalk;
    

    And instead of

    SceneManager.Camera := SceneManager.CreateDefaultCamera;
    (SceneManager.Camera as TUniversalCamera).NavigationType := ntWalk;
    (SceneManager.Camera as TUniversalCamera).Walk.MoveSpeed := 10;
    

    now you can do

    SceneManager.WalkCamera.MoveSpeed := 10;
    

    This is much simpler, right? ๐Ÿ™‚ It’s also safer, without these ugly typecasts.

  4. More new stuff!

  5. And, in case you missed our announcements from 2 weeks ago, our engine is now integrated with an amazing Kraft Physics Engine by Benjamin ‘BeRo’ Rosseaux.

    The manual page about physics in Castle Game Engine should be helpful.

    The main API point to start reading is the T3DTransform.RigidBody property, and the things it links to: TRigidBody, TCollider and it’s descendants.

3 Replies to “Lots of improvements for developers: iOS, Android, camera NavigationType, T3D.Visible, more!”

  1. Hello,
    Searching for a physics engine for delphi google found your engine and linked me here.
    Now that you have 3D physics included my interrest in your engine is increasing !
    But I’m currently using Delphi not Lazarus and that leads me to more questions :
    How compatible is your engine with delphi ? Will there be a T3DcastleViewport component to intรฉgrate into a fmx application ?
    Also your engine is multiplatform, but Delphi Multiplatform support is awkward with different compiler behavior and “NEXTGEN” compiler directives. This will make it very difficult to support Delphi on multiplatform in the future I guess. For example I tryed to compile kraft with android target and it failed. With delphi I can nly compile kraft for win32, so I guess you’ll run into the same trouble and I’m wondering what options you will consider in the future ?

    Aside from my questions related to Delphi, I want to congratulate you for this great pascal game engine. it’s very impressive !
    Cheers

    1. Thanks for the good words, I’m glad that you like the engine! ๐Ÿ™‚

      As for the Delphi compatibility — I’m working on it, and want to have Delphi compatibility included in the next 6.4 release. See https://castle-engine.sourceforge.io/wp/2017/08/14/delphi-base-compatibility-spine-improvements-other-stuff/ . We already can compile base units from the engine with Delphi. In the future, a Delphi control that allows to put the engine component on a Delphi form will be available — I plan to have a control both for FireMonkey and for VCL.

      As for cross-platform with Delphi: my initial implementation will target native Windows (32-bit and 64-bit) targets with Delphi. Where do we go in the future: it depends on what people will want to, and where you can help ๐Ÿ™‚ I personally cannot afford to buy any version of Delphi, but I’m open for patches, or for sponsoring a version of Delphi.

      In the immediate time, if you want to create cross-platform applications (Windows, Linux, MacOSX, Android, iOS…), you can already use FPC and Lazarus. I can honestly recommend it, if you want to create cross-platform applications using Pascal. It’s free, it’s open-source, and it already supports all the platforms in the world ๐Ÿ™‚ And our engine supports it fully, on Android and iOS too, we even have a special build tool that packages Android and iOS games easily.

      Kraft has similar situation: it does not support compilation for Android or iOS with Delphi. For these platforms, you need to use FPC. This is documented on https://github.com/BeRo1985/kraft . I’m not the Kraft’s author, but I suspect that if you are interested in porting Kraft to Delphi on Android/iOS then the patches will be welcome:)

  2. Hello ! Super cool that you take time to answer ๐Ÿ™‚

    I have a delphi tokyo pro licence and the android add on.

    I have allready done some work for porting kraft code to delphi android and added {$IFDEF NEXGEN} compiler switches

    But I’m not a super skilled programmer like you and Bero, i’m just average. So I would prefer someone reviewing my code before I send my horrible hacks to the super skilled Kraft engine author. And also you are easyer to contact for now.

    For now it compiles and runs on android, but my implementation of “TransformationFromKraft” I took from your engine code is now working well. Cubes sdo stack but not rotate well.

Leave a Reply

Your email address will not be published. Required fields are marked *