My assignment is 3D Fighting game.
So my characters must have a lot of animations in each other.
If I loads animations with Actor class and follows “Roaming Ralph” 's sample, then it taking so long when loading.
(I thinks it might load a new model in every animation I have played.)
for example>>
self.ralph.loop(‘run’)
self.ralph.loop(‘stand’)
self.ralph.loop(‘turn’)
It loads a model for three times.
Load 10 animations will load models 10 times…
I thinks I will export all animations to one “.egg” file.
Is it possible to contacts a frame of an animation.
for example>>
‘run’ >> loop frame 0 - 50
‘stand’ >> loop frame 60- 100
This idea will loads only one model per many animations.
Is it has a code to contact any frame of an actor’s animation?
please show me some code, please.
thank you.
Each animation usually has a different .egg file, which needs to be loaded of course.
To prevent long loading times, try using the egg2bam tool to convert your .egg files to .bam files, and load the .bam files in your code instead. They load MUCH faster (talking about seconds instead of minutes here!)
The collision traversal process is still foggy for me. I haven’t really read it’s source code. If adding some collision nodes really degrades performance, it could be your “into” nodes are not optimized well. So the traversal inefficiency is more noticeable as the number of collision solids increase.
To make the traversal efficient, you should :
build your world’s collision mesh using CollisionPolygons, not the visible mesh. The ultimate way to do this is by editing the .egg, just like Ralph’s world, so you would get CollisionPolygons when the .egg get loaded. I believe Josh Yelon had fixed some part of the code. Before v1.4.2, RoamingRalph only hit 35-40 fps top, but in v1.4.2, it’s now 120+ fps.
add some collision solids which moves together under a CollisionNode, not 1 solid per node.