How quick is 'ExtractAnimSeq'?

Blitz3D Forums/Blitz3D Programming/How quick is 'ExtractAnimSeq'?

Hujiklo(Posted 2004) [#1]
I'm just trying to tidy up all the stuff I've slapped together. I'm looking at my types for enemies - sort of logically I made fields for different anim-sequences to be then called later on just using names like 'crouch', 'walk' etc. I'm just wondering if there is any point to making all this space in the actual type array to hold anims that are already stored in the original entities b3d - ie. Is just better to call the anim-sequence using the 'ExtractAnimSeq' whenever I need it rather than have separate sequences stored in a type for each entity? I'm thinking maybe if each type has it's own sequences stored over and over then it could get pretty memory consuming needlessly, especially if 'ExtractAnimSeq' is just as fast. What do you think?


JoshK(Posted 2004) [#2]
That will cause memory leaks.


Hujiklo(Posted 2004) [#3]
Um - which way around Halo? Which way will cause the memory leaks?


GfK(Posted 2004) [#4]
He means that extracting anim sequences "when needed" will cause memory leaks. It may have escaped your attention, but there is currently no way to 'free' an animSeq. So extracting sequences many times is going to eat up loads more memory than simply doing it the way God intended.


Hujiklo(Posted 2004) [#5]
Yes it did escape my attention like so much other stuff!!
I thought it was sort of dynamic and killed of the previous sequence and then loaded another.
Bummerama on a jet-ski!!
Hmmmm...
So if I'm loading say 200 enemies as a Type into a map - I assign them all their individual attributes and anim-sequences won't that take a gnarly chunk out of ram too? Or does the Type behave in a clever way and only reference the original animmesh data? Can anyone tell me how it works?

Help much appreciated!


Hujiklo(Posted 2004) [#6]
Um - if anybody could tell me the best way to handle these animation sequences I'll give them 5 shiney new pence, as endorsed and guaranteed by the Bank of England.

If I'm loading say 200 enemies as a Type into a map - I assign them all their individual attributes and anim-sequences won't that take a gnarly chunk out of ram? Or does the Type behave in a clever way and only reference the original animmesh data? Can anyone tell me how it works?


Ross C(Posted 2004) [#7]
I think Halo posted here concerning this. He had 30 odd enemies and animated them all was a big slow down. Because the bone operations are done in software i think, it's slow to animated lots of these. You should try it out though, just to see.


Hujiklo(Posted 2004) [#8]
Thanks Ross - but I'm not going to animate 200 enemies at once! I'm working on a zoning system that the player activates with his presence - I'll at most have 5 or 6 boned enemies animating at once.
My concern is with regard to the size of the Type if I store each individual type along with its own extracted anim-sequences...

Does the Blitz Type behave in a clever way and only reference the original animmesh data, or will it atually make a massive array of copied anim-sequences for each type?


simonh(Posted 2004) [#9]
It may have escaped your attention, but there is currently no way to 'free' an animSeq

Well, that's not quite true. Freeing an entity will free the anim sequences that have been extracted from it.