Castle Game Engine 2D physics using Kraft

Posted on

Castle Game Engine 2D physics demonstration. A quick 2D game where a plane is using spheres to shoot the boxes 🙂 The physics is done using the fantastic Kraft Physics Engine!

The code to do this is 100% open-source, you can view it on GitHub here: physics_2d_game_sopwith (the main code is in “game.pas” unit).

Also, we now have a manual page describing how to use physics in Castle Game Engine.

This work was sponsored by Castle Game Engine supporters on Patreon. If you want to help in the engine development, please support me on Patreon! Thank you!

Comment on this post ➤

Castle Game Engine physics – Mesh Collider

Posted on

More progress integrating Castle Game Engine with Kraft Physics Engine!

  1. New physics classes (TRigidBody, TCollider and descendants) are now part of the Castle Game Engine core.

    To use this yourself, see the T3DTransform.RigidBody property, and the TRigidBody and TCollider descendants documentation.

    The example code on https://github.com/castle-engine/castle-engine/tree/master/examples/physics/physics_3d_demo should also help 🙂

  2. We have mesh collider, to perform collisions with a scene mesh.

    The mesh collider was beautifully trivial to implement. I honestly didn’t expect it to be so easy to code. Lots of kudos go to Benjamin ‘BeRo’ Rosseaux for creating the wonderful Kraft Physics Engine!

This was implemented thanks to the supporters of Castle Game Engine on Patreon. If you like what I do, please support Castle Game Engine on Patreon!

Comment on this post ➤

Castle Game Engine integration with Kraft Physics Engine

Posted on

First results of Castle Game Engine integration with Kraft Physics Engine! 🙂

The physics demo source code is in GitHub in engine examples.

Kraft Physics Engine by amazing Benjamin ‘BeRo’ Rosseaux. Open-source, clean Object Pascal code, portable (Delphi, FPC, including FPC on Android and iOS).

I want to extend this a bit, and will post more details (on Castle Game Engine news/blog) soon. For now just enjoy the video 🙂

The physics fun was sponsored by Castle Game Engine supporters on Patreon. If you want to help in the engine development, please support me on Patreon!

Comment on this post ➤