# Improvements to creatures and items from resource.xml (weapon reloading, automatic pool...), updated resource\_animations and fps\_game examples

**URL:** https://forum.castle-engine.io/t/improvements-to-creatures-and-items-from-resource-xml-weapon-reloading-automatic-pool-updated-resource-animations-and-fps-game-examples/238
**Category:** News
**Created:** [October 20, 2020, 6:17pm UTC](https://forum.castle-engine.io/t/improvements-to-creatures-and-items-from-resource-xml-weapon-reloading-automatic-pool-updated-resource-animations-and-fps-game-examples/238 "2020-10-20T18:17:12Z")
**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 20, 2020, 6:17pm UTC](https://forum.castle-engine.io/t/improvements-to-creatures-and-items-from-resource-xml-weapon-reloading-automatic-pool-updated-resource-animations-and-fps-game-examples/238/1 "2020-10-20T18:17:12Z")

</div>

| [![fps_game_screen_1](https://castle-engine.io/wp/wp-content/uploads/2020/10/fps_game_screen_1-200x113.png)](https://castle-engine.io/wp/wp-content/uploads/2020/10/fps_game_screen_1.png "fps\_game\_screen\_1") |
| [![fps_game_screen_3](https://castle-engine.io/wp/wp-content/uploads/2020/10/fps_game_screen_3-200x113.png)](https://castle-engine.io/wp/wp-content/uploads/2020/10/fps_game_screen_3.png "fps\_game\_screen\_3") |
| [![fps_game_screen_4](https://castle-engine.io/wp/wp-content/uploads/2020/10/fps_game_screen_4-200x113.png)](https://castle-engine.io/wp/wp-content/uploads/2020/10/fps_game_screen_4.png "fps\_game\_screen\_4") |
| [![Zrzut ekranu z 2020-10-19 02-48-53](https://castle-engine.io/wp/wp-content/uploads/2020/10/Zrzut-ekranu-z-2020-10-19-02-48-53-200x117.png)](https://castle-engine.io/wp/wp-content/uploads/2020/10/Zrzut-ekranu-z-2020-10-19-02-48-53.png "Zrzut ekranu z 2020-10-19 02-48-53") |
| [![Zrzut ekranu z 2020-10-19 02-48-18](https://castle-engine.io/wp/wp-content/uploads/2020/10/Zrzut-ekranu-z-2020-10-19-02-48-18-200x117.png)](https://castle-engine.io/wp/wp-content/uploads/2020/10/Zrzut-ekranu-z-2020-10-19-02-48-18.png "Zrzut ekranu z 2020-10-19 02-48-18") |
| [![Zrzut ekranu z 2020-10-19 02-48-00](https://castle-engine.io/wp/wp-content/uploads/2020/10/Zrzut-ekranu-z-2020-10-19-02-48-00-200x117.png)](https://castle-engine.io/wp/wp-content/uploads/2020/10/Zrzut-ekranu-z-2020-10-19-02-48-00.png "Zrzut ekranu z 2020-10-19 02-48-00") |
| [![Zrzut ekranu z 2020-10-19 02-47-41](https://castle-engine.io/wp/wp-content/uploads/2020/10/Zrzut-ekranu-z-2020-10-19-02-47-41-200x114.png)](https://castle-engine.io/wp/wp-content/uploads/2020/10/Zrzut-ekranu-z-2020-10-19-02-47-41.png "Zrzut ekranu z 2020-10-19 02-47-41") |

A number of improvements and fixes to [creatures and items defined by resource.xml](https://castle-engine.io/creating_data_resources.php) were done. Also, our example [animations/resource\_animations](https://github.com/castle-engine/castle-engine/tree/master/examples/animations/resource_animations) was completely redone, and example [fps\_game](https://github.com/castle-engine/castle-engine/tree/master/examples/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](https://github.com/castle-engine/castle-engine/tree/master/examples/fps_game) .

2. Auto-determine [pool](https://castle-engine.io/apidoc-unstable/html/CastleResources.T3DResource.html#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=”..”](https://castle-engine.io/apidoc-unstable/html/CastleResources.T3DResource.html#Orientation) to [resource.xml options](https://castle-engine.io/creating_data_resources.php). Allows to mix models in glTF, castle-anim-frames and any other formats easily within one project.

4. resource\_animations example is now:

5. The ShootingEye from [fps\_game](https://github.com/castle-engine/castle-engine/tree/master/examples/fps_game) with no/poor animations is replaced with a pretty [plasma gun from OpenGameArt](https://opengameart.org/content/plasma-gun). 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](https://castle-engine.io/creating_data_resources.php). 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
