Improvements to creatures and items from resource.xml (weapon reloading, automatic pool…), updated resource_animations and fps_game examples

Posted on

Zrzut ekranu z 2020-10-19 02-48-53
Zrzut ekranu z 2020-10-19 02-48-18
Zrzut ekranu z 2020-10-19 02-48-00
Zrzut ekranu z 2020-10-19 02-47-41

A number of improvements and fixes to creatures and items defined by resource.xml were done. Also, our example animations/resource_animations was completely redone, and example fps_game now has a proper gun for shooting šŸ™‚

  1. Weapons defined by CastleItems support reloading, with reload animation, ammo capacity and currently loaded ammo. Demo in fps_game .

  2. Auto-determine pool of animations. For animations not defined by castle-anim-frames/MD3, using pool is most advised, to get performance and animation blending.

  3. Introduced orientation=”..” to resource.xml options. Allows to mix models in glTF, castle-anim-frames and any other formats easily within one project.

  4. resource_animations example is now:

    • designed using CGE editor.
    • it is much simpler, spawning creature “by the book” (using CreateCreature) instead of demonstrating its animations in hacky way.
    • clearly advises the approach “single glTF file” instead of setups with x3d/castle-anim-frames.
  5. The ShootingEye from fps_game with no/poor animations is replaced with a pretty plasma gun from OpenGameArt. The model has been retouched by Michalis and exports nicely to glTF.

  6. Deprecated using different URLs for different animations. See how to define animations in resource.xml. Different file per animation doesn’t match the advised usage (one glTF file with all animations), is not efficient (the same file will be switched back-and-forth to show various animation states, if reused by multiple creatures) and makes animation blending impossible.

  7. Fixed blinking of animation from castle-anim-frames when defined in resource.xml

  8. Fixed changing bounding sphere radius for resources loaded from resource.xml

Start the discussion at Castle Game Engine Forum