# Demo game using Blender, Sketchfab, Quaternius models, TCastleMoveAttack. Early Preview of TCastleMoveAttack merged. Slides from conference last week

**URL:** <https://forum.castle-engine.io/t/demo-game-using-blender-sketchfab-quaternius-models-tcastlemoveattack-early-preview-of-tcastlemoveattack-merged-slides-from-conference-last-week/1393>\
**Category:** News\
**Created:** [October 21, 2024, 11:17am UTC](https://forum.castle-engine.io/t/demo-game-using-blender-sketchfab-quaternius-models-tcastlemoveattack-early-preview-of-tcastlemoveattack-merged-slides-from-conference-last-week/1393 "2024-10-21T11:17:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [October 21, 2024, 11:17am UTC](https://forum.castle-engine.io/t/demo-game-using-blender-sketchfab-quaternius-models-tcastlemoveattack-early-preview-of-tcastlemoveattack-merged-slides-from-conference-last-week/1393/1 "2024-10-21T11:17:58Z")

</div>

| [![FPS game demo - skeleton](https://forum.castle-engine.io/uploads/default/original/2X/7/79f0d95b52c9ed4c773e997c284b36c16b1767c3.png)](https://castle-engine.io/wp/wp-content/uploads/2024/10/screenshot.png "FPS game demo - skeleton") |
| [![FPS game demo - level design](https://forum.castle-engine.io/uploads/default/original/2X/9/9ff8e10e74b73e8b45682ba15556b38830e9eab7.png)](https://castle-engine.io/wp/wp-content/uploads/2024/10/level_blender_cge_2.png "FPS game demo - level design") |
| [![FPS game demo - level design in Blender](https://forum.castle-engine.io/uploads/default/original/2X/6/6e6035ac8d18d06a84835e08f570d3730cc8bb68.png)](https://castle-engine.io/wp/wp-content/uploads/2024/10/level_blender.png "FPS game demo - level design in Blender") |
| [![FPS game demo - level design](https://forum.castle-engine.io/uploads/default/original/2X/4/4f5b3088fd122b16e1fdd7699dd322bce93c7cca.png)](https://castle-engine.io/wp/wp-content/uploads/2024/10/level_blender_cge_1.png "FPS game demo - level design") |
| [![FPS game demo - level design](https://forum.castle-engine.io/uploads/default/original/2X/e/eff68b573051aed013abf8e7970672727e578a94.png)](https://castle-engine.io/wp/wp-content/uploads/2024/10/level_blender_cge_run.png "FPS game demo - level design") |
| [![FPS game demo - props from Sketchfab](https://forum.castle-engine.io/uploads/default/original/2X/d/d18f916375a3721860a96a69353bfd51b1a233b4.png)](https://castle-engine.io/wp/wp-content/uploads/2024/10/level_sketchfab_1.png "FPS game demo - props from Sketchfab") |
| [![FPS game demo - props from Sketchfab](https://forum.castle-engine.io/uploads/default/original/2X/7/73d8388648dc4cbce6ff5ca12a2e1a6ab53e7823.png)](https://castle-engine.io/wp/wp-content/uploads/2024/10/level_sketchfab_2.png "FPS game demo - props from Sketchfab") |
| [![FPS game demo - win](https://forum.castle-engine.io/uploads/default/original/2X/5/580fbc26dbd7f4d3bfe5a25196170f5181c97e11.png)](https://castle-engine.io/wp/wp-content/uploads/2024/10/win.png "FPS game demo - win") |

Today’s news is a combo of new things 🙂 I am back from 1.5 weeks of conferencing (first in [Germany](https://castle-engine.io/wp/2024/10/11/slides-from-my-presentation-in-koln-cologne-germany-today-spoilers-about-some-new-engine-features/) then in [Poland](https://www.bsc.com.pl/zlot-programistow-delphi-2024/)). I have fresh energy, new demo and slides for you to enjoy!

1. First of all, I have merged to CGE _master_ branch an initial design of `TCastleMoveAttack` component that allows to easily define a creature AI. The idea is to attach this behavior to any `TCastleTransform` and make it behave like a typical FPS games enemy — it will walk toward (configurable) enemy, it will make a short range attack, it will run away from enemy when low on health etc.

It cooperates with the `TCastleLiving` behavior that represents something that _has hit points_ and _can be dead / destroyed_. You will typically add `TCastleLiving` to each enemy (otherwise enemy is indestructible) and to the player (camera or avatar, depending on if you make a 1s-person or 3rd-person view).

It is configurable what is the enemy for each `TCastleMoveAttack` — they can track and attack any `TCastleLiving`. So they can attack the player, or fight with each other — lots of fun possibilities!

There are some [important TODOs](https://castle-engine.io/roadmap#behavior_move_attack) remaining to be finished in this regard, so I emphasize that _the way this component works will change_ (in particular, the movement will change to follow [physics](https://castle-engine.io/physics)). Do not use it yet for bigger projects — though you can certainly use it already to have some fun 🙂 I also emphasize that _this is not the only way to make enemies logic in Castle Game Engine_ — you can always code your own logic, creating new [behaviors](https://castle-engine.io/behaviors) (see e.g. _“3D FPS Game”_ template for a starting point).

The existing documentation for now is in [API reference of CastleLivingBehaviors unit](https://castle-engine.io/apidoc/html/CastleLivingBehaviors.html) and you can take a look what the examples do:

  - [examples/creature\_behaviors](https://github.com/castle-engine/castle-engine/tree/master/examples/creature_behaviors)
  - [examples/fps\_game](https://github.com/castle-engine/castle-engine/tree/master/examples/fps_game)
  - [New demo project from “Zlot Programistów Delphi” conference last week](https://github.com/castle-engine/conference-zlot-delphi-2024)

2. Enjoy the new demo project mentioned above from “Zlot Programistów Delphi”: [Demo game using Blender, Sketchfab, Quaternius models, TCastleMoveAttack](https://github.com/castle-engine/conference-zlot-delphi-2024).

It’s a complete game with level designed using [Blender](https://castle-engine.io/blender), level props from [Sketchfab](https://castle-engine.io/sketchfab), enemies from [Quaternius](https://quaternius.com/), enemy logic using `TCastleMoveAttack` and `TCastleLiving`. The game code shows simple things like game “win” (you “win” the game when you reach a certain invisible box in the level), game “lost” (when player’s life drops to zero), walking with mouse look, shooting at enemies.

The example is naturally compatible with both FPC/Lazarus and Delphi.

3. Finally, the [slides from my presentation at “Zlot Programistów Delphi” 2024 are available](https://castle-engine.io/zlot2024).
